moeoDummyFitnessAssignment.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
00002 
00003 //-----------------------------------------------------------------------------
00004 // moeoDummyFitnessAssignment.h
00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
00006 /*
00007     This library...
00008 
00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
00010  */
00011 //-----------------------------------------------------------------------------
00012 
00013 #ifndef MOEODUMMYFITNESSASSIGNMENT_H_
00014 #define MOEODUMMYFITNESSASSIGNMENT_H_
00015 
00016 #include <fitness/moeoFitnessAssignment.h>
00017 
00021 template < class MOEOT >
00022 class moeoDummyFitnessAssignment : public moeoFitnessAssignment < MOEOT >
00023 {
00024 public:
00025 
00027     typedef typename MOEOT::ObjectiveVector ObjectiveVector;
00028 
00029 
00034     void operator () (eoPop < MOEOT > & _pop)
00035     {
00036         for (unsigned int idx = 0; idx<_pop.size (); idx++)
00037         {
00038             if (_pop[idx].invalidFitness())
00039             {
00040                 // set the diversity to 0
00041                 _pop[idx].fitness(0.0);
00042             }
00043         }
00044     }
00045 
00046 
00052     void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec)
00053     {
00054         // nothing to do...  ;-)
00055     }
00056 
00057 };
00058 
00059 #endif /*MOEODUMMYFITNESSASSIGNMENT_H_*/

Generated on Tue Jun 26 15:13:04 2007 for ParadisEO-MOEO by  doxygen 1.4.7