|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.openai.ai.ga.selection.common.SubsetSelectorAdaptor
SelectionAlgorithm
is a method by which Cell
members are chosen from a Population
for a given purpose
(i.e. mutation).
Constructor Summary | |
SubsetSelectorAdaptor()
|
Method Summary | |
Population |
selectFromPopulation(Population pop)
Creates a Population according to a given algorithm or
rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SubsetSelectorAdaptor()
Method Detail |
public Population selectFromPopulation(Population pop)
Population
according to a given algorithm or
rule. The initial Population
is passed and a selection
from it is chosen and returned.
The Population
passed into the algorithm should not be
be changed by the algorithm, as it receives the original, not a clone
of the original. If a clone is desired, it should be handled inside
the algorithm.
The returned Population
should not be considered crucial
to any internal functions of this implementation of the
SelectionAlgorithm
, since the genetic algorithm may make
changes directly onto this structure and may make the structure
available for others to make changes to. If the structure is needed
internally and such behavior could be detrimental to this
implementation's function, then it is recommended that a shallow
clone be returned via a return new Population(returnPopulation)
rather than a plain return returnPopulation
.
This allows for this additional overhead to be avoided in cases where
it not needed.
selectFromPopulation
in interface SelectionAlgorithm
pop
- the Population
to choose from
Population
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |