GEP Namespace Reference

Namespace for classes related to Gene Expression Programming This namespace contains classes describing Karva chromosomes, individuals based on these chromosomes, genetic operators and poppulation management. More...

Classes

class  CellPopulation
 CellPopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process. More...
class  Chromosome
 Karva chromosome template. Implemented as a vector<unsigned short> holding indexes of elements in _oneArgFunction, _twoArgFunction and _terminals vectors. More...
class  dataSample
 a structure used in learning process; represents a learning sample Contains vector of input and an output - inputs are set as Chromosome inputs and the output is compared with the output of the Chromosome in the Individual. paramSample is templated over the value type and the type of structure holding additional data. More...
struct  ConfigArgs
class  Node
class  OneArgNode
class  TwoArgNode
class  TerminalNode
class  ExpressionTree
struct  oneArg
struct  tfsign
struct  tfsqrt
struct  tfsin
struct  tfcos
struct  tftan
struct  tfexp
struct  tfln
struct  twoArg
struct  tfplus
struct  tfminus
struct  tfmul
struct  tfdiv
struct  tfgt
struct  tfil
struct  tfir
class  GEPAlg
 GEPAlg of < GEP::Population, GEP::Statistics> >. Executes consecutive independent runs of GEP algorithm by running the Population for a given number of generations Population statistics operators are calculated by _stats. More...
class  Individual
 Generic class for Individual representation Individual is a mother class for all classers describing an Individual. It holds GEP::SChromosome. Provides virtual methods that are used in GEP::Population. More...
struct  IndividualGT
struct  IndividualLT
class  ClassificationIndividual
 Individual performing classification tasks It is used for binary classification (having two classes). It holds four Predicted/Actual values. During evaluation, chromosome value is compared with the target, and classification matrix (below) is built, used for fitness calculation. More...
class  FunctionIndividual
 Individual performing function finding tasks It is used used for symbolic regression tasks, polynomial finding, etc. It holds _hits value, which is a summary of accuracy of the individual. During evaluation, chromosome value is compared with the target. More...
class  MergePopulation
 MergePopulation of < GEP::Individual >. Manages the selection of Individuals according to cellular process. More...
class  MOGEPAlg
class  MOIndividual
 Generic class for multi-objective Individual representation MOIndividual is a mother class for all classers describing an MOIndividual. It holds GEP::Chromosome<ChromosomeType>. Provides virtual methods that are used in GEP::MOPopulation. More...
struct  MOIndividualGT
struct  MOIndividualLT
struct  objGt
class  ClassificationMOIndividual
class  MOPopulation
 MOPopulation of < GEP::MOIndividual >. Holds population of individuals - instances of derrivates of GEP::MOIndividual class. Genetic operators are applied through _operators. More...
class  MOStatistics
class  Operators
 Set of genetic operations for GEP::SChromosome. It is used to perform modifications to Individuals during evolution of population. Operations here are performed on single (or pairs of) GEP::Chromosome<CType> instances. More...
struct  pairGt
struct  paretoSort
struct  ftevaluate
struct  ftfitness
class  Population
 Population of < Gep::Individual, std::binary_function<cGEP::Individual &, GEP::Individual &, bool> >. Holds population of individuals - instances of derrivates of GEP::Individual class. Genetic operators are applied through _operators. More...
class  RandomConstants
 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...
class  Statistics

Typedefs

typedef char EType
typedef u_short VType
typedef std::pair< EType, VTypeCElement
typedef std::pair< u_short,
double > 
sdpair

Enumerations

enum  individual_state {
  IND_IDLE,
  IND_MODIFIED,
  IND_EVALUATED
}
enum  pareto_result {
  DOMINATING,
  DOMINATED,
  NON_DOMINATED
}
enum  rcindividual_state {
  RCIND_WORSE,
  RCIND_BETTER,
  RCIND_UNUSED
}

Functions

