|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.oregondsp.signalProcessing.filter.iir.Complex
public class Complex
Class to represent complex numbers and certain basic functions of complex numbers.
Constructor Summary | |
---|---|
Complex(double real)
Instantiates a new complex number object from a real number (imaginary part is zero). |
|
Complex(double real,
double imag)
Instantiates a new complex number object. |
Method Summary | |
---|---|
double |
abs()
Computes the absolute value of this Complex number. |
static double |
abs(Complex c)
Computes the absolute value of a complex number. |
static Complex |
add(Complex c1,
Complex c2)
Adds two complex numbers. |
static Complex |
add(Complex c,
double a)
Calculates the sum of a complex number and a real number. |
static Complex |
add(double a,
Complex c)
Calculates the sum of a real number and a complex number. |
double |
angle()
Computes the phase angle of this Complex number. |
static double |
angle(Complex c)
Computes the phase angle of a complex number. |
static Complex |
ComplexFromPolar(double r,
double phi)
Instantiates a new complex number object from polar representation parameters. |
Complex |
conjugate()
Returns the conjugate of this Complex number. |
static Complex |
conjugate(Complex c)
Conjugates a complex number. |
static Complex |
divide(Complex c1,
Complex c2)
Divides one complex number by another. |
static Complex |
divide(Complex c,
double a)
Divides a complex number by a real number. |
static Complex |
divide(double a,
Complex c)
Divide a real number by a complex number. |
void |
divideEquals(Complex c)
Divides this Complex number by another Complex number. |
void |
divideEquals(double a)
Divides this Complex number by a real number. |
static Complex |
exp(Complex c)
Computes the complex exponential function of a complex number. |
double |
imag()
Returns the imaginary part of a complex number. |
Complex |
minus(Complex c)
Subtracts a complex number from this complex number. |
Complex |
minus(double a)
Subtracts a real number from this Complex number. |
void |
minusEquals(Complex c)
Subtracts another Complex number from this Complex number. |
void |
minusEquals(double a)
Subtracts a real number from this Complex number. |
static Complex |
multiply(Complex c1,
Complex c2)
Multiplies two complex numbers. |
static Complex |
multiply(Complex c,
double a)
Multiplies a real and a complex number. |
static Complex |
multiply(double a,
Complex c)
Multiplies a real and a complex number. |
Complex |
over(Complex c)
Divides this Complex number by another Complex number. |
Complex |
over(double a)
Divides this Complex number by a real number. |
Complex |
plus(Complex c)
Computes the sum of this Complex number and another. |
Complex |
plus(double a)
Computes the sum of this Complex number and a real number. |
void |
plusEquals(Complex c)
Adds a Complex number to this Complex number. |
void |
plusEquals(double a)
Adds a real number to this Complex number. |
double |
real()
Returns the real part of a complex number. |
static Complex |
sqrt(Complex c)
Computes the square root of a complex number. |
static Complex |
subtract(Complex c1,
Complex c2)
Subtracts one complex number from another. |
static Complex |
subtract(Complex c,
double a)
Calculates the difference of a complex number and a real number. |
static Complex |
subtract(double a,
Complex c)
Calculates the difference of a real number and a complex number. |
Complex |
times(Complex c)
Multiplies this Complex number by another Complex number. |
Complex |
times(double a)
Multiplies this Complex number by a real number. |
void |
timesEquals(Complex c)
Multiplies this Complex number by another Complex number. |
void |
timesEquals(double a)
Multiplies this Complex number by a real number. |
java.lang.String |
toString()
Generates a String representation for this Complex number object. |
static Complex |
unaryMinus(Complex c)
Unary minus - negates a complex number. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Complex(double real, double imag)
real
- double specifying the real part.imag
- double specifying the imaginary part.public Complex(double real)
real
- double specifying the real part.Method Detail |
---|
public static Complex ComplexFromPolar(double r, double phi)
r
- double specifying the radius (magnitude) of the complex number.phi
- double specifying the phase angle of the complex number.
public static Complex add(double a, Complex c)
a
- double specifying the real number.c
- Complex number object.
public static Complex add(Complex c, double a)
c
- Complex number object.a
- double specifying the real number.
public static Complex subtract(Complex c, double a)
c
- Complex number object.a
- double specifying the real number.
public static Complex subtract(double a, Complex c)
a
- double specifying the real number.c
- Complex number object.
public static Complex unaryMinus(Complex c)
c
- Complex number to be negated.
public static Complex multiply(double a, Complex c)
a
- double specifying the real factor.c
- Complex object specifying the complex factor.
public static Complex multiply(Complex c, double a)
c
- Complex object specifying the complex factor.a
- double specifying the real factor.
public static Complex add(Complex c1, Complex c2)
c1
- First Complex summand.c2
- Second Complex summand.
public static Complex subtract(Complex c1, Complex c2)
c1
- First Complex number.c2
- Second Complex number to be subtracted from the first.
public static Complex multiply(Complex c1, Complex c2)
c1
- First Complex factor.c2
- Second Complex factor.
public static Complex divide(Complex c, double a)
c
- The Complex number.a
- double containing the real divisor.
public static Complex divide(double a, Complex c)
a
- double containing the real number.c
- Complex divisor.
public static Complex divide(Complex c1, Complex c2)
c1
- The first Complex number.c2
- The Complex divisor.
public static Complex sqrt(Complex c)
c
- Complex argument of the square root function.
public static double abs(Complex c)
c
- Complex argument of the absolute value operator.
public static double angle(Complex c)
c
- Complex argument of the phase function.
public static Complex exp(Complex c)
c
- Complex argument to the exponential function.
public static Complex conjugate(Complex c)
c
- Complex argument.
public double real()
public double imag()
public double abs()
public double angle()
public Complex times(Complex c)
c
- The other Complex factor.
public Complex times(double a)
a
- The real multiplicand.
public Complex conjugate()
public Complex plus(Complex c)
c
- Complex object containing the other summand.
public Complex plus(double a)
a
- double containing the real summand.
public Complex minus(Complex c)
c
- Complex number to be subtracted from this Complex number.
public Complex minus(double a)
a
- double containing the real number to be subtracted from this Complex number.
public Complex over(double a)
a
- double containing the real divisor.
public Complex over(Complex c)
c
- The Complex divisor.
public void plusEquals(double a)
a
- double containing the other summand.public void plusEquals(Complex c)
c
- Complex object containing the other summand.public void minusEquals(double a)
a
- double containing the real number to be subtracted from this Complex number.public void minusEquals(Complex c)
c
- The other Complex number to be subtracted from this Complex number.public void timesEquals(double a)
a
- double containing the multiplicand.public void timesEquals(Complex c)
c
- Complex object containing the other multiplicand.public void divideEquals(double a)
a
- double containing the real divisor.public void divideEquals(Complex c)
c
- Complex object containing the divisor.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |