net.sourceforge.cilib.coevolution.selection
Class SelectNOpponentSelectionStrategy

java.lang.Object
  extended by net.sourceforge.cilib.coevolution.selection.OpponentSelectionStrategy
      extended by net.sourceforge.cilib.coevolution.selection.SelectNOpponentSelectionStrategy
All Implemented Interfaces:
Serializable, Cloneable

public class SelectNOpponentSelectionStrategy
extends OpponentSelectionStrategy

Select N random opponents from the pool of competitors

Author:
Julien Duhain, leo
See Also:
Serialized Form

Field Summary
protected  int numberOfOpponents
           
protected  RandomNumber random
           
 
Fields inherited from class net.sourceforge.cilib.coevolution.selection.OpponentSelectionStrategy
ownPopulationID, selectFromOwnPopulation
 
Constructor Summary
SelectNOpponentSelectionStrategy()
           
SelectNOpponentSelectionStrategy(SelectNOpponentSelectionStrategy copy)
           
 
Method Summary
 OpponentSelectionStrategy getClone()
          Create a cloned copy of the current object and return it.
 int getNumberOfOpponents()
           
 CoevolutionCompetitorList selectCompetitors(CoevolutionCompetitorList pool)
          Select opponents from the pool
 void setNumberOfOpponents(int numberOfOpponents)
           
 
Methods inherited from class net.sourceforge.cilib.coevolution.selection.OpponentSelectionStrategy
addPoolSelectionStrategy, clearPoolSelectionStrategies, setCompetitors, setOwnPopulationID, setSelectFromOwnPopulation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfOpponents

protected int numberOfOpponents

random

protected RandomNumber random
Constructor Detail

SelectNOpponentSelectionStrategy

public SelectNOpponentSelectionStrategy()

SelectNOpponentSelectionStrategy

public SelectNOpponentSelectionStrategy(SelectNOpponentSelectionStrategy copy)
Method Detail

getClone

public OpponentSelectionStrategy getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class OpponentSelectionStrategy
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

selectCompetitors

public CoevolutionCompetitorList selectCompetitors(CoevolutionCompetitorList pool)
Select opponents from the pool

Specified by:
selectCompetitors in class OpponentSelectionStrategy
Parameters:
pool - the pool of potential opponents
Returns:
the selected opponents

getNumberOfOpponents

public int getNumberOfOpponents()

setNumberOfOpponents

public void setNumberOfOpponents(int numberOfOpponents)


Copyright © 2009 CIRG. All Rights Reserved.