Chromosome::Representation::GaBit Class Reference

This class is used by GaBinaryChromosome class for extracting of single values from chromosome's code and other manipulation on chromosome's code. More...

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

Inherits Chromosome::Representation::GaCodeValue.

List of all members.

Public Member Functions

virtual void GACALL Initialize ()
 Detailed description can be found in specification of GaCodeValue::Initialize.
virtual void GACALL FromBuffer (const GaCodeValuesBuffer &buffer, int pos)
 Detailed description can be found in specification of GaCodeValue::FromBuffer.
 GaBit (bool state)
 This constructor initializes bit with user-defined state.
 GaBit ()
 This constructor initializes bit with random state. It calls Initialize method.
bool GACALL GetBitState () const
 This method is not thread-safe.
void GACALL SetBitState (bool state)
 SetBitState method sets state of the bit.

Private Attributes

bool _bitState
 This attribute stores state of the bit.


Detailed Description

This class is used by GaBinaryChromosome class for extracting of single values from chromosome's code and other manipulation on chromosome's code.

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.


Constructor & Destructor Documentation

Chromosome::Representation::GaBit::GaBit ( bool  state  )  [inline]

This constructor initializes bit with user-defined state.

Parameters:
state state of the bit.

Chromosome::Representation::GaBit::GaBit (  )  [inline]

This constructor initializes bit with random state. It calls Initialize method.


Member Function Documentation

virtual void GACALL Chromosome::Representation::GaBit::Initialize (  )  [inline, virtual]

Detailed description can be found in specification of GaCodeValue::Initialize.

Implements Chromosome::Representation::GaCodeValue.

virtual void GACALL Chromosome::Representation::GaBit::FromBuffer ( const GaCodeValuesBuffer buffer,
int  pos 
) [inline, virtual]

Detailed description can be found in specification of GaCodeValue::FromBuffer.

Implements Chromosome::Representation::GaCodeValue.

bool GACALL Chromosome::Representation::GaBit::GetBitState (  )  const [inline]

This method is not thread-safe.

Returns:
Method returns state of bit.

void GACALL Chromosome::Representation::GaBit::SetBitState ( bool  state  )  [inline]

SetBitState method sets state of the bit.

This method is not thread-safe.

Parameters:
state new state.


Member Data Documentation

This attribute stores state of the bit.


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

Genetic Algorithm Library
Coolsoft Software Development