|
EvolvingObjects
|
eoPopulator is a helper class for general operators eoGenOp It is an eoPop but also behaves like an eoPop::iterator as far as operator* and operator++ are concerned More...
#include <eoPopulator.h>
Classes | |
| struct | OutOfIndividuals |
Public Types | |
| typedef unsigned | position_type |
Public Member Functions | |
| eoPopulator (const eoPop< EOT > &_src, eoPop< EOT > &_dest) | |
| virtual | ~eoPopulator () |
| Virtual Constructor. | |
| EOT & | operator* (void) |
| a populator behaves like an iterator. | |
| eoPopulator & | operator++ () |
| only prefix increment defined Does not add a new element when at the end, use operator* for that If not on the end, increment the pointer to the next individual | |
| void | insert (const EOT &_eo) |
| mandatory for operators that generate more offspring than parents if such a thing exists ? | |
| void | reserve (int how_many) |
| just to make memory mangement more efficient | |
| const eoPop< EOT > & | source (void) |
| can be useful for operators with embedded selectors e.g. | |
| eoPop< EOT > & | offspring (void) |
| Get the offspring population. | |
| position_type | tellp () |
| this is a direct access container: tell position | |
| void | seekp (position_type pos) |
| this is a direct access container: go to position | |
| bool | exhausted (void) |
| no more individuals | |
| virtual const EOT & | select ()=0 |
| the pure virtual selection method - will be instanciated in eoSeqPopulator and eoSelectivePopulator | |
Protected Attributes | |
| eoPop< EOT > & | dest |
| eoPop< EOT >::iterator | current |
| const eoPop< EOT > & | src |
Private Member Functions | |
| void | get_next () |
eoPopulator is a helper class for general operators eoGenOp It is an eoPop but also behaves like an eoPop::iterator as far as operator* and operator++ are concerned
Definition at line 43 of file eoPopulator.h.
| EOT& eoPopulator< EOT >::operator* | ( | void | ) | [inline] |
a populator behaves like an iterator.
Hence the operator* it returns the current individual -- eventually getting a new one through the operator++ if at the end
Definition at line 62 of file eoPopulator.h.
| const eoPop<EOT>& eoPopulator< EOT >::source | ( | void | ) | [inline] |
can be useful for operators with embedded selectors e.g.
your brain and my beauty -type
Definition at line 109 of file eoPopulator.h.
Referenced by eoEsGlobalXover< EOT >::apply(), and eoSelBinGenOp< EOT >::apply().
| eoPop<EOT>& eoPopulator< EOT >::offspring | ( | void | ) | [inline] |
Get the offspring population.
Can be useful when you want to do some online niching kind of thing
Definition at line 114 of file eoPopulator.h.