ECF 1.5
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
Permutation::Permutation Class Reference

Permutation class - implements genotype as a vector of indices 0..(n-1) (permutation of indices) More...

#include <Permutation.h>

Inheritance diagram for Permutation::Permutation:
Genotype

Public Types

typedef std::vector< int > var
 

Public Member Functions

uint getSize ()
 
bool initialize (StateP state)
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
void registerParameters (StateP state)
 Register genotype's parameters (called before Genotype::initialize) More...
 
Permutationcopy ()
 Create an identical copy of the genotype object. More...
 
std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
void write (XMLNode &)
 Write genotype data to XMLNode. More...
 
void read (XMLNode &)
 Read genotype data from XMLNode. More...
 
- Public Member Functions inherited from Genotype
virtual bool initialize (StateP state)=0
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
virtual Genotypecopy ()=0
 Create an identical copy of the genotype object. More...
 
virtual std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
virtual std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
virtual void registerParameters (StateP)
 Register genotype's parameters (called before Genotype::initialize) More...
 
bool registerParameter (StateP state, std::string name, voidP value, enum ECF::type T, std::string description="")
 Register a single parameter. More...
 
voidP getParameterValue (StateP state, std::string name)
 Read single parameter value from Registry. More...
 
bool setParameterValue (StateP state, std::string name, voidP value)
 Write single parameter value to Registry. More...
 
bool isParameterDefined (StateP state, std::string name)
 Check if parameter is defined in the configuration. More...
 
virtual void read (XMLNode &)=0
 Read genotype data from XMLNode. More...
 
virtual void write (XMLNode &)=0
 Write genotype data to XMLNode. More...
 
virtual uint getGenomeSize ()
 
std::string getName ()
 Return genotype's name (each genotype is uniquely identified with its name). More...
 
uint getGenotypeId ()
 Return this genotype's index in individual structure. More...
 
void setGenotypeId (uint id)
 Set genotype index in an individual. More...
 
std::string toString ()
 Output genotype to string. More...
 

Public Attributes

var variables
 

Protected Attributes

uint size_
 permutation vector size More...
 
- Protected Attributes inherited from Genotype
std::string name_
 genotype's name More...
 
uint genotypeId_
 this genotype's unique index in individual structure More...
 

Detailed Description

Permutation class - implements genotype as a vector of indices 0..(n-1) (permutation of indices)

Definition at line 37 of file Permutation.h.

Member Typedef Documentation

◆ var

typedef std::vector<int> Permutation::Permutation::var

Definition at line 41 of file Permutation.h.

Constructor & Destructor Documentation

◆ Permutation()

Permutation::Permutation::Permutation ( )
inline

Definition at line 44 of file Permutation.h.

Member Function Documentation

◆ copy()

Permutation * Permutation::Permutation::copy ( )
inlinevirtual

Create an identical copy of the genotype object.

Implements Genotype.

Definition at line 53 of file Permutation.h.

◆ getCrossoverOp()

std::vector< CrossoverOpP > Permutation::Permutation::getCrossoverOp ( )
inlinevirtual

Create and return a vector of crossover operators.

Reimplemented from Genotype.

Definition at line 59 of file Permutation.h.

◆ getMutationOp()

std::vector< MutationOpP > Permutation::Permutation::getMutationOp ( )
inlinevirtual

Create and return a vector of mutation operators.

Reimplemented from Genotype.

Definition at line 78 of file Permutation.h.

◆ getSize()

uint Permutation::Permutation::getSize ( )
inline

Definition at line 46 of file Permutation.h.

◆ initialize()

bool Permutation::Permutation::initialize ( StateP  state)
virtual

Initialize a genotype object (read parameters, perform sanity check, build data)

Implements Genotype.

Definition at line 17 of file Permutation.cpp.

◆ read()

void Permutation::Permutation::read ( XMLNode &  )
virtual

Read genotype data from XMLNode.

Implements Genotype.

Definition at line 59 of file Permutation.cpp.

◆ registerParameters()

void Permutation::Permutation::registerParameters ( StateP  )
virtual

Register genotype's parameters (called before Genotype::initialize)

Reimplemented from Genotype.

Definition at line 10 of file Permutation.cpp.

◆ write()

void Permutation::Permutation::write ( XMLNode &  )
virtual

Write genotype data to XMLNode.

Implements Genotype.

Definition at line 45 of file Permutation.cpp.

Member Data Documentation

◆ size_

uint Permutation::Permutation::size_
protected

permutation vector size

Definition at line 39 of file Permutation.h.

◆ variables

var Permutation::Permutation::variables

Definition at line 42 of file Permutation.h.


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