|
||||||||||
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.SelectIntersection
SelectIntersection
is a SelectionAlgorithm
that will return the intersection of the results of two specified
SelectionAlgorithm
s.
Constructor Summary | |
SelectIntersection(SelectionAlgorithm first,
SelectionAlgorithm second)
Creates a new SelectIntersection object for taking the
intersection of the Population s returned by the two
passed SelectionAlgorithm s. |
Method Summary | |
Population |
selectFromPopulation(Population pop)
Returns a Population that represents the intersection
(disjunction) of the two SelectionAlgorithm s specified in
the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SelectIntersection(SelectionAlgorithm first, SelectionAlgorithm second)
SelectIntersection
object for taking the
intersection of the Population
s returned by the two
passed SelectionAlgorithm
s.
first
- the first SelectionAlgorithm
second
- the second SelectionAlgorithm
Method Detail |
public Population selectFromPopulation(Population pop)
Population
that represents the intersection
(disjunction) of the two SelectionAlgorithm
s specified in
the constructor. The return is the result of the first selection
algorithm with all but the results of the second removed from it via
Population.removeAllCellsBut()
method.
If the first selection algorithm returns a null
then a
NullPointerException
will be thrown. If the second one
returns a null
, the the results of the first will be
returned unchanged.
selectFromPopulation
in interface SelectionAlgorithm
pop
- the Population
to choose from
Population
of the two selection algorithms
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |