lio.generators.bitchain
Class PseudoRandomGenerator

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

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

This class generates chains of bits randomly.


Constructor Summary
PseudoRandomGenerator()
           
 
Method Summary
 Individual[] generate(int nIndividuals)
          Creates individuals.
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object with the information of each object.
 long getSeed()
           
 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 setSeed(long seed)
           
 void setSize(int pSize)
          Set the size of the individuals which are going to be created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PseudoRandomGenerator

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

setSize

public void setSize(int pSize)
Set the size of the individuals which are going to be created.

Parameters:
pSize - Size 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.


getSeed

public long getSeed()
Returns:
Returns the seed.

setSeed

public void setSeed(long seed)
Parameters:
seed - The seed to set.