org.ddogleg.optimization.wrap
Class CachedNumericalGradientLineFunction
- java.lang.Object
-
- org.ddogleg.optimization.wrap.CachedNumericalGradientLineFunction
-
- All Implemented Interfaces:
- CoupledDerivative, CoupledGradient, GradientLineFunction, LineSearchFunction
public class CachedNumericalGradientLineFunction extends java.lang.Object implements GradientLineFunction
Numerically computes the gradient and line derivative. Results are cached independently for function output, gradient, and line derivative.
-
-
Constructor Summary
Constructors Constructor and Description CachedNumericalGradientLineFunction(FunctionNtoS function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeDerivative()doublecomputeFunction()voidcomputeGradient(double[] gradient)double[]getCurrentState()intgetN()voidsetInput(double x)voidsetInput(double[] x)voidsetLine(double[] start, double[] direction)
-
-
-
Constructor Detail
-
CachedNumericalGradientLineFunction
public CachedNumericalGradientLineFunction(FunctionNtoS function)
-
-
Method Detail
-
setLine
public void setLine(double[] start, double[] direction)- Specified by:
setLinein interfaceLineSearchFunction
-
getCurrentState
public double[] getCurrentState()
- Specified by:
getCurrentStatein interfaceLineSearchFunction
-
setInput
public void setInput(double x)
- Specified by:
setInputin interfaceCoupledDerivative
-
getN
public int getN()
- Specified by:
getNin interfaceCoupledGradient
-
setInput
public void setInput(double[] x)
- Specified by:
setInputin interfaceCoupledGradient
-
computeFunction
public double computeFunction()
- Specified by:
computeFunctionin interfaceCoupledDerivative- Specified by:
computeFunctionin interfaceCoupledGradient
-
computeGradient
public void computeGradient(double[] gradient)
- Specified by:
computeGradientin interfaceCoupledGradient
-
computeDerivative
public double computeDerivative()
- Specified by:
computeDerivativein interfaceCoupledDerivative
-
-
DataMelt 3.0 © DataMelt by jWork.ORG