| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlio.selectors.RouleteWheelSelector
public class RouleteWheelSelector
This class implements the roulete wheel sampling to select some individuals from a population.
| Constructor Summary | |
|---|---|
RouleteWheelSelector()
 | 
|
| Method Summary | |
|---|---|
 LiOResourceDefinition | 
getDefinition()
Return a LiOResDescription object which holds the name and all parameters that describe the resource.  | 
 boolean | 
isRanking()
Getter for property ranking.  | 
static void | 
main(java.lang.String[] args)
Main class that allows testing the class.  | 
 double[] | 
rankingSelection(Individual[] individuals)
Returns a vector containing probabilities for each individual assigned by ranking  | 
 Individual[] | 
select(Individual[] individuals,
       int number)
Returns an array of individuals selected from those passed as parameter.  | 
 void | 
setRanking(boolean ranking)
Setter for property ranking.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RouleteWheelSelector()
| Method Detail | 
|---|
public Individual[] select(Individual[] individuals,
                           int number)
select in interface Selectorindividuals - set of individualsnumber - number of individual that must be selected
public LiOResourceDefinition getDefinition()
getDefinition in interface LiOResourcepublic double[] rankingSelection(Individual[] individuals)
public boolean isRanking()
public void setRanking(boolean ranking)
ranking - New value of property ranking.public static void main(java.lang.String[] args)
args - Arguments passed by command line
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||