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.
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. |
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.
T | type of data used by value set. |
Chromosome::Representation::GaDomainChromosome< T >::GaDomainChromosome | ( | GaChromosomeDomainBlock< T > * | configBlock | ) | [inline] |
This constructor initializes chromosome with CCB.
configBlock | pointer to CCB. |
Chromosome::Representation::GaDomainChromosome< T >::GaDomainChromosome | ( | const GaDomainChromosome< T > & | c, | |
bool | setupOnly | |||
) | [inline] |
This is copy constructor.
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. |
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.
value | value which nearest neighbor should be found. |