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:
  • Bisection
  • False Position
  • Quadratic
  • Inverse Quadratic
  • Ridder

It may be readily enhanced to accommodate additional primitives.

Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int BISECTION
    Bisection
    static int FALSE_POSITION
    False Position
    static int INVERSE_QUADRATIC_INTERPOLATION
    Inverse Quadratic Interpolation
    static int QUADRATIC_INTERPOLATION
    Quadratic Interpolation
    static 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 bisection
    static double FalsePosition​(double dblX1, double dblX2, double dblY1, double dblY2)
    Iterate for the next variate using false position
    static double InverseQuadraticInterpolation​(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
    Iterate for the next variate using inverse quadratic interpolation
    static 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 method
    static double QuadraticInterpolation​(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
    Iterate for the next variate using quadratic interpolation
    static double Ridder​(double dblX1, double dblX2, double dblX3, double dblY1, double dblY2, double dblY3)
    Iterate for the next variate using Ridder's method

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BISECTION

      public static int BISECTION
      Bisection
    • FALSE_POSITION

      public static int FALSE_POSITION
      False Position
    • QUADRATIC_INTERPOLATION

      public static int QUADRATIC_INTERPOLATION
      Quadratic Interpolation
    • INVERSE_QUADRATIC_INTERPOLATION

      public static int INVERSE_QUADRATIC_INTERPOLATION
      Inverse Quadratic Interpolation
    • RIDDER

      public static int RIDDER
      Ridder's Method
  • Constructor Details

    • VariateIteratorPrimitive

      public VariateIteratorPrimitive()
  • Method Details

    • Bisection

      public static final double Bisection​(double dblX1, double dblX2) throws java.lang.Exception
      Iterate for the next variate using bisection
      Parameters:
      dblX1 - Left variate
      dblX2 - 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.Exception
      Iterate for the next variate using false position
      Parameters:
      dblX1 - Left variate
      dblX2 - Right variate
      dblY1 - Left OF value
      dblY2 - 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.Exception
      Iterate for the next variate using quadratic interpolation
      Parameters:
      dblX1 - Left variate
      dblX2 - Intermediate variate
      dblX3 - Right variate
      dblY1 - Left OF value
      dblY2 - Intermediate OF value
      dblY3 - 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.Exception
      Iterate for the next variate using inverse quadratic interpolation
      Parameters:
      dblX1 - Left variate
      dblX2 - Intermediate variate
      dblX3 - Right variate
      dblY1 - Left OF value
      dblY2 - Intermediate OF value
      dblY3 - 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.Exception
      Iterate for the next variate using Ridder's method
      Parameters:
      dblX1 - Left variate
      dblX2 - Intermediate variate
      dblX3 - Right variate
      dblY1 - Left OF value
      dblY2 - Intermediate OF value
      dblY3 - 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.Exception
      Iterate for the next variate using the multi-function method
      Parameters:
      dblX1 - Left variate
      dblX2 - Intermediate variate
      dblX3 - Right variate
      dblY1 - Left OF value
      dblY2 - Intermediate OF value
      dblY3 - Right OF value
      of - Objective Function
      dblOFTarget - OF Target
      rfop - Root Finder Output
      Returns:
      The next variate
      Throws:
      java.lang.Exception - Thrown if inputs are invalid