GEP::RandomConstants< IndividualType, Comparator > Class Template Reference

Random Constants holds population of individuals to compare their new versions from the point of view of random constants in their chromosomes. Templated in the same way as. More...

#include <RandomConstants.h>

List of all members.

Public Member Functions

 RandomConstants ()
void initRcArray (std::vector< IndividualType > &inds)
void initRcArray (IndividualType &ind)
void updateRcArray (std::vector< IndividualType > &inds, const Comparator< IndividualType > &cmp)
std::vector< IndividualType > & getRcArray ()
const std::vector
< IndividualType > & 
getRcArray () const
u_char getMode () const
std::vector< double > & getInitRCs ()
const std::vector< double > & getInitRCs () const
void setRcArray (const std::vector< IndividualType > &rca)
void setMode (const u_char &mode)
void setInitRCs (const std::vector< double > &ircs)

Private Types

typedef std::vector
< IndividualType >::iterator 
indIter

Private Member Functions

bool cmpRcVec (const std::vector< double > &a, const std::vector< double > &b)
void randomGaussian (std::vector< std::vector< double > > &darray)
void evolutionaryStrategy (std::vector< std::vector< double > > &darray)
std::string toShortString (const IndividualType &indy)

Private Attributes

std::vector< IndividualType > _rcArray
std::vector< IndividualType > _tmp_rc
std::vector< std::vector
< double > > 
_modArray
u_char _mode
u_short _inum
u_short _rcl
double _probability
std::vector< double > _initRCs
boost::mt19937 _mersenne
boost::uniform_01< boost::mt19937 > _rng_uni_real
boost::variate_generator
< boost::mt19937
&, boost::normal_distribution<> > 
_rng_normal

Detailed Description

template<class IndividualType, template< class IndividualType > class Comparator>
class GEP::RandomConstants< IndividualType, Comparator >

Random Constants holds population of individuals to compare their new versions from the point of view of random constants in their chromosomes. Templated in the same way as.

See also:
Population is ment to use the same type of Individual and Comparator.

Member Typedef Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
typedef std::vector<IndividualType>::iterator GEP::RandomConstants< IndividualType, Comparator >::indIter [private]

Constructor & Destructor Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
GEP::RandomConstants< IndividualType, Comparator >::RandomConstants (  )  [inline]

Member Function Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
bool GEP::RandomConstants< IndividualType, Comparator >::cmpRcVec ( const std::vector< double > &  a,
const std::vector< double > &  b 
) [inline, private]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::evolutionaryStrategy ( std::vector< std::vector< double > > &  darray  )  [inline, private]
template<class IndividualType , template< class IndividualType > class Comparator>
const std::vector<double>& GEP::RandomConstants< IndividualType, Comparator >::getInitRCs (  )  const [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<double>& GEP::RandomConstants< IndividualType, Comparator >::getInitRCs (  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
u_char GEP::RandomConstants< IndividualType, Comparator >::getMode (  )  const [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
const std::vector<IndividualType>& GEP::RandomConstants< IndividualType, Comparator >::getRcArray (  )  const [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<IndividualType>& GEP::RandomConstants< IndividualType, Comparator >::getRcArray (  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::initRcArray ( IndividualType &  ind  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::initRcArray ( std::vector< IndividualType > &  inds  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::randomGaussian ( std::vector< std::vector< double > > &  darray  )  [inline, private]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::setInitRCs ( const std::vector< double > &  ircs  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::setMode ( const u_char &  mode  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::setRcArray ( const std::vector< IndividualType > &  rca  )  [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
std::string GEP::RandomConstants< IndividualType, Comparator >::toShortString ( const IndividualType &  indy  )  [inline, private]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::RandomConstants< IndividualType, Comparator >::updateRcArray ( std::vector< IndividualType > &  inds,
const Comparator< IndividualType > &  cmp 
) [inline]

Member Data Documentation

template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<double> GEP::RandomConstants< IndividualType, Comparator >::_initRCs [private]

Initial setup for ALL random constant vectors of initialized individuals

template<class IndividualType , template< class IndividualType > class Comparator>
u_short GEP::RandomConstants< IndividualType, Comparator >::_inum [private]
template<class IndividualType , template< class IndividualType > class Comparator>
boost::mt19937 GEP::RandomConstants< IndividualType, Comparator >::_mersenne [private]

Engine of the random number generators - Mersenne Twister

template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<std::vector<double> > GEP::RandomConstants< IndividualType, Comparator >::_modArray [private]

An array storing the modifications of random constants of individuals

template<class IndividualType , template< class IndividualType > class Comparator>
u_char GEP::RandomConstants< IndividualType, Comparator >::_mode [private]

Mode of work: uninitialized (-1), random normal (0), evolutionary strategy (1)

template<class IndividualType , template< class IndividualType > class Comparator>
double GEP::RandomConstants< IndividualType, Comparator >::_probability [private]
template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<IndividualType> GEP::RandomConstants< IndividualType, Comparator >::_rcArray [private]

An array storing the individuals for their random constant variables in between the generations

template<class IndividualType , template< class IndividualType > class Comparator>
u_short GEP::RandomConstants< IndividualType, Comparator >::_rcl [private]
template<class IndividualType , template< class IndividualType > class Comparator>
boost::variate_generator< boost::mt19937 &, boost::normal_distribution<> > GEP::RandomConstants< IndividualType, Comparator >::_rng_normal [private]

Normal distribution generator

template<class IndividualType , template< class IndividualType > class Comparator>
boost::uniform_01<boost::mt19937> GEP::RandomConstants< IndividualType, Comparator >::_rng_uni_real [private]

Random real numbers generator, interval [0,1).

template<class IndividualType , template< class IndividualType > class Comparator>
std::vector<IndividualType> GEP::RandomConstants< IndividualType, Comparator >::_tmp_rc [private]

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

Generated on Fri Dec 11 22:28:17 2009 for LibGEP by  doxygen 1.6.1