#include <D:/Temp/vs/gal/source/ValueSets.h>
Inherits Chromosome::Representation::GaValueSet< T >< T >.
Public Member Functions | |
GaSingleValueSet (const T &value, const T &invertedValue, bool viceVersa) | |
This constructor initializes value set with value and its counterpart. | |
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::Belongs method. | |
virtual const T &GACALL | ClosestValue (const T &value) const |
More details are given in specification of GaValueSet::ClosestValue method. | |
const T &GACALL | GetValue () const |
This method is not thread-safe. | |
const T &GACALL | GetInvertedValue () const |
This method is not thread-safe. | |
void GACALL | GetValue (T &original, T &inverted) |
GetValue method returns original value and its counterpart. | |
void GACALL | SetValue (const T &value) |
SetValue method sets original value. | |
void GACALL | SetValue (const T &original, const T &inverted) |
SetValue method sets original value and its counterpart. | |
void GACALL | SetInvertedValue (const T &value) |
SetValue method sets inverted value. | |
Private Attributes | |
T | _value |
Original value of the set. | |
T | _invertedValue |
_value's counterpart (inverted value) in the set. |
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 data in value set. |
Chromosome::Representation::GaSingleValueSet< T >::GaSingleValueSet | ( | const T & | value, | |
const T & | invertedValue, | |||
bool | viceVersa | |||
) | [inline] |
This constructor initializes value set with value and its counterpart.
value | original value. | |
invertedValue | inverted value. | |
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. |
virtual T GACALL Chromosome::Representation::GaSingleValueSet< 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::GaSingleValueSet< 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::GaSingleValueSet< T >::Belongs | ( | const T & | value | ) | const [inline, virtual] |
More details are given in specification of GaValueSet::Belongs method.
This method is not thread-safe.
Implements Chromosome::Representation::GaValueSet< T >.
virtual const T& GACALL Chromosome::Representation::GaSingleValueSet< 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 T& GACALL Chromosome::Representation::GaSingleValueSet< T >::GetValue | ( | ) | const [inline] |
This method is not thread-safe.
const T& GACALL Chromosome::Representation::GaSingleValueSet< T >::GetInvertedValue | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Chromosome::Representation::GaSingleValueSet< T >::GetValue | ( | T & | original, | |
T & | inverted | |||
) | [inline] |
GetValue
method returns original value and its counterpart.
This method is not thread-safe.
original | reference to variable to which original value will be stored. | |
inverted | reference to variable to which inverted value will be stored. |
void GACALL Chromosome::Representation::GaSingleValueSet< T >::SetValue | ( | const T & | value | ) | [inline] |
SetValue
method sets original value.
This method is not thread-safe.
value | new original value. |
void GACALL Chromosome::Representation::GaSingleValueSet< T >::SetValue | ( | const T & | original, | |
const T & | inverted | |||
) | [inline] |
SetValue
method sets original value and its counterpart.
This method is not thread-safe.
original | new original value. | |
inverted | new inverted value. |
void GACALL Chromosome::Representation::GaSingleValueSet< T >::SetInvertedValue | ( | const T & | value | ) | [inline] |
SetValue
method sets inverted value.
This method is not thread-safe.
value | new inverted value. |
T Chromosome::Representation::GaSingleValueSet< T >::_value [private] |
Original value of the set.
T Chromosome::Representation::GaSingleValueSet< T >::_invertedValue [private] |
_value's counterpart (inverted value) in the set.