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

This template represents value set which is consisted of multiple value sets. Value sets can be of any kind, but must contains same type of data. More...

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

Inherits Chromosome::Representation::GaValueSet< T >< T >.

List of all members.

Public Member Functions

 GaCombinedValueSet ()
 This constructor initializes empty value set.
virtual T GACALL GenerateRandom () const
 More details are given in specification of GaValueSet::GenerateRandom method.
virtual bool GACALL Inverse (const T &value, T &inverted) const
 More details are given in specification of GaValueSet::Inverse method.
virtual bool GACALL Belongs (const T &value) const
 More details are given in specification of GaValueSet::ClosestValue method.
virtual const T &GACALL ClosestValue (const T &value) const
 More details are given in specification of GaValueSet::ClosestValue method.
void GACALL Add (GaValueSet< T > *set)
 Add method inserts new value set.
void GACALL Remove (GaValueSet< T > *set)
 Remove method removes specified value set.
void GACALL Remove (int pos)
 Remove method removes value set at specified position.
int GACALL GetNumberOfSets () const
 This method is not thread safe.
GaValueSet< T > &GACALL operator[] (int pos) const
 operator [] returns reference to value set at specified position.

Private Attributes

vector< GaValueSet< T > * > _sets
 Array of value sets.


Detailed Description

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

This template represents value set which is consisted of multiple value sets. Value sets can be of any kind, but must contains same type of data.

This class has built-in synchronizator so it is allowed to use LOCK_OBJECT and LOCK_THIS_OBJECT macros with instances of this class, but no public or private methods are thread-safe.

Parameters:
T type of data in value set.

Constructor & Destructor Documentation

template<typename T>
Chromosome::Representation::GaCombinedValueSet< T >::GaCombinedValueSet (  )  [inline]

This constructor initializes empty value set.


Member Function Documentation

template<typename T>
virtual T GACALL Chromosome::Representation::GaCombinedValueSet< T >::GenerateRandom (  )  const [inline, virtual]

More details are given in specification of GaValueSet::GenerateRandom method.

This method is not thread-safe.

Implements Chromosome::Representation::GaValueSet< T >.

template<typename T>
virtual bool GACALL Chromosome::Representation::GaCombinedValueSet< T >::Inverse ( const T &  value,
T &  inverted 
) const [inline, virtual]

More details are given in specification of GaValueSet::Inverse method.

This method is not thread-safe.

Implements Chromosome::Representation::GaValueSet< T >.

template<typename T>
virtual bool GACALL Chromosome::Representation::GaCombinedValueSet< T >::Belongs ( const T &  value  )  const [inline, virtual]

More details are given in specification of GaValueSet::ClosestValue method.

This method is not thread-safe.

Implements Chromosome::Representation::GaValueSet< T >.

template<typename T>
virtual const T& GACALL Chromosome::Representation::GaCombinedValueSet< T >::ClosestValue ( const T &  value  )  const [inline, virtual]

More details are given in specification of GaValueSet::ClosestValue method.

This method is not thread-safe.

Implements Chromosome::Representation::GaValueSet< T >.

template<typename T>
void GACALL Chromosome::Representation::GaCombinedValueSet< T >::Add ( GaValueSet< T > *  set  )  [inline]

Add method inserts new value set.

This method is not thread safe.

Parameters:
set pointer to value set which is going to be added.

template<typename T>
void GACALL Chromosome::Representation::GaCombinedValueSet< T >::Remove ( GaValueSet< T > *  set  )  [inline]

Remove method removes specified value set.

This method is not thread-safe.

Parameters:
set pointer to value set which should be removed.

template<typename T>
void GACALL Chromosome::Representation::GaCombinedValueSet< T >::Remove ( int  pos  )  [inline]

Remove method removes value set at specified position.

This method is not thread-safe.

Parameters:
pos position of the value set which is going to be removed.

template<typename T>
int GACALL Chromosome::Representation::GaCombinedValueSet< T >::GetNumberOfSets (  )  const [inline]

This method is not thread safe.

Returns:
Method returns number of value sets in this combined value set.

template<typename T>
GaValueSet<T>& GACALL Chromosome::Representation::GaCombinedValueSet< T >::operator[] ( int  pos  )  const [inline]

operator [] returns reference to value set at specified position.

This operator is not thread-safe.

Parameters:
pos position of value set.
Returns:
Operator returns reference to value set at specified position.


Member Data Documentation

template<typename T>
vector<GaValueSet<T>*> Chromosome::Representation::GaCombinedValueSet< T >::_sets [private]

Array of value sets.


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

Genetic Algorithm Library
Coolsoft Software Development