Package org.drip.function.r1tor1solver
Class ExecutionControl
java.lang.Object
org.drip.function.r1tor1solver.ExecutionControl
public class ExecutionControl
extends java.lang.Object
ExecutionControl implements the core fixed point search execution control and customization
functionality.
ExecutionControl is used for a) calculating the absolute tolerance, and b) determining whether the OF has reached the goal.
ExecutionControl determines the execution termination using its ExecutionControlParams instance.
ExecutionControl is used for a) calculating the absolute tolerance, and b) determining whether the OF has reached the goal.
ExecutionControl determines the execution termination using its ExecutionControlParams instance.
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd To Rd Function Analysis
- Package = Built-in R1 To R1 Solvers
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description ExecutionControl(R1ToR1 of, ExecutionControlParams ecp)
ExecutionControl constructor -
Method Summary
Modifier and Type Method Description double
calcAbsoluteOFTolerance(double dblOFInitial)
Calculate the absolute OF tolerance using the initial OF valuedouble
calcAbsoluteVariateConvergence(double dblInitialVariate)
Calculate the absolute variate convergence amount using the initial variateint
getNumIterations()
Retrieve the Number of Iterationsboolean
hasOFReachedGoal(double dblAbsoluteTolerance, double dblOF, double dblOFGoal)
Check to see if the OF has reached the goalboolean
isVariateConvergenceCheckEnabled()
Indicate if the variate convergence check has been turned onMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExecutionControl
ExecutionControl constructor- Parameters:
of
- Objective Functionecp
- Execution Control Parameters- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
-
Method Details
-
getNumIterations
public int getNumIterations()Retrieve the Number of Iterations- Returns:
- Number of solver iterations
-
calcAbsoluteOFTolerance
public double calcAbsoluteOFTolerance(double dblOFInitial) throws java.lang.ExceptionCalculate the absolute OF tolerance using the initial OF value- Parameters:
dblOFInitial
- Initial OF Value- Returns:
- The absolute OF Tolerance
- Throws:
java.lang.Exception
- Thrown if absolute tolerance cannot be calculated
-
calcAbsoluteVariateConvergence
public double calcAbsoluteVariateConvergence(double dblInitialVariate) throws java.lang.ExceptionCalculate the absolute variate convergence amount using the initial variate- Parameters:
dblInitialVariate
- Initial Variate- Returns:
- The Absolute Variate Convergence Amount
- Throws:
java.lang.Exception
- Thrown if Absolute Variate Convergence Amount cannot be calculated
-
hasOFReachedGoal
public boolean hasOFReachedGoal(double dblAbsoluteTolerance, double dblOF, double dblOFGoal) throws java.lang.ExceptionCheck to see if the OF has reached the goal- Parameters:
dblAbsoluteTolerance
- Absolute TolerancedblOF
- OF ValuedblOFGoal
- OF Goal- Returns:
- TRUE - If the OF has reached the goal
- Throws:
java.lang.Exception
- Thrown if the inputs are invalid
-
isVariateConvergenceCheckEnabled
public boolean isVariateConvergenceCheckEnabled()Indicate if the variate convergence check has been turned on- Returns:
- TRUE - Variate convergence check has been turned on
-