edu.udo.cs.yale.operator.features.construction
Class ConstantGeneration

java.lang.Object
  extended by edu.udo.cs.yale.operator.features.IndividualOperator
      extended by edu.udo.cs.yale.operator.features.construction.ConstantGeneration
All Implemented Interfaces:
PopulationOperator

public class ConstantGeneration
extends IndividualOperator

This PopulationOperator generates new random constant attributes in an individual's example table.

Version:
$Id: ConstantGeneration.java,v 1.1 2006/04/14 13:07:13 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  double prob
          The probability for generating new constants.
private  RandomGenerator random
           
 
Constructor Summary
ConstantGeneration(double prob, RandomGenerator random)
          Creates a new constant generator.
 
Method Summary
 java.util.List<Individual> operate(Individual individual)
          Subclasses must implement this method providing a list of new individuals.
 
Methods inherited from class edu.udo.cs.yale.operator.features.IndividualOperator
operate, performOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prob

private double prob
The probability for generating new constants.


random

private RandomGenerator random
Constructor Detail

ConstantGeneration

public ConstantGeneration(double prob,
                          RandomGenerator random)
Creates a new constant generator.

Method Detail

operate

public java.util.List<Individual> operate(Individual individual)
                                   throws java.lang.Exception
Description copied from class: IndividualOperator
Subclasses must implement this method providing a list of new individuals. individual will be removed from the population so it might be useful to return a list of size 1 containing only the modified individual. If the original individual should also be part of the new population it must also be added to the result list.

Specified by:
operate in class IndividualOperator
Throws:
java.lang.Exception



Copyright © 2001-2006