Chromosome::Representation::GaMultiValueCode Class Reference

GaMultiValueCode interface should be implemented by chromosomes' classes which code contains multiple values. More...

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

Inherited by Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.

List of all members.

Public Member Functions

virtual GaCodeValuesBuffer *GACALL MakeBuffer (int size) const =0
 This method makes new buffer for storing values of chromosomes' codes but doesn't fill it. User is responsible for memory allocated for buffer object.
virtual void GACALL FillBuffer (int pos, int size, GaCodeValuesBuffer &buffer) const =0
 This method copies values of chromosome's code from pos to pos + size into buffer at current buffer's position.
virtual void GACALL FromBuffer (const GaCodeValuesBuffer &buffer)=0
 This method makes chromosome's code and stores it in chromosome form buffer of values.


Detailed Description

GaMultiValueCode interface should be implemented by chromosomes' classes which code contains multiple values.


Member Function Documentation

virtual GaCodeValuesBuffer* GACALL Chromosome::Representation::GaMultiValueCode::MakeBuffer ( int  size  )  const [pure virtual]

This method makes new buffer for storing values of chromosomes' codes but doesn't fill it. User is responsible for memory allocated for buffer object.

Parameters:
size size of buffer (number of values it can store).
Returns:
Method returns pointer to newly created buffer.

Implemented in Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.

virtual void GACALL Chromosome::Representation::GaMultiValueCode::FillBuffer ( int  pos,
int  size,
GaCodeValuesBuffer buffer 
) const [pure virtual]

This method copies values of chromosome's code from pos to pos + size into buffer at current buffer's position.

Parameters:
pos position of the first value which is going to be copied.
size number of values which are going to be copied.
buffer reference to buffer to which values are copied.

Implemented in Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.

virtual void GACALL Chromosome::Representation::GaMultiValueCode::FromBuffer ( const GaCodeValuesBuffer buffer  )  [pure virtual]

This method makes chromosome's code and stores it in chromosome form buffer of values.

Parameters:
buffer reference to buffer which contains values for making chromosome's code.

Implemented in Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.


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

Genetic Algorithm Library
Coolsoft Software Development