#include <D:/Temp/vs/gal/source/PopulationOperations.h>
Public Member Functions | |
GAL_API | GaSelectionResultSet (int selectionSize, const GaPopulation *population) |
This constructor initializes sorted group of result set which stores selected chromosomes. | |
~GaSelectionResultSet () | |
Destructor frees memory used by sorted group which stores selected chromosomes. | |
GaSortedGroup &GACALL | SelectedGroup () const |
This method is not thread-safe. | |
GaChromosomePtr GACALL | GetAt (int pos) const |
GetAt method returns smart pointer to chromosomes at given position in result set. | |
GaChromosomePtr GACALL | operator[] (int pos) const |
operator [] returns smart pointer to chromosomes at given position in result set. | |
Protected Attributes | |
GaSortedGroup * | _selectedGroup |
Pointer to sorted group which contains indices of selected chromosomes. |
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.
Population::GaSelectionResultSet::GaSelectionResultSet | ( | int | selectionSize, | |
const GaPopulation * | population | |||
) |
This constructor initializes sorted group of result set which stores selected chromosomes.
selectionSize | number of chromosomes which can be stored by sorted group. | |
population | pointer to population on which selection is performed. |
Population::GaSelectionResultSet::~GaSelectionResultSet | ( | ) | [inline] |
Destructor frees memory used by sorted group which stores selected chromosomes.
GaSortedGroup& GACALL Population::GaSelectionResultSet::SelectedGroup | ( | ) | const [inline] |
This method is not thread-safe.
GaChromosomePtr GACALL Population::GaSelectionResultSet::GetAt | ( | int | pos | ) | const [inline] |
GetAt
method returns smart pointer to chromosomes at given position in result set.
This method is not thread safe.
pos | position of chromosomes in result set. |
GaChromosomePtr GACALL Population::GaSelectionResultSet::operator[] | ( | int | pos | ) | const [inline] |
operator []
returns smart pointer to chromosomes at given position in result set.
This operator is not thread safe.
pos | position of chromosomes in result set. |
Pointer to sorted group which contains indices of selected chromosomes.