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 intdimension()Get the number of variables.RealScalarFunctionf()Get the objective function.RealVectorFunctiong()Get the gradient function, g, of a real valued function f.RntoMatrixH()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:OptimProblemGet the number of variables.- Specified by:
dimensionin interfaceOptimProblem- Returns:
- the number of variables.
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblemGet the objective function.- Specified by:
fin interfaceOptimProblem- Returns:
- the objective function
-
g
public RealVectorFunction g()
Description copied from interface:C1Get the gradient function, g, of a real valued function f.
-
H
public RntoMatrix H()
Description copied from interface:C2Get the Hessian matrix function, H, of a real valued function f.
-
-