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 doubleDEFAULT_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.Solutionsearch(Ceta ceta, double rangeStart, double rangeEnd)Searches the maximal point of a given C(η) function within a given range.CetaMaximizer.Solutionsolve(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:CetaMaximizerSearches the maximal point of a given C(η) function within a given range.- Specified by:
searchin 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:OptimizerSolve an optimization problem, e.g.,OptimProblem.- Specified by:
solvein 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
-
-