org.ddogleg.optimization.wrap
Class CachedGradientLineFunction
- java.lang.Object
-
- org.ddogleg.optimization.wrap.CachedGradientLineFunction
-
- All Implemented Interfaces:
- CoupledDerivative, CoupledGradient, GradientLineFunction, LineSearchFunction
public class CachedGradientLineFunction extends java.lang.Object implements GradientLineFunction
From separate classes for the function and gradient computations implementsGradientLineFunction. Results are cached until the next time a line set of parameters or line position is specified.
-
-
Constructor Summary
Constructors Constructor and Description CachedGradientLineFunction(FunctionNtoS function, FunctionNtoN gradient)
-
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
-
CachedGradientLineFunction
public CachedGradientLineFunction(FunctionNtoS function, FunctionNtoN gradient)
-
-
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