Package dev.nm.solver.problem
Class C2OptimProblemImpl
- java.lang.Object
-
- dev.nm.solver.problem.C2OptimProblemImpl
-
- All Implemented Interfaces:
C1
,C2
,C2OptimProblem
,OptimProblem
public class C2OptimProblemImpl extends Object implements C2OptimProblem
This is an optimization problem of a real valued function: \(\max_x f(x)\).
-
-
Constructor Summary
Constructors Constructor Description C2OptimProblemImpl(RealScalarFunction f)
Construct an optimization problem with an objective function.C2OptimProblemImpl(RealScalarFunction f, RealVectorFunction g)
Construct an optimization problem with an objective function.C2OptimProblemImpl(RealScalarFunction f, RealVectorFunction g, RntoMatrix H)
Construct an optimization problem with an objective function.C2OptimProblemImpl(C2OptimProblemImpl that)
Copy Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dimension()
Get the number of variables.RealScalarFunction
f()
Get the objective function.RealVectorFunction
g()
Get the gradient function, g, of a real valued function f.RntoMatrix
H()
Get the Hessian matrix function, H, of a real valued function f.
-
-
-
Constructor Detail
-
C2OptimProblemImpl
public C2OptimProblemImpl(RealScalarFunction f, RealVectorFunction g, RntoMatrix H)
Construct an optimization problem with an objective function.- Parameters:
f
- the objective function to be minimizedg
- the gradient of the objective functionH
- the Hessian of the objective function
-
C2OptimProblemImpl
public C2OptimProblemImpl(RealScalarFunction f, RealVectorFunction g)
Construct an optimization problem with an objective function. This uses a numerical Hessian, if needed.- Parameters:
f
- the objective function to be minimizedg
- the gradient of the objective function
-
C2OptimProblemImpl
public C2OptimProblemImpl(RealScalarFunction f)
Construct an optimization problem with an objective function. This uses a numerical gradient and a numerical Hessian, if needed.- Parameters:
f
- the objective function to be minimized
-
C2OptimProblemImpl
public C2OptimProblemImpl(C2OptimProblemImpl that)
Copy Ctor.- Parameters:
that
- aC2OptimProblemImpl
-
-
Method Detail
-
dimension
public int dimension()
Description copied from interface:OptimProblem
Get the number of variables.- Specified by:
dimension
in interfaceOptimProblem
- Returns:
- the number of variables.
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblem
Get the objective function.- Specified by:
f
in interfaceOptimProblem
- Returns:
- the objective function
-
g
public RealVectorFunction g()
Description copied from interface:C1
Get the gradient function, g, of a real valued function f.
-
H
public RntoMatrix H()
Description copied from interface:C2
Get the Hessian matrix function, H, of a real valued function f.
-
-