EvolvingObjects
|
Public Types | |
typedef F | Fitness |
Public Member Functions | |
EO () | |
Default constructor. | |
virtual | ~EO () |
Virtual dtor. | |
const Fitness & | fitness () const |
Return fitness value. | |
Fitness & | fitnessReference () |
Get fitness as reference, useful when fitness is set in a multi-stage way, e.g., MOFitness gets performance information, is subsequently ranked. | |
void | invalidate () |
void | fitness (const Fitness &_fitness) |
Set fitness. | |
bool | invalid () const |
Return true If fitness value is invalid, false otherwise. | |
bool | operator< (const EO &_eo2) const |
Returns true if. | |
bool | operator> (const EO &_eo2) const |
virtual std::string | className () const |
Methods inherited from eoObject. | |
virtual void | readFrom (std::istream &_is) |
Read object. | |
virtual void | printOn (std::ostream &_os) const |
Write object. | |
Private Attributes | |
Fitness | repFitness |
bool | invalidFitness |
Set fitness.
At the same time, validates it.
_fitness | New fitness value. |
Reimplemented in PO< FitT >.
Return true If fitness value is invalid, false otherwise.
Reimplemented in PO< F >, and PO< FitT >.
Definition at line 101 of file EO.h.
Referenced by EO< PyFitness >::fitness(), EO< PyFitness >::fitnessReference(), and EO< PyFitness >::printOn().
Methods inherited from eoObject.
Return the class id.
Implements eoObject.
Reimplemented in PO< F >, PO< FitT >, eoParseTree< FType, Node >, eoBit< FitT >, eoString< fitnessT >, eoInt< FitT >, eoReal< FitT >, eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoBitParticle< FitT >, and eoRealParticle< FitT >.
Read object.
\ Calls base class, just in case that one had something to do. The read and print methods should be compatible and have the same format. In principle, format is "plain": they just print a number
_is | a std::istream. |
runtime_std::exception | If a valid object can't be read. |
Implements eoPersistent.
Reimplemented in PO< F >, PO< FitT >, eoParseTree< FType, Node >, eoVector< FitT, GeneType >, eoVector< Fit, double >, eoVector< FitT, int >, eoVector< FitT, double >, eoVector< FitT, bool >, eoBit< FitT >, eoEsFull< Fit >, eoExternalEO< Fit, External >, eoEsSimple< Fit >, and eoEsStdev< Fit >.
virtual void EO< F >::printOn | ( | std::ostream & | _os | ) | const [inline, virtual] |
Write object.
Called printOn since it prints the object _on_ a stream.
_os | A std::ostream. |
Implements eoPrintable.
Reimplemented in PO< F >, PO< FitT >, eoVectorParticle< FitT, PositionType, VelocityType >, eoVectorParticle< FitT, double, double >, eoVectorParticle< FitT, bool, double >, eoParseTree< FType, Node >, eoVector< FitT, GeneType >, eoVector< Fit, double >, eoVector< FitT, int >, eoVector< FitT, double >, eoVector< FitT, bool >, eoBit< FitT >, eoExternalEO< Fit, External >, eoString< fitnessT >, eoEsFull< Fit >, eoEsSimple< Fit >, and eoEsStdev< Fit >.