|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.complex
public class complex
Implementation of complex numbers
This is a reasonably well featured complex number implementation. Several complex versions of transcendental functions are also implemented here. Created by Michael Rule on Mon Jul 05 2004.
Field Summary | |
---|---|
static float |
e
|
static complex |
E
|
static complex |
I
|
float |
imag
|
static complex |
PHI
|
static float |
pi
|
static complex |
PI
|
float |
real
|
static float |
two_pi
|
Constructor Summary | |
---|---|
complex()
initializes zero as a complex number |
|
complex(complex n)
Initializes a new complex number as complex number n |
|
complex(float Real)
initializes a duoble as a complex number |
|
complex(float Real,
float Imag)
Initializes a new complex number with real part Real and imagenary part Imag |
|
complex(java.lang.String data)
attempts to parse a new complex number from a string |
Method Summary | |
---|---|
static complex |
abs(complex num)
|
static complex |
acos(complex num)
the inverse cosine of a complex number |
static complex |
acosh(complex num)
|
static complex |
acot(complex num)
|
static complex |
acoth(complex num)
|
static complex |
acsc(complex num)
|
static complex |
acsch(complex num)
|
static float |
arg(complex num)
this returns the angle made between the +real axis and the line drawn from the complex number real,imag to the origin |
static complex |
asec(complex num)
|
static complex |
asech(complex num)
|
static complex |
asin(complex num)
the arcsin of a complex number |
static complex |
asinh(complex num)
|
static complex |
atan(complex num)
the arctangent of a complex number |
static complex |
atanh(complex num)
|
static complex |
conj(complex num)
|
static complex |
cos(complex num)
this returns the cosine of a complex number, also complex |
static complex |
cosh(complex num)
|
static float |
cosh(float n)
the hyperbolic cos of a float |
static complex |
cot(complex num)
This returns the cotangent of a complex number, also complex |
static complex |
coth(complex num)
|
static complex |
csc(complex num)
This returns the cosecant of a complex number, also complex |
static complex |
csch(complex num)
|
complex |
devidedBy(complex n)
This devides two complex numbers and returns a complex quotient |
static complex |
eToThe(complex num)
This takes e to the complex power |
static complex |
factorial(complex num)
this computes n! in complex terms.. |
static complex |
fromPolar(float r,
float theta)
|
static complex |
integer(complex num)
grabs the integer part of the real an imagenary parts |
static complex |
ln(complex num)
This takes the natural log of a complex number |
complex |
log(complex base)
This returns the log of given complex base of the complex number |
complex |
log(float base)
This returns a log of given real base of the complex number |
complex |
minus(complex n)
This subtracts two complex numbers and returns a complex difference |
static float |
mod(complex num)
this returns the complex modulus, the distance between complex number real,imag and the origin |
static complex |
oneOver(complex num)
this takes the recipricol of a complex number |
complex |
over(complex n)
another name for devidedBy |
static complex |
parseComplex(java.lang.String data)
attempts to parse a complex number from a string |
complex |
plus(complex n)
This adds two complex numbers and returns a comples sum |
complex |
rotate(float degrees)
|
static complex |
round(complex num)
|
float |
rSquared()
This returns the i value squared plus the r value squared, a very common calculation |
complex |
scale(float scalar)
This multiplies the complex number by a scalar |
static complex |
sec(complex num)
This returns the secant of a complex number, also complex |
static complex |
sech(complex num)
|
void |
setComplex(float Real,
float Imag)
this will reset both parts of the complex number at once |
static complex |
sign(complex num)
|
static int |
sign(float n)
|
static int |
sign2(float n)
|
static complex |
sin(complex num)
This returns sine of a complex number, also complex |
static complex |
sinh(complex num)
|
static float |
sinh(float n)
the hyperbolic sin of a float |
static complex |
sqrt(complex num)
This finds the first square root of the complex number |
complex |
squared()
This squares a complex number (faster than this.toThe(2)) |
static complex |
tan(complex num)
This returns the tangent of a complex number, also complex |
static complex |
tanh(complex num)
|
static float |
tanh(float n)
the hyperbolic tan of a float |
complex |
times(complex n)
This multiplies two complex numbers and returns a complex product |
complex |
timesI()
This multiplis the complex number by +i |
java.lang.String |
toString()
creates a string representation of the complex number |
complex |
toThe(complex n)
This takes one complex number to a complex power and returns a complex |
complex |
toThe(float n)
This takes the complex base to the given real power (a+bi)^# |
static complex |
zeta(complex z)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static float e
public static float pi
public static float two_pi
public static complex I
public static complex E
public static complex PI
public static complex PHI
public float real
public float imag
Constructor Detail |
---|
public complex(float Real, float Imag)
Real
- Imag
- public complex(complex n)
n
- public complex(float Real)
Real
- public complex()
public complex(java.lang.String data)
data
- Method Detail |
---|
public static complex fromPolar(float r, float theta)
r
- theta
-
public static int sign(float n)
n
-
public static int sign2(float n)
n
-
public static complex sqrt(complex num)
num
-
public static complex oneOver(complex num)
num
-
public static complex sin(complex num)
num
-
public static complex cos(complex num)
num
-
public static complex tan(complex num)
num
-
public static complex csc(complex num)
num
-
public static complex sec(complex num)
num
-
public static complex cot(complex num)
num
-
public static complex atan(complex num)
num
-
public static complex asin(complex num)
num
-
public static complex acos(complex num)
num
-
public static complex acsc(complex num)
num
-
public static complex asec(complex num)
num
-
public static complex acot(complex num)
num
-
public static complex sinh(complex num)
num
-
public static complex cosh(complex num)
num
-
public static complex tanh(complex num)
num
-
public static complex csch(complex num)
num
-
public static complex sech(complex num)
num
-
public static complex coth(complex num)
num
-
public static complex asinh(complex num)
num
-
public static complex acosh(complex num)
num
-
public static complex atanh(complex num)
num
-
public static complex acsch(complex num)
num
-
public static complex asech(complex num)
num
-
public static complex acoth(complex num)
num
-
public static complex conj(complex num)
num
-
public static complex sign(complex num)
num
-
public static complex abs(complex num)
num
-
public static complex round(complex num)
num
-
public complex rotate(float degrees)
degrees
-
public static complex integer(complex num)
num
-
public static float sinh(float n)
n
-
public static float cosh(float n)
n
-
public static float tanh(float n)
n
-
public static complex eToThe(complex num)
num
-
public static complex ln(complex num)
num
-
public static complex factorial(complex num)
num
-
public static complex parseComplex(java.lang.String data)
data
-
public java.lang.String toString()
toString
in class java.lang.Object
public void setComplex(float Real, float Imag)
Real
- Imag
- public static float mod(complex num)
num
-
public static float arg(complex num)
num
-
public float rSquared()
public complex scale(float scalar)
scalar
-
public complex devidedBy(complex n)
n
-
public complex over(complex n)
n
-
public complex times(complex n)
n
-
public complex minus(complex n)
n
-
public complex plus(complex n)
n
-
public complex toThe(complex n)
n
-
public complex toThe(float n)
n
-
public complex squared()
public complex log(float base)
base
-
public complex log(complex base)
base
-
public complex timesI()
public static complex zeta(complex z)
z
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |