Package org.drip.numerical.complex
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.
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Numerical Quadrature, Differentiation, Eigenization, Linear Algebra, and Utilities
- Package = Implementation of Complex Number Suite
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description C1Cartesian(double real, double imaginary)
CartesianComplexNumber constructor -
Method Summary
Modifier and Type Method Description double
abs()
Retrieve the Absolute ValueC1Cartesian
add(C1Cartesian cartesianC1)
Add the Input Cartesian C1 to the current Instancedouble
argument()
Retrieve the ArgumentC1Cartesian
conjugate()
Compute Conjugate of the Complex Numberjava.lang.String
display()
Display the Real/Imaginary ContentsC1Cartesian
divide(C1Cartesian cartesianC1)
Divide the Current Instance by the Input Cartesian C1double
dotProduct(C1Cartesian other)
Dot Product of with the "Other"C1Cartesian
exponentiate()
Exponentiate the Complex Numberstatic C1Cartesian
FromPolar(double r, double theta)
Construct the Complex Number from its Polar Representationdouble
imaginary()
Retrieve the Imaginary Partdouble
l2Norm()
Retrieve the L2 NormC1Cartesian
logarithm()
Compute Logarithm of the Complex Numberdouble
modulus()
Retrieve the ModulusC1Cartesian
product(C1Cartesian cartesianC1)
Multiply the Input Cartesian C1 with the current Instancedouble
real()
Retrieve the Real PartC1Cartesian
scale(double scale)
Scale the Complex Number with the factorC1Cartesian
scale(C1Cartesian scale)
Scale the Complex Number with the factorC1Cartesian
square()
Compute the Square of the Complex NumberC1Cartesian
squareRoot()
Compute the Square Root of the Complex NumberC1Cartesian
subtract(C1Cartesian cartesianC1)
Subtract the Input Cartesian C1 from the current Instancestatic C1Cartesian
UnitImaginary()
Construct a Unit Imaginary Complex Numberstatic C1Cartesian
UnitReal()
Construct a Unit Real Complex Numberstatic C1Cartesian
Zero()
Construct a "Zero" Complex NumberMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
C1Cartesian
public C1Cartesian(double real, double imaginary) throws java.lang.ExceptionCartesianComplexNumber constructor- Parameters:
real
- Real Partimaginary
- Imaginary Part- Throws:
java.lang.Exception
- Thrown if the Inputs are invalid
-
-
Method Details
-
FromPolar
Construct the Complex Number from its Polar Representation- Parameters:
r
- rtheta
- theta- Returns:
- Complex Number from its Polar Representation
-
Zero
Construct a "Zero" Complex Number- Returns:
- "Zero" Complex Number
-
UnitReal
Construct a Unit Real Complex Number- Returns:
- Unit Real Complex Number
-
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
Add the Input Cartesian C1 to the current Instance- Parameters:
cartesianC1
- Input Cartesian C1- Returns:
- Output Cartesian C1
-
scale
Scale the Complex Number with the factor- Parameters:
scale
- The Scaling Factor- Returns:
- Output Cartesian C1
-
scale
Scale the Complex Number with the factor- Parameters:
scale
- The Scaling Factor- Returns:
- Output Cartesian C1
-
subtract
Subtract the Input Cartesian C1 from the current Instance- Parameters:
cartesianC1
- Input Cartesian C1- Returns:
- Output Cartesian C1
-
product
Multiply the Input Cartesian C1 with the current Instance- Parameters:
cartesianC1
- Input Cartesian C1- Returns:
- Output Cartesian C1
-
divide
Divide the Current Instance by the Input Cartesian C1- Parameters:
cartesianC1
- Input Cartesian C1- Returns:
- Output Cartesian C1
-
square
Compute the Square of the Complex Number- Returns:
- The Square Complex Number Instance
-
squareRoot
Compute the Square Root of the Complex Number- Returns:
- The Square Root Complex Number Instance
-
exponentiate
Exponentiate the Complex Number- Returns:
- The Exponentiated Complex Number Instance
-
logarithm
Compute Logarithm of the Complex Number- Returns:
- The Complex Number Logarithm Instance
-
dotProduct
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
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
-