#include <MOEO.h>
Inheritance diagram for MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >:

Public Types | |
| typedef MOEOObjectiveVector | ObjectiveVector |
| the objective vector type of a solution | |
| typedef MOEOFitness | Fitness |
| the fitness type of a solution | |
| typedef MOEODiversity | Diversity |
| the diversity type of a solution | |
Public Member Functions | |
| MOEO () | |
| Ctor. | |
| virtual | ~MOEO () |
| Virtual dtor. | |
| ObjectiveVector | objectiveVector () const |
| Returns the objective vector of the current solution. | |
| void | objectiveVector (const ObjectiveVector &_objectiveVectorValue) |
| Sets the objective vector of the current solution. | |
| void | invalidateObjectiveVector () |
| Sets the objective vector as invalid. | |
| bool | invalidObjectiveVector () const |
| Returns true if the objective vector is invalid, false otherwise. | |
| Fitness | fitness () const |
| Returns the fitness value of the current solution. | |
| void | fitness (const Fitness &_fitnessValue) |
| Sets the fitness value of the current solution. | |
| void | invalidateFitness () |
| Sets the fitness value as invalid. | |
| bool | invalidFitness () const |
| Returns true if the fitness value is invalid, false otherwise. | |
| Diversity | diversity () const |
| Returns the diversity value of the current solution. | |
| void | diversity (const Diversity &_diversityValue) |
| Sets the diversity value of the current solution. | |
| void | invalidateDiversity () |
| Sets the diversity value as invalid. | |
| bool | invalidDiversity () const |
| Returns true if the diversity value is invalid, false otherwise. | |
| void | invalidate () |
| Sets the objective vector, the fitness value and the diversity value as invalid. | |
| bool | invalid () const |
| Returns true if the fitness value is invalid, false otherwise. | |
| bool | operator< (const MOEO &_other) const |
| Returns true if the objective vector of the current solution is smaller than the objective vector of _other on the first objective, then on the second, and so on (can be usefull for sorting/printing). | |
| virtual std::string | className () const |
| Return the class id (the class name as a std::string). | |
| virtual void | printOn (std::ostream &_os) const |
| Writing object. | |
| virtual void | readFrom (std::istream &_is) |
| Reading object. | |
Private Attributes | |
| ObjectiveVector | objectiveVectorValue |
| the objective vector of this solution | |
| bool | invalidObjectiveVectorValue |
| true if the objective vector is invalid | |
| Fitness | fitnessValue |
| the fitness value of this solution | |
| bool | invalidFitnessValue |
| true if the fitness value is invalid | |
| Diversity | diversityValue |
| the diversity value of this solution | |
| bool | invalidDiversityValue |
| true if the diversity value is invalid | |
The template argument MOEOObjectiveVector allows to represent the solution in the objective space (it can be a moeoObjectiveVector object). The template argument MOEOFitness is an object reflecting the quality of the solution in term of convergence (the fitness of a solution is always to be maximized). The template argument MOEODiversity is an object reflecting the quality of the solution in term of diversity (the diversity of a solution is always to be maximized). All template arguments must have a void and a copy constructor. Besides, note that, contrary to the mono-objective case (and to EO) where the fitness value of a solution is confused with its objective value, the fitness value differs of the objectives values in the multi-objective case.
Definition at line 31 of file MOEO.h.
| void MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::objectiveVector | ( | const ObjectiveVector & | _objectiveVectorValue | ) | [inline] |
Sets the objective vector of the current solution.
| _objectiveVectorValue | the new objective vector |
Definition at line 82 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidObjectiveVectorValue, and MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::objectiveVectorValue.
| void MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::fitness | ( | const Fitness & | _fitnessValue | ) | [inline] |
Sets the fitness value of the current solution.
| _fitnessValue | the new fitness value |
Definition at line 124 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::fitnessValue, and MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidFitnessValue.
| void MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::diversity | ( | const Diversity & | _diversityValue | ) | [inline] |
Sets the diversity value of the current solution.
| _diversityValue | the new diversity value |
Definition at line 166 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::diversityValue, and MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidDiversityValue.
| bool MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::operator< | ( | const MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity > & | _other | ) | const [inline] |
Returns true if the objective vector of the current solution is smaller than the objective vector of _other on the first objective, then on the second, and so on (can be usefull for sorting/printing).
You should implement another function in the sub-class of MOEO to have another sorting mecanism.
| _other | the other MOEO object to compare with |
Definition at line 217 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::objectiveVector().
| virtual void MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::printOn | ( | std::ostream & | _os | ) | const [inline, virtual] |
Writing object.
| _os | output stream |
Reimplemented from EO< MOEOObjectiveVector >.
Reimplemented in moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >, moeoBitVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity >, moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, bool >, and moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, double >.
Definition at line 236 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidObjectiveVector(), and MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::objectiveVectorValue.
| virtual void MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::readFrom | ( | std::istream & | _is | ) | [inline, virtual] |
Reading object.
| _is | input stream |
Reimplemented from EO< MOEOObjectiveVector >.
Reimplemented in moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >, moeoBitVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity >, moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, bool >, and moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, double >.
Definition at line 253 of file MOEO.h.
References MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidateObjectiveVector(), MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::invalidObjectiveVectorValue, and MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >::objectiveVectorValue.
1.5.1