template<class T2 >
std::ostream & operator<< (std::ostream &os, const Chromosome< T2 > &a)
template<class ChromosomeType >
std::string markedChromosome (const Chromosome< ChromosomeType > &chromo, const std::vector< std::vector< u_short > > &placeMarks)
template<class ChromosomeType >
std::string geneEquation (const Chromosome< ChromosomeType > &chromo, const u_short &idx, const bool &termSymbols)
template<class ChromosomeType >
std::string chromosomeEquation (const Chromosome< ChromosomeType > &chromo, const bool &termSymbols)
template<class ChromosomeType >
bool compareEffective (const Chromosome< ChromosomeType > &cmpa, const Chromosome< ChromosomeType > &cmpb)
template<class ChromosomeType >
bool compareEffectiveUnordered (const Chromosome< ChromosomeType > &cmpa, const Chromosome< ChromosomeType > &cmpb)
void neighborhood_L5 (std::vector< std::pair< short, short > > &neighborhood)
void neighborhood_L9 (std::vector< std::pair< short, short > > &neighborhood)
void neighborhood_C9 (std::vector< std::pair< short, short > > &neighborhood)
void neighborhood_C13 (std::vector< std::pair< short, short > > &neighborhood)
template<class T >
std::vector< oneArg< T > * > getUnaryFunctions ()
template<class T >
oneArg< T > * getUnaryFunction (const std::string &arg)
template<class T >
std::vector< oneArg< T > * > getUnaryFunctions (const std::vector< std::string > &args)
template<class T >
std::vector< twoArg< T > * > getBinaryFunctions ()
template<class T >
twoArg< T > * getBinaryFunction (const std::string &arg)
template<class T >
std::vector< twoArg< T > * > getBinaryFunctions (const std::vector< std::string > &args)
template<class T >
Chromosome< T > decodeChromosome (const std::vector< std::string > &chromosomesLines)
template<class T >
void chromosomesFromFile (std::vector< Chromosome< T > > &chromosomes, const std::string &path)
template<class T >
void chromosomesFromFile (std::vector< std::vector< Chromosome< T > > > &chromosomes, const std::string &path)
template<class T >
std::vector< Chromosome< T > > refineChromosomes (const std::vector< Chromosome< T > > &vec)
template<class IndividualType >
void evaluate (std::vector< dataSample< typename IndividualType::chromo_type, typename IndividualType::eval_type > > &data, std::vector< IndividualType > &individuals)
template<class U , class V , class W >
std::ostream & operator<< (std::ostream &os, const Individual< U, V, W > &a)
template<class U , class V , class W >
std::ostream & operator<< (std::ostream &os, const MOIndividual< U, V, W > &a)
template<class IndividalType , template< class IndividalType > class Comparator>
std::pair< std::vector
< IndividalType >, std::vector
< IndividalType > > 
splitNonDominated (const std::vector< IndividalType > &mos, Comparator< IndividalType > c=Comparator< IndividalType >(), bool sideswitch=true)
template<class T >
std::vector< double > crowdingDistance (const std::vector< T > mos)
template<class T >
std::vector< sdpairsortedCrowdingDistance (const std::vector< T > mos)
template<class T >
std::vector< sdpairsortedCrowdingDistance (const std::vector< T > mos, const std::vector< T > submos)
template<class IndividualType >
std::vector< double > badPointDistance (const std::vector< IndividualType > mos, typename IndividualType::ret_type &badPoint)
template<class IndividualType >
std::vector< sdpairsortedBadPointDistance (const std::vector< IndividualType > mos, typename IndividualType::ret_type &badPoint)
template<class IndividualType , template< class IndividualType > class Comparator>
void evaluateMO (std::vector< typename IndividualType::data_type > &data, std::vector< std::vector< IndividualType > > &individuals, bool prune, Comparator< IndividualType > c=Comparator< IndividualType >())
template<class IndividualType >
double hypervolume (std::vector< IndividualType > &front, const typename IndividualType::ret_type &bestPoint, const typename IndividualType::ret_type &worstPoint)
template<class T >
std::pair< double, double > avgCrowdingDistance (std::vector< T > &front)
template<class IndividualType >
std::vector< double > hypervolume (std::vector< std::vector< IndividualType > > &fronts, const typename IndividualType::ret_type &bestPoint, const typename IndividualType::ret_type &worstPoint)
template<class IndividualType >
std::pair< double, double > avgHypervolume (std::vector< std::vector< IndividualType > > &fronts, const typename IndividualType::ret_type &bestPoint, const typename IndividualType::ret_type &worstPoint)
template<class T >
std::pair< double, double > avgNum (std::vector< std::vector< T > > &fronts)
template<class T >
std::pair< double, double > avgCrowdingDistance (std::vector< std::vector< T > > &fronts)
template<class T >
stat_plus (const T &a, const T &b)
template<class T >
std::vector< T > stat_plus (const std::vector< T > &a, const T &b)
template<class T >
std::vector< T > stat_plus (const std::vector< T > &a, const std::vector< T > &b)
template<class T >
stat_div (const T &a, const double &b)
template<class T >
std::vector< double > stat_div (const std::vector< T > &a, const double &b)
template<class IndividualType >
std::vector< double > savgFitness (const std::vector< IndividualType > &inds)

