Class C1Cartesian

java.lang.Object
org.drip.numerical.complex.C1Cartesian

public class C1Cartesian
extends java.lang.Object
C1Cartesian implements the functionality for dealing with the Cartesian Form of Complex Numbers.



Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • C1Cartesian

      public C1Cartesian​(double real, double imaginary) throws java.lang.Exception
      CartesianComplexNumber constructor
      Parameters:
      real - Real Part
      imaginary - Imaginary Part
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
  • Method Details

    • FromPolar

      public static final C1Cartesian FromPolar​(double r, double theta)
      Construct the Complex Number from its Polar Representation
      Parameters:
      r - r
      theta - theta
      Returns:
      Complex Number from its Polar Representation
    • Zero

      public static final C1Cartesian Zero()
      Construct a "Zero" Complex Number
      Returns:
      "Zero" Complex Number
    • UnitReal

      public static final C1Cartesian UnitReal()
      Construct a Unit Real Complex Number
      Returns:
      Unit Real Complex Number
    • UnitImaginary

      public static final C1Cartesian UnitImaginary()
      Construct a Unit Imaginary Complex Number
      Returns:
      Unit Imaginary Complex Number
    • real

      public double real()
      Retrieve the Real Part
      Returns:
      The Real Part
    • imaginary

      public double imaginary()
      Retrieve the Imaginary Part
      Returns:
      The Imaginary Part
    • modulus

      public double modulus()
      Retrieve the Modulus
      Returns:
      The Modulus
    • l2Norm

      public double l2Norm()
      Retrieve the L2 Norm
      Returns:
      The L2 Norm
    • abs

      public double abs()
      Retrieve the Absolute Value
      Returns:
      The Absolute Value
    • argument

      public double argument()
      Retrieve the Argument
      Returns:
      The Argument
    • add

      public C1Cartesian add​(C1Cartesian cartesianC1)
      Add the Input Cartesian C1 to the current Instance
      Parameters:
      cartesianC1 - Input Cartesian C1
      Returns:
      Output Cartesian C1
    • scale

      public C1Cartesian scale​(double scale)
      Scale the Complex Number with the factor
      Parameters:
      scale - The Scaling Factor
      Returns:
      Output Cartesian C1
    • scale

      public C1Cartesian scale​(C1Cartesian scale)
      Scale the Complex Number with the factor
      Parameters:
      scale - The Scaling Factor
      Returns:
      Output Cartesian C1
    • subtract

      public C1Cartesian subtract​(C1Cartesian cartesianC1)
      Subtract the Input Cartesian C1 from the current Instance
      Parameters:
      cartesianC1 - Input Cartesian C1
      Returns:
      Output Cartesian C1
    • product

      public C1Cartesian product​(C1Cartesian cartesianC1)
      Multiply the Input Cartesian C1 with the current Instance
      Parameters:
      cartesianC1 - Input Cartesian C1
      Returns:
      Output Cartesian C1
    • divide

      public C1Cartesian divide​(C1Cartesian cartesianC1)
      Divide the Current Instance by the Input Cartesian C1
      Parameters:
      cartesianC1 - Input Cartesian C1
      Returns:
      Output Cartesian C1
    • square

      public C1Cartesian square()
      Compute the Square of the Complex Number
      Returns:
      The Square Complex Number Instance
    • squareRoot

      public C1Cartesian squareRoot()
      Compute the Square Root of the Complex Number
      Returns:
      The Square Root Complex Number Instance
    • exponentiate

      public C1Cartesian exponentiate()
      Exponentiate the Complex Number
      Returns:
      The Exponentiated Complex Number Instance
    • logarithm

      public C1Cartesian logarithm()
      Compute Logarithm of the Complex Number
      Returns:
      The Complex Number Logarithm Instance
    • dotProduct

      public double dotProduct​(C1Cartesian other) throws java.lang.Exception
      Dot Product of with the "Other"
      Parameters:
      other - "Other" C1
      Returns:
      The Dot Product
      Throws:
      java.lang.Exception - Thrown if the Dot Product Cannot be computed
    • conjugate

      public C1Cartesian conjugate()
      Compute Conjugate of the Complex Number
      Returns:
      The Complex Number Conjugate Instance
    • display

      public java.lang.String display()
      Display the Real/Imaginary Contents
      Returns:
      The Real/Imaginary Contents