net.openai.ai.ga.selection.common
Class SelectComplement

java.lang.Object
  |
  +--net.openai.ai.ga.selection.common.SelectComplement
All Implemented Interfaces:
SelectionAlgorithm

public class SelectComplement
extends java.lang.Object
implements SelectionAlgorithm

SelectComplement is a SelectionAlgorithm that will return the complement of the results of two specified SelectionAlgorithms.

Since:
JDK1.3
Version:
%I%, %G%
Author:
Jared Grubb

Constructor Summary
SelectComplement(SelectionAlgorithm toComplement)
          Creates a new SelectComplement object for taking the complement of the Populations returned by the two passed SelectionAlgorithms.
 
Method Summary
 Population selectFromPopulation(Population pop)
          Returns a Population that represents the complement (disjunction) of the SelectionAlgorithm specified in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectComplement

public SelectComplement(SelectionAlgorithm toComplement)
Creates a new SelectComplement object for taking the complement of the Populations returned by the two passed SelectionAlgorithms.

Parameters:
toComplement - the first SelectionAlgorithm
Method Detail

selectFromPopulation

public Population selectFromPopulation(Population pop)
Returns a Population that represents the complement (disjunction) of the SelectionAlgorithm specified in the constructor. The return is a new Population clone of the specified Population with all results of the selection algorithm removed from it via the Population.removeCells method.

Specified by:
selectFromPopulation in interface SelectionAlgorithm
Parameters:
pop - the Population to choose from
Returns:
the complement Population of the selection algorithm


Copyright - 2001 OpenAI Labs. All Rights Reserved.