GaMultiValueCode interface should be implemented by chromosomes' classes which code contains multiple values.
More...
#include <source/RepresentationInterfaces.h>
Inherited by Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.
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. | |
GaMultiValueCode interface should be implemented by chromosomes' classes which code contains multiple values.
| 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.
| size | size of buffer (number of values it can store). |
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.
| 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.
| buffer | reference to buffer which contains values for making chromosome's code. |
Implemented in Chromosome::Representation::GaBinaryChromosome, and Chromosome::Representation::GaMultiValueChromosome< TYPE >.