#include <SortedParameterScorePairList.h>
Public Member Functions | |
SortedParameterScorePairList () | |
Creates an empty instance of this class. | |
SortedParameterScorePairList (SortedParameterScorePairList &SPSL) | |
Createsan instance of this class which is equal to another instance. | |
int | size () |
Gets the number of elements in this list. | |
void | add (const ParameterScorePair &PSP) |
Adds a new ParameterScorePair to this list. | |
ParameterScorePair | get (int i) |
Gets the ith element. | |
void | clear () |
Remove all elements from this list. | |
void | resize (int newsize) |
This will change the size of the list. | |
void | operator= (const SortedParameterScorePairList &SPSL) |
Sets two objects equal to one another. | |
Private Attributes | |
list< ParameterScorePair > | PSPList |
Definition at line 27 of file SortedParameterScorePairList.h.
SortedParameterScorePairList::SortedParameterScorePairList | ( | ) |
Creates an empty instance of this class.
Definition at line 15 of file SortedParameterScorePairList.cpp.
SortedParameterScorePairList::SortedParameterScorePairList | ( | SortedParameterScorePairList & | SPSL | ) |
Createsan instance of this class which is equal to another instance.
SPSL | this object to which this one will be made equal. |
Definition at line 19 of file SortedParameterScorePairList.cpp.
References PSPList.
int SortedParameterScorePairList::size | ( | ) |
Gets the number of elements in this list.
Definition at line 24 of file SortedParameterScorePairList.cpp.
References PSPList.
Referenced by CKGeneticAlgorithm1::selectParent().
void SortedParameterScorePairList::add | ( | const ParameterScorePair & | PSP | ) |
Adds a new ParameterScorePair to this list.
PSP | new element to add to this list. |
Definition at line 29 of file SortedParameterScorePairList.cpp.
References PSPList.
Referenced by CKGeneticAlgorithm1::generateNewPopulation(), and CKGeneticAlgorithm1::initializePopulation().
ParameterScorePair SortedParameterScorePairList::get | ( | int | i | ) |
Gets the ith element.
i | index of the element to return. |
Definition at line 35 of file SortedParameterScorePairList.cpp.
References PSPList.
Referenced by CKGeneticAlgorithm1::generateNewPopulation(), and CKGeneticAlgorithm1::optimize().
void SortedParameterScorePairList::clear | ( | ) |
Remove all elements from this list.
Definition at line 55 of file SortedParameterScorePairList.cpp.
References PSPList.
Referenced by CKGeneticAlgorithm1::initializePopulation().
void SortedParameterScorePairList::resize | ( | int | newsize | ) |
This will change the size of the list.
If the new size is less than the current size, we will save the best elements since the list is sorted.
Definition at line 60 of file SortedParameterScorePairList.cpp.
References PSPList.
Referenced by CKGeneticAlgorithm1::generateNewPopulation().
void SortedParameterScorePairList::operator= | ( | const SortedParameterScorePairList & | SPSL | ) |
Sets two objects equal to one another.
SPSL | object to set this object equal to. |
Definition at line 65 of file SortedParameterScorePairList.cpp.
References PSPList.
list<ParameterScorePair> SortedParameterScorePairList::PSPList [private] |
Definition at line 85 of file SortedParameterScorePairList.h.
Referenced by add(), clear(), get(), operator=(), resize(), size(), and SortedParameterScorePairList().