com.rubecula.darwin.domain.fitness
Class FitnessFunction_ScaledNormal

java.lang.Object
  extended by com.rubecula.darwin.foundation.Function_
      extended by com.rubecula.darwin.domain.fitness.FitnessFunction_
          extended by com.rubecula.darwin.domain.fitness.FitnessFunction_ScaledNormal
All Implemented Interfaces:
FitnessFunction, Function, com.rubecula.jexpression.EvalExpression, com.rubecula.jexpression.EvalExpressionMutable, com.rubecula.jexpression.Valuable, net.sf.tostring0.Identifiable

public class FitnessFunction_ScaledNormal
extends FitnessFunction_

Lifespan: permanent. This class implements an approximate normal distribution but it is scaled so that the value at the mean is unity rather than the area under the entire curve being unit. To be honest, I'm not sure whether this has a sound mathematical basis for use in evolutionary computations but I'm using it for now.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.foundation.Function_
evaluator, LOG
 
Fields inherited from interface com.rubecula.darwin.domain.helper.FitnessFunction
PREFIX_VAR_RPN, VAR_SHAPE_FACTOR, VAR_TARGET, VAR_VALUE
 
Constructor Summary
FitnessFunction_ScaledNormal()
           
FitnessFunction_ScaledNormal(com.rubecula.jexpression.Evaluator evaluator)
           
 
Method Summary
 java.lang.String getIdentifier()
           
protected  double standardFunction(java.lang.Object... arguments)
           
protected  java.lang.CharSequence[] standardFunctionTokens(com.rubecula.jexpression.Notation notation)
           
 
Methods inherited from class com.rubecula.darwin.domain.fitness.FitnessFunction_
getFitness
 
Methods inherited from class com.rubecula.darwin.foundation.Function_
addListener, addSymbol, equals, evaluate, getErrorInfo, getEvaluator, getExpression, getExpressionMap, getExpressionTerms, getValue, hashCode, isDifferent, isMutable, normalDistributionDensityFunction, normalDistributionDensityFunctionScaled, onFunctionChange, removeVariable, reset, setEvaluator, setExpression, setExpression
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitnessFunction_ScaledNormal

public FitnessFunction_ScaledNormal()

FitnessFunction_ScaledNormal

public FitnessFunction_ScaledNormal(com.rubecula.jexpression.Evaluator evaluator)
Parameters:
evaluator -
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Returns:
"Fitness function: scaled normal distribution"
See Also:
Identifiable.getIdentifier()

standardFunction

protected double standardFunction(java.lang.Object... arguments)
                           throws FunctionException
Specified by:
standardFunction in class Function_
Parameters:
arguments - these arguments must be, in order,
  1. Number: value
  2. Number: mean
  3. Number: standard deviation

Note that we do not protect against cast exceptions.
Returns:
result of invoking Function_.normalDistributionDensityFunctionScaled(double, double, double) .
Throws:
FunctionException - XXX
See Also:
Function_.standardFunction(Object[])

standardFunctionTokens

protected java.lang.CharSequence[] standardFunctionTokens(com.rubecula.jexpression.Notation notation)
Specified by:
standardFunctionTokens in class Function_
Parameters:
notation - the notation type used by the evaluator.
Returns:
the sequence of tokens that corresponds to the Function_.standardFunction(Object...). This is called by Function_.reset().
See Also:
Function_.standardFunctionTokens(Notation)


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.