|
EvolvingObjects
|
Base class for fixed length chromosomes. More...
#include <eoVector.h>
Public Types | |
| typedef GeneType | AtomType |
| typedef std::vector< GeneType > | ContainerType |
Public Member Functions | |
| eoVector (unsigned _size=0, GeneType _value=GeneType()) | |
| default constructor | |
| template<class OtherFitnessType > | |
| eoVector (const eoVector< OtherFitnessType, GeneType > &_vec) | |
| copy ctor abstracting from the FitT | |
| void | value (const std::vector< GeneType > &_v) |
| bool | operator< (const eoVector< FitT, GeneType > &_eo) const |
| to avoid conflicts between EO::operator< and std::vector<GeneType>::operator< | |
| virtual void | printOn (std::ostream &os) const |
| printing... | |
| virtual void | readFrom (std::istream &is) |
| reading... | |
Base class for fixed length chromosomes.
It just derives from EO and std::vector and redirects the smaller than operator to EO (fitness based comparison).
GeneType must have the following methods: void ctor (needed for the std::vector<>), copy ctor,
Definition at line 53 of file eoVector.h.
| eoVector< FitT, GeneType >::eoVector | ( | unsigned | _size = 0, |
| GeneType | _value = GeneType() |
||
| ) | [inline] |
default constructor
| _size | Length of vector (default is 0) |
| _value | Initial value of all elements (default is default value of type GeneType) |
Definition at line 72 of file eoVector.h.