Chromosome::Representation::GaDomainChromosome< T > Class Template Reference

GaDomainChromosome class should be base for chromosomes which have codes with values which must bi in defined domain. More...

#include <D:/Temp/vs/gal/source/DomainChromosome.h>

Inherits Chromosome::GaDynamicOperationChromosome.

List of all members.

Public Member Functions

 GaDomainChromosome (GaChromosomeDomainBlock< T > *configBlock)
 This constructor initializes chromosome with CCB.
 GaDomainChromosome (const GaDomainChromosome< T > &c, bool setupOnly)
 This is copy constructor.
const T & GetClosestValue (const T &value) const
 GetClosestValue method returns nearest value which can be found in value set to specified value.


Detailed Description

template<typename T>
class Chromosome::Representation::GaDomainChromosome< T >

GaDomainChromosome class should be base for chromosomes which have codes with values which must bi in defined domain.

This class has no built-in synchronizator, so LOCK_OBJECT and LOCK_THIS_OBJECT macros cannot be used with instances of this class. No public or private methods are thread-safe.

Parameters:
T type of data used by value set.

Constructor & Destructor Documentation

template<typename T>
Chromosome::Representation::GaDomainChromosome< T >::GaDomainChromosome ( GaChromosomeDomainBlock< T > *  configBlock  )  [inline]

This constructor initializes chromosome with CCB.

Parameters:
configBlock pointer to CCB.

template<typename T>
Chromosome::Representation::GaDomainChromosome< T >::GaDomainChromosome ( const GaDomainChromosome< T > &  c,
bool  setupOnly 
) [inline]

This is copy constructor.

Parameters:
c reference to chromosome which is copied.
setupOnly if this parameter is true, only pointer to CCB is copied. If this parameter is false, chromosome's data and CCB is copied.


Member Function Documentation

template<typename T>
const T& Chromosome::Representation::GaDomainChromosome< T >::GetClosestValue ( const T &  value  )  const [inline]

GetClosestValue method returns nearest value which can be found in value set to specified value.

This method is not thread-safe.

Parameters:
value value which nearest neighbor should be found.
Returns:
Method returns reference to nearest value in value set to specified value.


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

Genetic Algorithm Library
Coolsoft Software Development