Class TwiceDifferentiableFunction
- java.lang.Object
-
- org.hipparchus.optim.nonlinear.vector.constrained.TwiceDifferentiableFunction
-
- All Implemented Interfaces:
MultivariateFunction
- Direct Known Subclasses:
QuadraticFunction
public abstract class TwiceDifferentiableFunction extends Object implements MultivariateFunction
A MultivariateFunction that also has a defined gradient and Hessian.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description TwiceDifferentiableFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
dim()
Returns the dimensionality of the function domain.RealVector
gradient(double[] x)
Returns the gradient of this function at (x)abstract RealVector
gradient(RealVector x)
Returns the gradient of this function at (x)RealMatrix
hessian(double[] x)
The Hessian of this function at (x)abstract RealMatrix
hessian(RealVector x)
The Hessian of this function at (x)double
value(double[] x)
Returns the value of this function at (x)abstract double
value(RealVector x)
Returns the value of this function at (x)
-
-
-
Method Detail
-
dim
public abstract int dim()
Returns the dimensionality of the function domain. If dim() returns (n) then this function expects an n-vector as its input.- Returns:
- the expected dimension of the function's domain
-
value
public abstract double value(RealVector x)
Returns the value of this function at (x)- Parameters:
x
- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-
gradient
public abstract RealVector gradient(RealVector x)
Returns the gradient of this function at (x)- Parameters:
x
- a point to evaluate this gradient at- Returns:
- the gradient of this function at (x)
-
hessian
public abstract RealMatrix hessian(RealVector x)
The Hessian of this function at (x)- Parameters:
x
- a point to evaluate this Hessian at- Returns:
- the Hessian of this function at (x)
-
value
public double value(double[] x)
Returns the value of this function at (x)- Specified by:
value
in interfaceMultivariateFunction
- Parameters:
x
- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-
gradient
public RealVector gradient(double[] x)
Returns the gradient of this function at (x)- Parameters:
x
- a point to evaluate this gradient at- Returns:
- the gradient of this function at (x)
-
hessian
public RealMatrix hessian(double[] x)
The Hessian of this function at (x)- Parameters:
x
- a point to evaluate this Hessian at- Returns:
- the Hessian of this function at (x)
-
-