lio.selectors
Class TruncationSelection

java.lang.Object
  extended by lio.selectors.TruncationSelection
All Implemented Interfaces:
LiOResource, Selector

public class TruncationSelection
extends java.lang.Object
implements Selector

This class selects the best individuals in an array.


Constructor Summary
TruncationSelection()
           
 
Method Summary
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object which holds the name and all parameters that describe the resource.
static void main(java.lang.String[] args)
          Main class that allows testing the class.
 Individual[] select(Individual[] individuals, int number)
          Returns an array of individuals selected from those passed as parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TruncationSelection

public TruncationSelection()
Method Detail

select

public Individual[] select(Individual[] individuals,
                           int number)
Returns an array of individuals selected from those passed as parameter.

Specified by:
select in interface Selector
Parameters:
individuals - set of individuals
number - number of individual that must be selected
Returns:
selected individuals

getDefinition

public LiOResourceDefinition getDefinition()
Description copied from interface: LiOResource
Return a LiOResDescription object which holds the name and all parameters that describe the resource.

Specified by:
getDefinition in interface LiOResource
Returns:
A definition of the resource.

main

public static void main(java.lang.String[] args)
Main class that allows testing the class.

Parameters:
args - Arguments passed by command line