lio.generators.contchain
Class RandomGenerator

java.lang.Object
  extended by lio.generators.contchain.RandomGenerator
All Implemented Interfaces:
LiODependentResource, LiOResource, Generator

public class RandomGenerator
extends java.lang.Object
implements Generator, LiODependentResource

This class generates chains of double randomly.


Constructor Summary
RandomGenerator()
           
 
Method Summary
 Individual[] generate(int nIndividuals)
          Creates individuals.
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object with the information of each object.
 int getSize()
          Getter for property size.
 void getTaskInformation(LiOTask task)
          Extracts information of the task necessary to create individuals.
static void main(java.lang.String[] args)
          Main class to test the class.
 void setBounds(ContChainBounds bounds)
          Fixes the range of values for individuals and their size.
 void setSize(int size)
          Setter for property size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomGenerator

public RandomGenerator()
Method Detail

getTaskInformation

public void getTaskInformation(LiOTask task)
Extracts information of the task necessary to create individuals.

Specified by:
getTaskInformation in interface LiODependentResource
Parameters:
task - Task which defines size of the created individuals.

setBounds

public void setBounds(ContChainBounds bounds)
Fixes the range of values for individuals and their size.

Parameters:
bounds - Object containing the description of the individuals.

generate

public Individual[] generate(int nIndividuals)
Creates individuals.

Specified by:
generate in interface Generator
Parameters:
nIndividuals - Number of individual that must be created.
Returns:
an array of individuals.

getDefinition

public LiOResourceDefinition getDefinition()
Return a LiOResDescription object with the information of each object. That object holds the name and all parameters that describe the object

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

main

public static void main(java.lang.String[] args)
Main class to test the class.


getSize

public int getSize()
Getter for property size.

Returns:
Value of property size.

setSize

public void setSize(int size)
Setter for property size.

Parameters:
size - New value of property size.