#include <D:/Temp/vs/gal/source/ValueSets.h>
Public Member Functions | |
GaValueIntervalBounds (const T &lower, const T &higher) | |
This constructor initializes bounds with user-defined values. Bounds are automatically sorted. | |
GaValueIntervalBounds () | |
This constructor creates undefined bounds. | |
const T &GACALL | GetLowerBound () const |
This method is not thread-safe. | |
const T &GACALL | GetHigherBound () const |
This method is not thread-safe. | |
void GACALL | GetBounds (T &lower, T &higher) |
GetBounds method returns both bounds. | |
void GACALL | SetLowerBound (const T &lower) |
SetLowerBound method sets new lower bound. If new value for lower bound is higher then higher bound, call is ignored. | |
void GACALL | SetHigherBound (const T &higher) |
SetHigherBound method sets new higher bound. If new value for higher bound is lower then lower bound, call is ignored. | |
void GACALL | SetBounds (const T &lower, const T &higher) |
SetBound method sets both bounds. Bounds are automatically sorted. | |
bool GACALL | InBounds (const T &value) const |
InBounds method checks value to see if it is in bounds of the interval. | |
Private Attributes | |
T | _lower |
Lower bound. | |
T | _higher |
Higher bound. |
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.
T | type of bounds. This type must support operators >, >=, < and <=. |
Chromosome::Representation::GaValueIntervalBounds< T >::GaValueIntervalBounds | ( | const T & | lower, | |
const T & | higher | |||
) | [inline] |
This constructor initializes bounds with user-defined values. Bounds are automatically sorted.
lower | value of lower bound. | |
higher | value of higher bound. |
Chromosome::Representation::GaValueIntervalBounds< T >::GaValueIntervalBounds | ( | ) | [inline] |
This constructor creates undefined bounds.
const T& GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetLowerBound | ( | ) | const [inline] |
This method is not thread-safe.
const T& GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetHigherBound | ( | ) | const [inline] |
This method is not thread-safe.
void GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetBounds | ( | T & | lower, | |
T & | higher | |||
) | [inline] |
GetBounds
method returns both bounds.
This method is not thread-safe.
lower | reference to variable to which lower bound is going to be stored. | |
higher | reference to variable to which higher bound is going to be stored. |
void GACALL Chromosome::Representation::GaValueIntervalBounds< T >::SetLowerBound | ( | const T & | lower | ) | [inline] |
SetLowerBound
method sets new lower bound. If new value for lower bound is higher then higher bound, call is ignored.
This method is not thread-safe.
lower | new value for lower bound. |
void GACALL Chromosome::Representation::GaValueIntervalBounds< T >::SetHigherBound | ( | const T & | higher | ) | [inline] |
SetHigherBound
method sets new higher bound. If new value for higher bound is lower then lower bound, call is ignored.
This method is not thread-safe.
higher | new value for higher bound. |
void GACALL Chromosome::Representation::GaValueIntervalBounds< T >::SetBounds | ( | const T & | lower, | |
const T & | higher | |||
) | [inline] |
SetBound
method sets both bounds. Bounds are automatically sorted.
This method is not thread-safe.
lower | new value for lower bound. | |
higher | new value for higher bound. |
bool GACALL Chromosome::Representation::GaValueIntervalBounds< T >::InBounds | ( | const T & | value | ) | const [inline] |
InBounds
method checks value to see if it is in bounds of the interval.
This method is not thread-safe.
value | value which is checked. |
true
if value is in bound, otherwise it returns false
.
T Chromosome::Representation::GaValueIntervalBounds< T >::_lower [private] |
Lower bound.
T Chromosome::Representation::GaValueIntervalBounds< T >::_higher [private] |
Higher bound.