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

This template class represents bounds of interval value set. More...

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

List of all members.

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

_lower
 Lower bound.
_higher
 Higher bound.


Detailed Description

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

This template class represents bounds of interval value set.

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:
T type of bounds. This type must support operators >, >=, < and <=.

Constructor & Destructor Documentation

template<typename T>
Chromosome::Representation::GaValueIntervalBounds< T >::GaValueIntervalBounds ( const T &  lower,
const T &  higher 
) [inline]

This constructor initializes bounds with user-defined values. Bounds are automatically sorted.

Parameters:
lower value of lower bound.
higher value of higher bound.

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

This constructor creates undefined bounds.


Member Function Documentation

template<typename T>
const T& GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetLowerBound (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns lower bound.

template<typename T>
const T& GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetHigherBound (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns higher bound.

template<typename T>
void GACALL Chromosome::Representation::GaValueIntervalBounds< T >::GetBounds ( T &  lower,
T &  higher 
) [inline]

GetBounds method returns both bounds.

This method is not thread-safe.

Parameters:
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.

template<typename T>
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.

Parameters:
lower new value for lower bound.

template<typename T>
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.

Parameters:
higher new value for higher bound.

template<typename T>
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.

Parameters:
lower new value for lower bound.
higher new value for higher bound.

template<typename T>
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.

Parameters:
value value which is checked.
Returns:
Method returns true if value is in bound, otherwise it returns false.


Member Data Documentation

template<typename T>
T Chromosome::Representation::GaValueIntervalBounds< T >::_lower [private]

Lower bound.

template<typename T>
T Chromosome::Representation::GaValueIntervalBounds< T >::_higher [private]

Higher bound.


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

Genetic Algorithm Library
Coolsoft Software Development