Class SQPObj
- All Implemented Interfaces:
MultivariateFunction
SQPProblem objective function under the
TwiceDifferentiableFunction abstraction used by SQP optimizers.
This wrapper delegates objective evaluations and gradient computations to
the underlying SQPProblem implementation. The Hessian is currently
not provided and returns null, allowing SQP solvers to supply their
own Hessian approximation (e.g. via BFGS or other quasi-Newton strategies).
Instances of this class are typically constructed internally by SQP
optimizers when processing OptimizationData supplied by users.
- Since:
- 4.1
-
Constructor Summary
ConstructorsConstructorDescriptionSQPObj(SQPProblem problem) Creates an adapter exposing the objective of anSQPProbleminstance through theTwiceDifferentiableFunctionAPI. -
Method Summary
Modifier and TypeMethodDescriptionintdim()Returns the dimensionality of the function domain.gradient(RealVector rv) Returns the gradient of this function at (x)hessian(RealVector rv) The Hessian of this function at (x)doublevalue(RealVector rv) Returns the value of this function at (x)Methods inherited from class org.hipparchus.optim.nonlinear.vector.constrained.TwiceDifferentiableFunction
gradient, hessian, value
-
Constructor Details
-
SQPObj
Creates an adapter exposing the objective of anSQPProbleminstance through theTwiceDifferentiableFunctionAPI.- Parameters:
problem- SQP formulation from which objective data are obtained
-
-
Method Details
-
dim
public int dim()Returns the dimensionality of the function domain. If dim() returns (n) then this function expects an n-vector as its input.Delegates to
SQPProblem.getdim().- Specified by:
dimin classTwiceDifferentiableFunction- Returns:
- the expected dimension of the function's domain
-
value
Returns the value of this function at (x)Delegates to
SQPProblem.getObjectiveEvaluation(RealVector).- Specified by:
valuein classTwiceDifferentiableFunction- Parameters:
rv- a point to evaluate this function at.- Returns:
- the value of this function at (x)
-
gradient
Returns the gradient of this function at (x)Delegates to
SQPProblem.getObjectiveGradient(RealVector).- Specified by:
gradientin classTwiceDifferentiableFunction- Parameters:
rv- a point to evaluate this gradient at- Returns:
- the gradient of this function at (x)
-
hessian
The Hessian of this function at (x)Returns
nullbecauseSQPProblemdoes not define second-order information. SQP methods typically compute Hessian approximations internally (e.g. BFGS, SR1, etc.).- Specified by:
hessianin classTwiceDifferentiableFunction- Parameters:
rv- a point to evaluate this Hessian at- Returns:
- always
null
-