Detailed Description

Namespace for classes related to Gene Expression Programming This namespace contains classes describing Karva chromosomes, individuals based on these chromosomes, genetic operators and poppulation management.


Typedef Documentation

typedef std::pair<EType, VType> GEP::CElement
typedef char GEP::EType
typedef std::pair<u_short,double> GEP::sdpair
typedef u_short GEP::VType

Enumeration Type Documentation

Enumerator:
IND_IDLE 
IND_MODIFIED 
IND_EVALUATED 
Enumerator:
DOMINATING 
DOMINATED 
NON_DOMINATED 
Enumerator:
RCIND_WORSE 
RCIND_BETTER 
RCIND_UNUSED 

Function Documentation

template<class T >
std::pair<double,double> GEP::avgCrowdingDistance ( std::vector< std::vector< T > > &  fronts  )  [inline]
template<class T >
std::pair<double,double> GEP::avgCrowdingDistance ( std::vector< T > &  front  )  [inline]
template<class IndividualType >
std::pair<double,double> GEP::avgHypervolume ( std::vector< std::vector< IndividualType > > &  fronts,
const typename IndividualType::ret_type &  bestPoint,
const typename IndividualType::ret_type &  worstPoint 
) [inline]
template<class T >
std::pair<double,double> GEP::avgNum ( std::vector< std::vector< T > > &  fronts  )  [inline]
template<class IndividualType >
std::vector<double> GEP::badPointDistance ( const std::vector< IndividualType >  mos,
typename IndividualType::ret_type &  badPoint 
) [inline]
template<class ChromosomeType >
std::string GEP::chromosomeEquation ( const Chromosome< ChromosomeType > &  chromo,
const bool &  termSymbols 
) [inline]

Represents a given chromosome in the form of equation.

Parameters:
chromo - Chromosome under consideration
termSymbols - if terminals are to be represented as values (true) or symbols (false)
template<class T >
void GEP::chromosomesFromFile ( std::vector< std::vector< Chromosome< T > > > &  chromosomes,
const std::string &  path 
) [inline]
template<class T >
void GEP::chromosomesFromFile ( std::vector< Chromosome< T > > &  chromosomes,
const std::string &  path 
) [inline]
template<class ChromosomeType >
bool GEP::compareEffective ( const Chromosome< ChromosomeType > &  cmpa,
const Chromosome< ChromosomeType > &  cmpb 
) [inline]
template<class ChromosomeType >
bool GEP::compareEffectiveUnordered ( const Chromosome< ChromosomeType > &  cmpa,
const Chromosome< ChromosomeType > &  cmpb 
) [inline]
template<class T >
std::vector<double> GEP::crowdingDistance ( const std::vector< T >  mos  )  [inline]
template<class T >
Chromosome<T> GEP::decodeChromosome ( const std::vector< std::string > &  chromosomesLines  )  [inline]
template<class IndividualType >
void GEP::evaluate ( std::vector< dataSample< typename IndividualType::chromo_type, typename IndividualType::eval_type > > &  data,
std::vector< IndividualType > &  individuals 
) [inline]
template<class IndividualType , template< class IndividualType > class Comparator>
void GEP::evaluateMO ( std::vector< typename IndividualType::data_type > &  data,
std::vector< std::vector< IndividualType > > &  individuals,
bool  prune,
Comparator< IndividualType >  c = Comparator<IndividualType>() 
) [inline]
template<class ChromosomeType >
std::string GEP::geneEquation ( const Chromosome< ChromosomeType > &  chromo,
const u_short &  idx,
const bool &  termSymbols 
) [inline]

Represents a given ORF in the form of equation.

Parameters:
idx - index of ORF to be represented
chromo - Chromosome under consideration
termSymbols - if terminals are to be represented as values (true) or symbols (false)
template<class T >
twoArg<T>* GEP::getBinaryFunction ( const std::string &  arg  )  [inline]

Returns a pointer of function by a given name.

Parameters:
arg name of obtained function
Returns:
pointer to obtained function
template<class T >
std::vector< twoArg<T>* > GEP::getBinaryFunctions ( const std::vector< std::string > &  args  )  [inline]

Returns a vecor of pointers of functions by given names.

Parameters:
args vector of strings with names of obtained functions
Returns:
vector of pointer to obtained function
template<class T >
std::vector< twoArg<T>* > GEP::getBinaryFunctions (  )  [inline]

