moeoVector(3)

NAME
moeoVector - Base class for fixed length chromosomes, just derives from MOEO and std::vector and redirects the smaller than operator to MOEO (objective vector based comparison).

SYNOPSIS

#include <moeoVector.h>

Inherits MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >< MOEOObjectiveVector, MOEOFitness, MOEODiversity >.

  Public Types
typedef GeneType AtomType
the atomic type
typedef std::vector< GeneType > ContainerType
the container type

  Public Member Functions
moeoVector (unsigned _size=0, GeneType _value=GeneType())
Default ctor.
void value (const std::vector< GeneType > &_v)
We can't have a Ctor from a std::vector as it would create ambiguity with the copy Ctor.
bool operator< (const moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType > &_moeo) const
To avoid conflicts between MOEO::operator< and std::vector<GeneType>::operator<.
virtual void printOn (std::ostream &_os) const
Writing object.
virtual void readFrom (std::istream &_is)
Reading object.

Detailed Description

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> class moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >
Base class for fixed length chromosomes, just derives from MOEO and std::vector and redirects the smaller than operator to MOEO (objective vector based comparison). GeneType must have the following methods: void ctor (needed for the std::vector<>), copy ctor.

Definition at line 25 of file moeoVector.h.

Constructor & Destructor Documentation

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >::moeoVector (unsigned _size = 0, GeneType _value = GeneType()) [inline]

Default ctor.

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

Definition at line 47 of file moeoVector.h.

Member Function Documentation

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> void moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >::value (const std::vector< GeneType > & _v) [inline]

We can't have a Ctor from a std::vector as it would create ambiguity with the copy Ctor.

Parameters:
    _v a vector of GeneType

Definition at line 56 of file moeoVector.h.

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> bool moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >::operator< (const moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType > & _moeo) const [inline]

To avoid conflicts between MOEO::operator< and std::vector<GeneType>::operator<.

Parameters:
    _moeo the object to compare with

Definition at line 75 of file moeoVector.h.

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> virtual void moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >::printOn (std::ostream & _os) const [inline, virtual]

Writing object.

Parameters:
    _os output stream

Reimplemented from MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >.

Reimplemented in moeoBitVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity >.

Definition at line 85 of file moeoVector.h.

  template<class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity, class GeneType> virtual void moeoVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity, GeneType >::readFrom (std::istream & _is) [inline, virtual]

Reading object.

Parameters:
    _is input stream

Reimplemented from MOEO< MOEOObjectiveVector, MOEOFitness, MOEODiversity >.

Reimplemented in moeoBitVector< MOEOObjectiveVector, MOEOFitness, MOEODiversity >.

Definition at line 98 of file moeoVector.h.

Author

Generated automatically by Doxygen for ParadisEO-MOEO from the source code.