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

This class can be used for chromosomes which code has only one value that supports arithmetic operations. Value can be of any type as long as that type obeys requirements introduced by value set and has defined arithmetic operators. More...

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

Inherits Chromosome::Representation::GaSingleValueChromosome< 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.
 GaSVArithmeticChromosome (TYPE value, GaChromosomeDomainBlock< TYPE > *configBlock)
 This constructor initializes chromosome with CCB and its code.
 GaSVArithmeticChromosome (GaChromosomeDomainBlock< TYPE > *configBlock)
 This constructor initializes chromosome with CCB and randomly generated code.
 GaSVArithmeticChromosome (const GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< TYPE >

This class can be used for chromosomes which code has only one value that supports arithmetic operations. Value can be of any type as long as that type obeys requirements introduced by value set and has defined arithmetic operators.

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::GaSVArithmeticChromosome< TYPE >::GaSVArithmeticChromosome ( TYPE  value,
GaChromosomeDomainBlock< TYPE > *  configBlock 
) [inline]

This constructor initializes chromosome with CCB and its code.

Parameters:
value chromosome's code.
configBlock pointer to CCB.

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

This constructor initializes chromosome with CCB and randomly generated code.

Parameters:
configBlock pointer to CCB.

template<typename TYPE>
Chromosome::Representation::GaSVArithmeticChromosome< TYPE >::GaSVArithmeticChromosome ( const GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSVArithmeticChromosome< 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::GaSingleValueChromosome< TYPE >.


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

Genetic Algorithm Library
Coolsoft Software Development