Package org.drip.numerical.fourier
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.
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Numerical Quadrature, Differentiation, Eigenization, Linear Algebra, and Utilities
- Package = Specific Fourier Transform Functionality - Rotation Counter, Phase Adjuster
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static intAPPLY_BACKWARDAPPLY_BACKWARD - Decrement Rotation Countstatic intAPPLY_FORWARDAPPLY_FORWARD - Increment Rotation Countstatic intAPPLY_NONEAPPLY_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 intgetDirection()Get the Direction on which the rotation count is to be applieddoublegetPreviousPhase()Get the Previous PhasebooleansetDirection(int iRotationDirection)Set the Direction on which the rotation count is to be appliedbooleansetPreviousPhase(double dblPreviousPhase)Set the Previous PhasedoubleupdateAndApply(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_NONEAPPLY_NONE - Do not Apply Rotation Count- See Also:
- Constant Field Values
-
APPLY_BACKWARD
public static final int APPLY_BACKWARDAPPLY_BACKWARD - Decrement Rotation Count- See Also:
- Constant Field Values
-
APPLY_FORWARD
public static final int APPLY_FORWARDAPPLY_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.ExceptionApply the Rotation Count Adjustment in accordance with the direction, (optionally) record the previous phase.- Parameters:
dblCurrentPhase- The Phase to be UpdatedbApply- TRUE - Record the Previous Phase- Returns:
- The Updated Phase
- Throws:
java.lang.Exception- Thrown if the Operation cannot be performed
-