#include <D:/Temp/vs/gal/source/ValueSets.h>
Inherits Chromosome::Representation::GaValueSet< T >< T >.
Public Member Functions | |
GaIntervalValueSet (const GaValueIntervalBounds< T > &values, const GaValueIntervalBounds< T > &invertedValues, GaRandom< T > *randomGenerator, bool viceVersa) | |
This constructor initializes value set with bounds and random generator. | |
GaIntervalValueSet (GaRandom< T > *randomGenerator) | |
This constructor initializes value set with random generator, but doesn't define bounds of intervals. | |
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. | |
const GaValueIntervalBounds< T > &GACALL | GetValueBounds () const |
This method is not thread-safe. | |
void GACALL | SetValueBounds (const GaValueIntervalBounds< T > &bounds) |
SetValueBounds method sets bounds of interval of original values. | |
const GaValueIntervalBounds< T > &GACALL | GetInvertedValueBounds () const |
This method is not thread-safe. | |
void GACALL | SetInvertedValueBounds (const GaValueIntervalBounds< T > &bounds) |
SetInvertedValueBounds method sets bounds of interval of inverted values. | |
void GACALL | GetBounds (GaValueIntervalBounds< T > &originals, GaValueIntervalBounds< T > &inverted) const |
GetBounds method returns bounds of both intervals. | |
void GACALL | SetBounds (const GaValueIntervalBounds< T > &originals, const GaValueIntervalBounds< T > &inverted) |
SetBounds method sets bounds of both intervals. | |
Private Attributes | |
GaValueIntervalBounds< T > | _values |
Bounds of interval of original values. | |
GaValueIntervalBounds< T > | _invertedValues |
Bounds of interval of inverted values. | |
GaRandom< T > * | _randomGenerator |
This attribute is pointer to random generator which is used for generating of random values within interval. |
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.
T | type of bounds. This type must support operators >, >=, < and <=. |
Chromosome::Representation::GaIntervalValueSet< T >::GaIntervalValueSet | ( | const GaValueIntervalBounds< T > & | values, | |
const GaValueIntervalBounds< T > & | invertedValues, | |||
GaRandom< T > * | randomGenerator, | |||
bool | viceVersa | |||
) | [inline] |
This constructor initializes value set with bounds and random generator.
values | bounds of interval of original values. | |
invertedValues | bounds of interval of inverted values. | |
randomGenerator | pointer to random generator. | |
viceVersa | if this parameter is set to true , inverted values are treated as members of the set, if it is set to false , inverted values are not treated as members of the set. |
Chromosome::Representation::GaIntervalValueSet< T >::GaIntervalValueSet | ( | GaRandom< T > * | randomGenerator | ) | [inline] |
This constructor initializes value set with random generator, but doesn't define bounds of intervals.
randomGenerator | pointer to random generator. |
virtual T GACALL Chromosome::Representation::GaIntervalValueSet< 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 >.
virtual bool GACALL Chromosome::Representation::GaIntervalValueSet< 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 >.
virtual bool GACALL Chromosome::Representation::GaIntervalValueSet< 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 >.
virtual const T& GACALL Chromosome::Representation::GaIntervalValueSet< 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 >.
const GaValueIntervalBounds<T>& GACALL Chromosome::Representation::GaIntervalValueSet< T >::GetValueBounds | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Chromosome::Representation::GaIntervalValueSet< T >::SetValueBounds | ( | const GaValueIntervalBounds< T > & | bounds | ) | [inline] |
SetValueBounds
method sets bounds of interval of original values.
This method is not thread-safe.
bounds | new bound of interval. |
const GaValueIntervalBounds<T>& GACALL Chromosome::Representation::GaIntervalValueSet< T >::GetInvertedValueBounds | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Chromosome::Representation::GaIntervalValueSet< T >::SetInvertedValueBounds | ( | const GaValueIntervalBounds< T > & | bounds | ) | [inline] |
SetInvertedValueBounds
method sets bounds of interval of inverted values.
This method is not thread-safe.
bounds | new bound of interval. |
void GACALL Chromosome::Representation::GaIntervalValueSet< T >::GetBounds | ( | GaValueIntervalBounds< T > & | originals, | |
GaValueIntervalBounds< T > & | inverted | |||
) | const [inline] |
GetBounds
method returns bounds of both intervals.
This method is not thread-safe.
originals | reference to variable to which bounds of original values are stored. | |
inverted | reference to variable to which bounds of inverted values are stored. |
void GACALL Chromosome::Representation::GaIntervalValueSet< T >::SetBounds | ( | const GaValueIntervalBounds< T > & | originals, | |
const GaValueIntervalBounds< T > & | inverted | |||
) | [inline] |
SetBounds
method sets bounds of both intervals.
This method is not thread-safe.
originals | new bounds of interval of original values. | |
inverted | new bounds of interval of inverted values. |
GaValueIntervalBounds<T> Chromosome::Representation::GaIntervalValueSet< T >::_values [private] |
Bounds of interval of original values.
GaValueIntervalBounds<T> Chromosome::Representation::GaIntervalValueSet< T >::_invertedValues [private] |
Bounds of interval of inverted values.
GaRandom<T>* Chromosome::Representation::GaIntervalValueSet< T >::_randomGenerator [private] |
This attribute is pointer to random generator which is used for generating of random values within interval.