org.encog.mathutil
public class ComplexNumber extends Object
Constructor and Description |
---|
ComplexNumber(ComplexNumber other)
Create a complex number from another complex number.
|
ComplexNumber(double u,
double v)
Constructs the complex number z = u + i*v
|
Modifier and Type | Method and Description |
---|---|
double |
arg()
Argument of this Complex number
(the angle in radians with the x-axis in polar coordinates).
|
ComplexNumber |
chs()
Negative of this complex number (chs stands for change sign).
|
ComplexNumber |
conj()
Complex conjugate of this Complex number
(the conjugate of x+i*y is x-i*y).
|
ComplexNumber |
cos()
Cosine of this Complex number (doesn't change this Complex number).
|
ComplexNumber |
cosh()
Hyperbolic cosine of this Complex number
(doesn't change this Complex number).
|
ComplexNumber |
div(ComplexNumber w)
Division of Complex numbers (doesn't change this Complex number).
|
ComplexNumber |
exp()
Complex exponential (doesn't change this Complex number).
|
double |
getImaginary()
Imaginary part of this Complex number
(the y-coordinate in rectangular coordinates).
|
double |
getReal()
Real part of this Complex number
(the x-coordinate in rectangular coordinates).
|
ComplexNumber |
log()
Principal branch of the Complex logarithm of this Complex number.
|
ComplexNumber |
minus(ComplexNumber w)
Subtraction of Complex numbers (doesn't change this Complex number).
|
double |
mod()
Modulus of this Complex number
(the distance from the origin in polar coordinates).
|
ComplexNumber |
plus(ComplexNumber w)
Addition of Complex numbers (doesn't change this Complex number).
|
ComplexNumber |
sin()
Sine of this Complex number (doesn't change this Complex number).
|
ComplexNumber |
sinh()
Hyperbolic sine of this Complex number
(doesn't change this Complex number).
|
ComplexNumber |
sqrt()
Complex square root (doesn't change this complex number).
|
ComplexNumber |
tan()
Tangent of this Complex number (doesn't change this Complex number).
|
ComplexNumber |
times(ComplexNumber w)
Complex multiplication (doesn't change this Complex number).
|
String |
toString()
String representation of this Complex number.
|
public ComplexNumber(double u, double v)
u
- Real partv
- Imaginary partpublic ComplexNumber(ComplexNumber other)
other
- The other complex number.public double getReal()
public double getImaginary()
public double mod()
public double arg()
public ComplexNumber conj()
public ComplexNumber plus(ComplexNumber w)
w
- is the number to add.public ComplexNumber minus(ComplexNumber w)
w
- is the number to subtract.public ComplexNumber times(ComplexNumber w)
w
- is the number to multiply by.public ComplexNumber div(ComplexNumber w)
w
- is the number to divide bypublic ComplexNumber exp()
public ComplexNumber log()
public ComplexNumber sqrt()
public ComplexNumber sin()
public ComplexNumber cos()
public ComplexNumber sinh()
public ComplexNumber cosh()
public ComplexNumber tan()
public ComplexNumber chs()
Copyright © 2014. All Rights Reserved.