Creates a vector containing all basic one argument functions (pointers)

Returns:
vector of pointers of all basic one argument functions
template<class T >
oneArg<T>* GEP::getUnaryFunction ( const std::string &  arg  )  [inline]

Returns a pointer of function by a given name.

Parameters:
arg name of obtained function
Returns:
pointer to obtained function
template<class T >
std::vector< oneArg<T>* > GEP::getUnaryFunctions ( const std::vector< std::string > &  args  )  [inline]

Returns a vecor of pointers of functions by given names.

Parameters:
args vector of strings with names of obtained functions
Returns:
vector of pointer to obtained function
template<class T >
std::vector< oneArg<T>* > GEP::getUnaryFunctions (  )  [inline]

Creates a vector containing all basic one argument functions (pointers)

Returns:
vector of pointers of all basic one argument functions
template<class IndividualType >
std::vector<double> GEP::hypervolume ( std::vector< std::vector< IndividualType > > &  fronts,
const typename IndividualType::ret_type &  bestPoint,
const typename IndividualType::ret_type &  worstPoint 
) [inline]
template<class IndividualType >
double GEP::hypervolume ( std::vector< IndividualType > &  front,
const typename IndividualType::ret_type &  bestPoint,
const typename IndividualType::ret_type &  worstPoint 
) [inline]
template<class ChromosomeType >
std::string GEP::markedChromosome ( const Chromosome< ChromosomeType > &  chromo,
const std::vector< std::vector< u_short > > &  placeMarks 
) [inline]

Function to facilitate Chromosome analysis. Allows to separate parts of genes in a chromosome with ' V ' marks.

Parameters:
placeMarks vector containing vectors of indexes to place marks. Each vector in placeMarks corresponds to a gene. If no marks are to be set, the vector should be empty.
Returns:
string containig a chromosome
Parameters:
chromo with marks placed in
placeMarks 
void GEP::neighborhood_C13 ( std::vector< std::pair< short, short > > &  neighborhood  ) 
void GEP::neighborhood_C9 ( std::vector< std::pair< short, short > > &  neighborhood  ) 
void GEP::neighborhood_L5 ( std::vector< std::pair< short, short > > &  neighborhood  ) 
void GEP::neighborhood_L9 ( std::vector< std::pair< short, short > > &  neighborhood  ) 
template<class U , class V , class W >
std::ostream& GEP::operator<< ( std::ostream &  os,
const MOIndividual< U, V, W > &  a 
) [inline]
template<class U , class V , class W >
std::ostream& GEP::operator<< ( std::ostream &  os,
const Individual< U, V, W > &  a 
) [inline]
template<class T2 >
std::ostream& GEP::operator<< ( std::ostream &  os,
const Chromosome< T2 > &  a 
) [inline]
template<class T >
std::vector< Chromosome<T> > GEP::refineChromosomes ( const std::vector< Chromosome< T > > &  vec  )  [inline]
template<class IndividualType >
std::vector<double> GEP::savgFitness ( const std::vector< IndividualType > &  inds  )  [inline]
template<class IndividualType >
std::vector<sdpair> GEP::sortedBadPointDistance ( const std::vector< IndividualType >  mos,
typename IndividualType::ret_type &  badPoint 
) [inline]
template<class T >
std::vector<sdpair> GEP::sortedCrowdingDistance ( const std::vector< T >  mos,
const std::vector< T >  submos 
) [inline]
template<class T >
std::vector<sdpair> GEP::sortedCrowdingDistance ( const std::vector< T >  mos  )  [inline]
template<class IndividalType , template< class IndividalType > class Comparator>
std::pair< std::vector<IndividalType>,std::vector<IndividalType> > GEP::splitNonDominated ( const std::vector< IndividalType > &  mos,
Comparator< IndividalType >  c = Comparator<IndividalType>(),
bool  sideswitch = true 
) [inline]
template<class T >
std::vector<double> GEP::stat_div ( const std::vector< T > &  a,
const double &  b 
) [inline]
template<class T >
std::vector< double > GEP::stat_div ( const T &  a,
const double &  b 
) [inline]
template<class T >
std::vector<T> GEP::stat_plus ( const std::vector< T > &  a,
const std::vector< T > &  b 
) [inline]
template<class T >
std::vector<T> GEP::stat_plus ( const std::vector< T > &  a,
const T &  b 
) [inline]
template<class T >
T GEP::stat_plus ( const T &  a,
const T &  b 
) [inline]

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