Package org.drip.function.r1tor1solver
Class VariateIteratorPrimitive
java.lang.Object
org.drip.function.r1tor1solver.VariateIteratorPrimitive
public class VariateIteratorPrimitive
extends java.lang.Object
VariateIteratorPrimitive implements the various Primitive Variate Iterator routines.
VariateIteratorPrimitive implements the following iteration primitives:
It may be readily enhanced to accommodate additional primitives.
- Bisection
- False Position
- Quadratic
- Inverse Quadratic
- Ridder
It may be readily enhanced to accommodate additional primitives.
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd To Rd Function Analysis
- Package = Built-in R1 To R1 Solvers
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
BISECTION
Bisectionstatic int
FALSE_POSITION
False Positionstatic int
INVERSE_QUADRATIC_INTERPOLATION
Inverse Quadratic Interpolationstatic int
QUADRATIC_INTERPOLATION
Quadratic Interpolationstatic int
RIDDER
Ridder's Method -
Constructor Summary
Constructors Constructor Description VariateIteratorPrimitive()
-
Method Summary
Modifier and Type Method Description static double
Bisection(double dblX1, double dblX2)
Iterate for the next variate using bisectionstatic double
FalsePosition(double dblX1, double dblX2, double dblY1, double dblY2)
Iterate for the next variate using false positionstatic double
InverseQuadraticInterpolation(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
Iterate for the next variate using inverse quadratic interpolationstatic double
MultiFunction(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3, R1ToR1 of, double dblOFTarget, FixedPointFinderOutput rfop)
Iterate for the next variate using the multi-function methodstatic double
QuadraticInterpolation(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
Iterate for the next variate using quadratic interpolationstatic double
Ridder(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
Iterate for the next variate using Ridder's methodMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
BISECTION
public static int BISECTIONBisection -
FALSE_POSITION
public static int FALSE_POSITIONFalse Position -
QUADRATIC_INTERPOLATION
public static int QUADRATIC_INTERPOLATIONQuadratic Interpolation -
INVERSE_QUADRATIC_INTERPOLATION
public static int INVERSE_QUADRATIC_INTERPOLATIONInverse Quadratic Interpolation -
RIDDER
public static int RIDDERRidder's Method
-
-
Constructor Details
-
VariateIteratorPrimitive
public VariateIteratorPrimitive()
-
-
Method Details
-
Bisection
public static final double Bisection(double dblX1, double dblX2) throws java.lang.ExceptionIterate for the next variate using bisection- Parameters:
dblX1
- Left variatedblX2
- Right variate- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
FalsePosition
public static final double FalsePosition(double dblX1, double dblX2, double dblY1, double dblY2) throws java.lang.ExceptionIterate for the next variate using false position- Parameters:
dblX1
- Left variatedblX2
- Right variatedblY1
- Left OF valuedblY2
- Right OF value- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
QuadraticInterpolation
public static final double QuadraticInterpolation(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3) throws java.lang.ExceptionIterate for the next variate using quadratic interpolation- Parameters:
dblX1
- Left variatedblX2
- Intermediate variatedblX3
- Right variatedblY1
- Left OF valuedblY2
- Intermediate OF valuedblY3
- Right OF value- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
InverseQuadraticInterpolation
public static final double InverseQuadraticInterpolation(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3) throws java.lang.ExceptionIterate for the next variate using inverse quadratic interpolation- Parameters:
dblX1
- Left variatedblX2
- Intermediate variatedblX3
- Right variatedblY1
- Left OF valuedblY2
- Intermediate OF valuedblY3
- Right OF value- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
Ridder
public static final double Ridder(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3) throws java.lang.ExceptionIterate for the next variate using Ridder's method- Parameters:
dblX1
- Left variatedblX2
- Intermediate variatedblX3
- Right variatedblY1
- Left OF valuedblY2
- Intermediate OF valuedblY3
- Right OF value- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
MultiFunction
public static final double MultiFunction(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3, R1ToR1 of, double dblOFTarget, FixedPointFinderOutput rfop) throws java.lang.ExceptionIterate for the next variate using the multi-function method- Parameters:
dblX1
- Left variatedblX2
- Intermediate variatedblX3
- Right variatedblY1
- Left OF valuedblY2
- Intermediate OF valuedblY3
- Right OF valueof
- Objective FunctiondblOFTarget
- OF Targetrfop
- Root Finder Output- Returns:
- The next variate
- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-