eoVector< FitT, GeneType > Class Template Reference

Base class for fixed length chromosomes. More...

#include <eoVector.h>

Inheritance diagram for eoVector< FitT, GeneType >:

EO< F > eoObject eoPersistent eoPrintable eoBit< FitT > eoInt< FitT > eoReal< FitT >

List of all members.

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


Detailed Description

template<class FitT, class GeneType>
class eoVector< FitT, GeneType >

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 39 of file eoVector.h.


Constructor & Destructor Documentation

template<class FitT, class GeneType>
eoVector< FitT, GeneType >::eoVector ( unsigned  _size = 0,
GeneType  _value = GeneType() 
) [inline]

default constructor

Parameters:
size Length of vector (default is 0)
value Initial value of all elements (default is default value of type GeneType)

Definition at line 58 of file eoVector.h.


The documentation for this class was generated from the following file:

Generated on Thu Jan 1 23:19:52 2009 for EvolvingObjects by  doxygen 1.5.5