EvolvingObjects
EO< F > Class Template Reference
Inheritance diagram for EO< F >:
eoObject eoPersistent eoPrintable PO< F >

List of all members.

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

Detailed Description

template<class F = double>
class EO< F >

Examples:
t-eo.cpp, t-eoGenOp.cpp, t-eoRoulette.cpp, t-eoSecondsElapsedContinue.cpp, t-eoSharing.cpp, and t-eoStateAndParser.cpp.

Definition at line 61 of file EO.h.


Member Function Documentation

template<class F = double>
void EO< F >::fitness ( const Fitness &  _fitness) [inline]

Set fitness.

At the same time, validates it.

Parameters:
_fitnessNew fitness value.

Reimplemented in PO< FitT >.

Definition at line 92 of file EO.h.

template<class F = double>
bool EO< F >::invalid ( ) const [inline]

Return true If fitness value is invalid, false otherwise.

Returns:
true If fitness is invalid.

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().

template<class F = double>
bool EO< F >::operator< ( const EO< F > &  _eo2) const [inline]

Returns true if.

Returns:
true if the fitness is higher

Definition at line 106 of file EO.h.

template<class F = double>
virtual std::string EO< F >::className ( void  ) const [inline, virtual]

Methods inherited from eoObject.

Return the class id.

Returns:
the class name as a std::string

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 >.

Definition at line 115 of file EO.h.

template<class F = double>
virtual void EO< F >::readFrom ( std::istream &  _is) [inline, virtual]

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

Parameters:
_isa std::istream.
Exceptions:
runtime_std::exceptionIf 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 >.

Definition at line 125 of file EO.h.

template<class F = double>
virtual void EO< F >::printOn ( std::ostream &  _os) const [inline, virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends