Class RotationCountPhaseTracker

java.lang.Object
org.drip.numerical.fourier.RotationCountPhaseTracker

public class RotationCountPhaseTracker
extends java.lang.Object
RotationCountPhaseTracker implements the standard technique to preserve the trajectory along the principal branch in multi-valued complex operations. This is most common in Fourier inversion quadrature runs.



Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int APPLY_BACKWARD
    APPLY_BACKWARD - Decrement Rotation Count
    static int APPLY_FORWARD
    APPLY_FORWARD - Increment Rotation Count
    static int APPLY_NONE
    APPLY_NONE - Do not Apply Rotation Count
  • Constructor Summary

    Constructors
    Constructor Description
    RotationCountPhaseTracker()
    Empty RotationCountPhaseTracker constructor - Initialize to "NO ROTATION COUNT"
  • Method Summary

    Modifier and Type Method Description
    int getDirection()
    Get the Direction on which the rotation count is to be applied
    double getPreviousPhase()
    Get the Previous Phase
    boolean setDirection​(int iRotationDirection)
    Set the Direction on which the rotation count is to be applied
    boolean setPreviousPhase​(double dblPreviousPhase)
    Set the Previous Phase
    double updateAndApply​(double dblCurrentPhase, boolean bApply)
    Apply the Rotation Count Adjustment in accordance with the direction, (optionally) record the previous phase.

    Methods inherited from class java.lang.Object

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

    • APPLY_NONE

      public static final int APPLY_NONE
      APPLY_NONE - Do not Apply Rotation Count
      See Also:
      Constant Field Values
    • APPLY_BACKWARD

      public static final int APPLY_BACKWARD
      APPLY_BACKWARD - Decrement Rotation Count
      See Also:
      Constant Field Values
    • APPLY_FORWARD

      public static final int APPLY_FORWARD
      APPLY_FORWARD - Increment Rotation Count
      See Also:
      Constant Field Values
  • Constructor Details

    • RotationCountPhaseTracker

      public RotationCountPhaseTracker()
      Empty RotationCountPhaseTracker constructor - Initialize to "NO ROTATION COUNT"
  • Method Details

    • setDirection

      public boolean setDirection​(int iRotationDirection)
      Set the Direction on which the rotation count is to be applied
      Parameters:
      iRotationDirection - The Rotation Direction
      Returns:
      TRUE - Successfully set
    • getDirection

      public int getDirection()
      Get the Direction on which the rotation count is to be applied
      Returns:
      The Rotation Direction
    • setPreviousPhase

      public boolean setPreviousPhase​(double dblPreviousPhase)
      Set the Previous Phase
      Parameters:
      dblPreviousPhase - The Previous Phase
      Returns:
      TRUE - Previous Phase Successfully set
    • getPreviousPhase

      public double getPreviousPhase()
      Get the Previous Phase
      Returns:
      The Previous Phase
    • updateAndApply

      public double updateAndApply​(double dblCurrentPhase, boolean bApply) throws java.lang.Exception
      Apply the Rotation Count Adjustment in accordance with the direction, (optionally) record the previous phase.
      Parameters:
      dblCurrentPhase - The Phase to be Updated
      bApply - TRUE - Record the Previous Phase
      Returns:
      The Updated Phase
      Throws:
      java.lang.Exception - Thrown if the Operation cannot be performed