Chromosome::Representation::GaMVArithmeticChromosome< TYPE > Class Template Reference

This class can be used for chromosomes which code has multiple values that support arithmetic operations. Values can be of any type, but all values must have same type, they must use same value set and must obey requirements introduced by the value set. More...

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

Inherits Chromosome::Representation::GaMultiValueChromosome< TYPE >< TYPE >, and Chromosome::Representation::GaArithmeticalCode.

List of all members.

Public Member Functions

GaChromosomePtr GACALL operator+ (const GaArithmeticalCode &rhs) const
 More details are given in specification of GaArithmeticalCode::operator +.
GaChromosomePtr GACALL operator- (const GaArithmeticalCode &rhs) const
 More details are given in specification of GaArithmeticalCode::operator -.
GaChromosomePtr GACALL operator* (const GaArithmeticalCode &rhs) const
 More details are given in specification of GaArithmeticalCode::operator *.
GaChromosomePtr GACALL operator/ (const GaArithmeticalCode &rhs) const
 More details are given in specification of GaArithmeticalCode::operator /.
GaChromosomePtr GACALL Midpoint (const GaArithmeticalCode &c) const
 More details are given in specification of GaArithmeticalCode::Midpoint method.
 GaMVArithmeticChromosome (TYPE *values, int size, GaChromosomeDomainBlock< TYPE > *configBlock)
 This constructor initializes chromosome with CCB and user-defined code.
 GaMVArithmeticChromosome (int size, GaChromosomeDomainBlock< TYPE > *configBlock)
 This constructor initializes chromosome with CCB and random code with defined size.
 GaMVArithmeticChromosome (GaChromosomeDomainBlock< TYPE > *configBlock)
 This constructor initializes chromosome with CCB.
 GaMVArithmeticChromosome (const GaMVArithmeticChromosome< TYPE > &c, bool setupOnly)
 This is copy constructor.
virtual GaChromosomePtr GACALL MakeCopy (bool setupOnly) const
 More details are given in specification of GaChromosome::MakeCopy method.


Detailed Description

template<typename TYPE>
class Chromosome::Representation::GaMVArithmeticChromosome< TYPE >

This class can be used for chromosomes which code has multiple values that support arithmetic operations. Values can be of any type, but all values must have same type, they must use same value set and must obey requirements introduced by the value set.

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:
TYPE type of value in chromosome's code. This type must support binary operators +, -, *, / and / with right hand operand of int type.

Constructor & Destructor Documentation

template<typename TYPE>
Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::GaMVArithmeticChromosome ( TYPE *  values,
int  size,
GaChromosomeDomainBlock< TYPE > *  configBlock 
) [inline]

This constructor initializes chromosome with CCB and user-defined code.

Parameters:
values values of chromosome's code.
size size of chromosome's code.
configBlock pointer to CCB.

template<typename TYPE>
Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::GaMVArithmeticChromosome ( int  size,
GaChromosomeDomainBlock< TYPE > *  configBlock 
) [inline]

This constructor initializes chromosome with CCB and random code with defined size.

Parameters:
size size of chromosome's code.
configBlock pointer to CCB.

template<typename TYPE>
Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::GaMVArithmeticChromosome ( GaChromosomeDomainBlock< TYPE > *  configBlock  )  [inline]

This constructor initializes chromosome with CCB.

Parameters:
configBlock pointer to CCB.

template<typename TYPE>
Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::GaMVArithmeticChromosome ( const GaMVArithmeticChromosome< TYPE > &  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 TYPE>
GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::operator+ ( const GaArithmeticalCode rhs  )  const [inline, virtual]

More details are given in specification of GaArithmeticalCode::operator +.

This method is not thread-safe.

Implements Chromosome::Representation::GaArithmeticalCode.

template<typename TYPE>
GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::operator- ( const GaArithmeticalCode rhs  )  const [inline, virtual]

More details are given in specification of GaArithmeticalCode::operator -.

This method is not thread-safe.

Implements Chromosome::Representation::GaArithmeticalCode.

template<typename TYPE>
GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::operator* ( const GaArithmeticalCode rhs  )  const [inline, virtual]

More details are given in specification of GaArithmeticalCode::operator *.

This method is not thread-safe.

Implements Chromosome::Representation::GaArithmeticalCode.

template<typename TYPE>
GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::operator/ ( const GaArithmeticalCode rhs  )  const [inline, virtual]

More details are given in specification of GaArithmeticalCode::operator /.

This method is not thread-safe.

Implements Chromosome::Representation::GaArithmeticalCode.

template<typename TYPE>
GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::Midpoint ( const GaArithmeticalCode c  )  const [inline, virtual]

More details are given in specification of GaArithmeticalCode::Midpoint method.

This method is not thread-safe.

Implements Chromosome::Representation::GaArithmeticalCode.

template<typename TYPE>
virtual GaChromosomePtr GACALL Chromosome::Representation::GaMVArithmeticChromosome< TYPE >::MakeCopy ( bool  setupOnly  )  const [inline, virtual]

More details are given in specification of GaChromosome::MakeCopy method.

This method is not thread-safe.

Reimplemented from Chromosome::Representation::GaMultiValueChromosome< TYPE >.


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

Genetic Algorithm Library
Coolsoft Software Development