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 doubleabs()Retrieve the Absolute ValueC1Cartesianadd(C1Cartesian cartesianC1)Add the Input Cartesian C1 to the current Instancedoubleargument()Retrieve the ArgumentC1Cartesianconjugate()Compute Conjugate of the Complex Numberjava.lang.Stringdisplay()Display the Real/Imaginary ContentsC1Cartesiandivide(C1Cartesian cartesianC1)Divide the Current Instance by the Input Cartesian C1doubledotProduct(C1Cartesian other)Dot Product of with the "Other"C1Cartesianexponentiate()Exponentiate the Complex Numberstatic C1CartesianFromPolar(double r, double theta)Construct the Complex Number from its Polar Representationdoubleimaginary()Retrieve the Imaginary Partdoublel2Norm()Retrieve the L2 NormC1Cartesianlogarithm()Compute Logarithm of the Complex Numberdoublemodulus()Retrieve the ModulusC1Cartesianproduct(C1Cartesian cartesianC1)Multiply the Input Cartesian C1 with the current Instancedoublereal()Retrieve the Real PartC1Cartesianscale(double scale)Scale the Complex Number with the factorC1Cartesianscale(C1Cartesian scale)Scale the Complex Number with the factorC1Cartesiansquare()Compute the Square of the Complex NumberC1CartesiansquareRoot()Compute the Square Root of the Complex NumberC1Cartesiansubtract(C1Cartesian cartesianC1)Subtract the Input Cartesian C1 from the current Instancestatic C1CartesianUnitImaginary()Construct a Unit Imaginary Complex Numberstatic C1CartesianUnitReal()Construct a Unit Real Complex Numberstatic C1CartesianZero()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
-