Class BrentCetaMaximizer
- java.lang.Object
-
- tech.nmfin.portfoliooptimization.lai2010.ceta.maximizer.BrentCetaMaximizer
-
- All Implemented Interfaces:
Optimizer<Ceta,CetaMaximizer.Solution>
,CetaMaximizer
public class BrentCetaMaximizer extends Object implements CetaMaximizer
Searches for the maximal point of C(η) by Brent's method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tech.nmfin.portfoliooptimization.lai2010.ceta.maximizer.CetaMaximizer
CetaMaximizer.NegCetaFunction, CetaMaximizer.Solution
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_EPSILON
-
Constructor Summary
Constructors Constructor Description BrentCetaMaximizer()
Constructs a maximizer using the default epsilon (for the Brent's search algorithm).BrentCetaMaximizer(double epsilon)
Constructs a maximizer with a given ε (for the Brent's search algorithm).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CetaMaximizer.Solution
search(Ceta ceta, double rangeStart, double rangeEnd)
Searches the maximal point of a given C(η) function within a given range.CetaMaximizer.Solution
solve(Ceta ceta)
Solve an optimization problem, e.g.,OptimProblem
.
-
-
-
Field Detail
-
DEFAULT_EPSILON
public static final double DEFAULT_EPSILON
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BrentCetaMaximizer
public BrentCetaMaximizer(double epsilon)
Constructs a maximizer with a given ε (for the Brent's search algorithm).- Parameters:
epsilon
- ε
-
BrentCetaMaximizer
public BrentCetaMaximizer()
Constructs a maximizer using the default epsilon (for the Brent's search algorithm).
-
-
Method Detail
-
search
public CetaMaximizer.Solution search(Ceta ceta, double rangeStart, double rangeEnd)
Description copied from interface:CetaMaximizer
Searches the maximal point of a given C(η) function within a given range.- Specified by:
search
in interfaceCetaMaximizer
- Parameters:
ceta
- the C(η) functionrangeStart
- the start of the rangerangeEnd
- the end of the range- Returns:
- the maximal point
-
solve
public CetaMaximizer.Solution solve(Ceta ceta) throws Exception
Description copied from interface:Optimizer
Solve an optimization problem, e.g.,OptimProblem
.- Specified by:
solve
in interfaceOptimizer<Ceta,CetaMaximizer.Solution>
- Parameters:
ceta
- an optimization problem- Returns:
- a solution to the optimization problem
- Throws:
Exception
- when there is an error solving the problem
-
-