#include <EO.h>
Inheritance diagram for EO< F >:

Public Types | |
| typedef F | Fitness |
| typedef Traits | fitness_traits |
| typedef Traits::storage_type | storage_type |
| typedef Traits::performance_type | performance_type |
| typedef Traits::worth_type | worth_type |
Public Member Functions | |
| EO () | |
| Default constructor. | |
| virtual | ~EO () |
| Virtual dtor. | |
| Fitness | fitness () const |
| Return fitness value. | |
| 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 |
| void | fitness (performance_type perf) |
| void | performance (performance_type perf) |
| performance_type | performance (void) const |
| void | worth (worth_type worth) |
| worth_type | worth (void) const |
| worth_type | fitness (void) const |
| void | invalidate (void) |
| void | invalidate_worth (void) |
| bool | operator< (const EO< Fitness, Traits > &other) const |
| bool | operator> (const EO< Fitness, Traits > &other) const |
| virtual std::string | className () const |
| Return the class id. | |
| virtual void | readFrom (std::istream &_is) |
| Read object.\ Calls base class, just in case that one had something to do. | |
| virtual void | printOn (std::ostream &_os) const |
| Write object. | |
Private Attributes | |
| Fitness | repFitness |
| bool | invalidFitness |
| bool | valid_performance |
| bool | valid_worth |
| storage_type | rep_fitness |
EOs have only got a fitness, which at the same time needs to be only an object with the operation less than (<) defined. Fitness says how good is the object; evolution or change of these objects is left to the genetic operators. A fitness less than another means a worse fitness, in whatever the context; thus, fitness is always maximized; although it can be minimized with a proper definition of the < operator. The fitness object must have, besides an void ctor, a copy ctor.
Definition at line 44 of file EO.h.
|
|||||||||
|
Default constructor. Fitness must have a ctor which takes 0 as a value; we can not use void ctors here since default types like float have no void initializer. VC++ allows it, but gcc does not |
|
||||||||||
|
Set fitness. At the same time, validates it.
|
|
|||||||||
|
Return true If fitness value is invalid, false otherwise.
Definition at line 81 of file EO.h. Referenced by EO< PyFitness >::fitness(), eoOneMaxEvalFunc< EOT >::operator()(), eoOneFifthMutation< EOT >::operator()(), eoEvalFuncPtr< EOT, FitT, FunctionArg >::operator()(), eoEvalFuncCounter< EOT >::operator()(), and EO< PyFitness >::printOn(). |
|
||||||||||
|
Returns true if.
Definition at line 86 of file EO.h. Referenced by eoVector< FitT, bool >::operator<(). |
|
||||||||||
|
Return the class id.
Implements eoObject. Reimplemented in eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoReal< FitT >, eoBit< FitT >, eoParseTree< FType, Node >, eoString< fitnessT >, and eoOneMax< 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
Implements eoPersistent. Reimplemented in eoVector< FitT, GeneType >, eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoBit< FitT >, eoParseTree< FType, Node >, eoExternalEO< Fit, External >, eoVector< Fit, double >, eoVector< FitT, double >, and eoVector< FitT, bool >. Definition at line 105 of file EO.h. Referenced by eoVector< FitT, bool >::readFrom(), eoPop< Dummy >::readFrom(), eoParseTree< FType, Node >::readFrom(), eoOneMax< FitT >::readFrom(), eoExternalEO< Fit, External >::readFrom(), and eoBit< FitT >::readFrom(). |
|
||||||||||
|
Write object. Called printOn since it prints the object _on_ a stream.
Implements eoPrintable. Reimplemented in eoVector< FitT, GeneType >, eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoBit< FitT >, eoParseTree< FType, Node >, eoExternalEO< Fit, External >, eoString< fitnessT >, Dummy, Dummy, Dummy, Dummy, eoVector< Fit, double >, eoVector< FitT, double >, and eoVector< FitT, bool >. Definition at line 129 of file EO.h. Referenced by Dummy::printOn(), eoVector< FitT, bool >::printOn(), eoString< fitnessT >::printOn(), eoParseTree< FType, Node >::printOn(), eoOneMax< FitT >::printOn(), eoExternalEO< Fit, External >::printOn(), and eoBit< FitT >::printOn(). |
1.3.9.1