lio.crossover.contchain
Class BLXAlphaCrossover

java.lang.Object
  extended by lio.crossover.contchain.BLXAlphaCrossover
All Implemented Interfaces:
LiOResource, Crossover

public class BLXAlphaCrossover
extends java.lang.Object
implements Crossover

Implements the BLX-Alpha crossover operator for chains of reals.


Constructor Summary
BLXAlphaCrossover()
          Creates a new instance of BLXAlpha
 
Method Summary
 Individual[] cross(Individual parent1, Individual parent2)
          Crosses two individuals.
 double getAlpha()
          Getter for property alpha.
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object which holds the name and all parameters that describe the resource.
 int getSizeOffSpring()
           
static void main(java.lang.String[] args)
          Main class that allows testing the class.
 void setAlpha(double alpha)
          Setter for property alpha.
 void setSizeOffSpring(int sizeOffSpring)
          Setter for property sizeOffSpring.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BLXAlphaCrossover

public BLXAlphaCrossover()
Creates a new instance of BLXAlpha

Method Detail

getSizeOffSpring

public int getSizeOffSpring()
Specified by:
getSizeOffSpring in interface Crossover
Returns:
The size of the offspring produced by the operator.

getDefinition

public LiOResourceDefinition getDefinition()
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.

setSizeOffSpring

public void setSizeOffSpring(int sizeOffSpring)
Setter for property sizeOffSpring.

Parameters:
sizeOffSpring - New value of property sizeOffSpring.

getAlpha

public double getAlpha()
Getter for property alpha.

Returns:
Value of property alpha.

setAlpha

public void setAlpha(double alpha)
Setter for property alpha.

Parameters:
alpha - New value of property alpha.

cross

public Individual[] cross(Individual parent1,
                          Individual parent2)
Crosses two individuals.

Specified by:
cross in interface Crossover
Parameters:
parent1 - First parent
parent2 - Second parent
Returns:
An array of individuals containing the offspring.

main

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

Parameters:
args - Arguments passed by command line