|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.mathutil.ComplexNumber
public class ComplexNumber
A complex number class. This class is based on source code by Andrew G. Bennett, Department of Mathematics Kansas State University The original version can be found here: http://www.math.ksu.edu/~bennett/jomacg/c.html
Constructor Summary | |
---|---|
ComplexNumber(ComplexNumber other)
Create a complex number from another complex number. |
|
ComplexNumber(double u,
double v)
Constructs the complex number z = u + i*v |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ComplexNumber(double u, double v)
u
- Real partv
- Imaginary partpublic ComplexNumber(ComplexNumber other)
other
- The other complex number.Method Detail |
---|
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 by
public 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()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |