SortedParameterScorePairList Class Reference

A sorted list of ParameterScorePair objects where the objects are ordered in an increasing order. More...

#include <SortedParameterScorePairList.h>

List of all members.

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< ParameterScorePairPSPList


Detailed Description

A sorted list of ParameterScorePair objects where the objects are ordered in an increasing order.

Definition at line 27 of file SortedParameterScorePairList.h.


Constructor & Destructor Documentation

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.

Parameters:
SPSL this object to which this one will be made equal.

Definition at line 19 of file SortedParameterScorePairList.cpp.

References PSPList.


Member Function Documentation

int SortedParameterScorePairList::size (  ) 

Gets the number of elements in this list.

Returns:
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.

Parameters:
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.

Parameters:
i index of the element to return.
Returns:
the ith element of the list.

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.

Parameters:
SPSL object to set this object equal to.

Definition at line 65 of file SortedParameterScorePairList.cpp.

References PSPList.


Member Data Documentation


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

Generated on Sat Jul 5 16:14:07 2008 for QMcBeaver by  doxygen 1.5.6