function
Class BasicDifferentiableScalarFunction

java.lang.Object
  extended by function.BasicScalarFunction
      extended by function.BasicDifferentiableScalarFunction
All Implemented Interfaces:
Computable, ScalarDifferentiableFunction, ScalarFunction

public abstract class BasicDifferentiableScalarFunction
extends BasicScalarFunction
implements ScalarDifferentiableFunction

A BasicScalarFunction that contains another function, the gradient of the original function. Subclasses need to write an implementation of gradient function in, for instance, the static block, or write an inner class and initialize it in BasicScalarFunction.init().

Author:
dgorur

Field Summary
protected static VectorFunction gradient
           
 
Fields inherited from class function.BasicScalarFunction
DEFAULT_BOUNDS, DEFAULT_DIM, VALUE_OUTSIDE_BOUNDS
 
Constructor Summary
BasicDifferentiableScalarFunction()
           
 
Method Summary
 VectorFunction getGradient()
          Returns the gradient function.
 
Methods inherited from class function.BasicScalarFunction
checkDimensions, compute, compute, compute, compute, compute, compute, getBounds, getInputDimension, getOutputDimension, init, isWithinBounds, makeBounds, quickCompute, quickCompute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface function.ScalarFunction
compute, compute, compute, compute, init, quickCompute, quickCompute
 
Methods inherited from interface function.Computable
compute, compute, getBounds, getInputDimension, getOutputDimension, isWithinBounds
 

Field Detail

gradient

protected static VectorFunction gradient
Constructor Detail

BasicDifferentiableScalarFunction

public BasicDifferentiableScalarFunction()
Method Detail

getGradient

public VectorFunction getGradient()
Description copied from interface: ScalarDifferentiableFunction
Returns the gradient function.

Specified by:
getGradient in interface ScalarDifferentiableFunction
Returns:
the gradient function for this ScalarFunction.