|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.Number
|
+--ru.tunegov.mathematic.Complex
This is a non-visual component that represents complex number. The given class realizes main operations above complex numbers.
| Field Summary | |
static Complex |
I
Imaginary unit |
| Constructor Summary | |
Complex()
Construct a Complex object. |
|
Complex(double real)
Construct a Complex object. |
|
Complex(double real,
double image)
Construct a Complex object. |
|
Complex(java.lang.String s)
Construct a Complex object. |
|
| Method Summary | |
ElementSet |
abs()
Returns the absolute value of the given element. |
ElementSet |
add(Complex arg)
Returns the sum of the given element with argument (result = this + arg). |
ElementSet |
add(Decimal arg)
Returns the sum of the given element with argument (result = this + arg). |
ElementSet |
add(double arg)
Returns the sum of the given element with argument (result = this + arg). |
ElementSet |
add(ElementSet arg)
Returns the sum of the given element with argument (result = this + arg). |
MatrixElementSet |
add(MatrixElementSet arg)
Returns the sum of the given element with argument (result = this + arg). |
java.lang.Object |
clone()
Returns clone of this object. |
Complex |
conjugate()
Returns the conjugate of the given element. |
ElementSet |
cos()
Returns the cosine of the given element. |
ElementSet |
divide(Complex arg)
Returns the quotient of the given element with argument (result = this / arg). |
ElementSet |
divide(Decimal arg)
Returns the quotient of the given element with argument (result = this / arg). |
ElementSet |
divide(double arg)
Returns the quotient of the given element with argument (result = this / arg). |
ElementSet |
divide(ElementSet arg)
Returns the quotient of the given element with argument (result = this / arg). |
MatrixElementSet |
divide(MatrixElementSet arg)
Returns the quotient of the given element with argument (result = this / arg). |
ElementSet |
divideInverse(Complex arg)
Returns the quotient of the argument with given element (result = arg / this). |
ElementSet |
divideInverse(Decimal arg)
Returns the quotient of the argument with given element (result = arg / this). |
ElementSet |
divideInverse(double arg)
Returns the quotient of the argument with given element (result = arg / this). |
MatrixElementSet |
divideInverse(MatrixElementSet arg)
Returns the quotient of the argument with given element (result = arg / this). |
double |
doubleValue()
Returns the value of the specified number as a double.
|
boolean |
equals(java.lang.Object obj)
Compares two Objects for equality. |
ElementSet |
exp()
Returns the number e raised to the this power. |
float |
floatValue()
Returns the value of the specified number as a float.
|
double |
getArgument()
Returns the argument of a complex number. |
double |
getImage()
Returns the imaginary part of a complex number. |
double |
getModule()
Returns the module of a complex number. |
double |
getReal()
Returns the real part of a complex number. |
int |
intValue()
Returns the value of the specified number as a int.
|
ElementSet |
inverse()
Returns the inverse value of the given element. |
ElementSet |
log()
Returns the logarithm of the given element. |
long |
longValue()
Returns the value of the specified number as a long.
|
ElementSet |
multiply(Complex arg)
Returns the product of the given element with argument (result = this * arg). |
ElementSet |
multiply(Decimal arg)
Returns the product of the given element with argument (result = this * arg). |
ElementSet |
multiply(double arg)
Returns the product of the given element with argument (result = this * arg). |
ElementSet |
multiply(ElementSet arg)
Returns the product of the given element with argument (result = this * arg). |
MatrixElementSet |
multiply(MatrixElementSet arg)
Returns the product of the given element with argument (result = this * arg). |
ElementSet |
negate()
Returns the negative of this element. |
ElementSet |
pow(double degree)
Returns the given element raised to n-th degree. |
ElementSet |
root(int degree)
Returns the root of n-th degree of given element. |
void |
setImage(double image)
Sets the imaginary part of a complex number. |
void |
setReal(double real)
Sets the real part of a complex number. |
ElementSet |
sin()
Returns the sine of the given element. |
ElementSet |
sqrt()
Returns the square root of the given element. |
ElementSet |
subtract(Complex arg)
Returns the difference of the given element with argument (result = this - arg). |
ElementSet |
subtract(Decimal arg)
Returns the difference of the given element with argument (result = this - arg). |
ElementSet |
subtract(double arg)
Returns the difference of the given element with argument (result = this - arg). |
ElementSet |
subtract(ElementSet arg)
Returns the difference of the given element with argument (result = this - arg). |
MatrixElementSet |
subtract(MatrixElementSet arg)
Returns the difference of the given element with argument (result = this - arg). |
ElementSet |
subtractInverse(Complex arg)
Returns the difference of the argument with given element (result = arg - this). |
ElementSet |
subtractInverse(Decimal arg)
Returns the difference of the argument with given element (result = arg - this). |
ElementSet |
subtractInverse(double arg)
Returns the difference of the argument with given element (result = arg - this). |
MatrixElementSet |
subtractInverse(MatrixElementSet arg)
Returns the difference of the argument with given element (result = arg - this). |
ElementSet |
tan()
Returns the tangent of the given element. |
java.lang.String |
toFormattedString(java.text.DecimalFormat df)
Returns formatted string representing the given element. |
java.lang.String |
toString()
Returns a String that represents the value of this object. |
| Methods inherited from class java.lang.Number |
byteValue,
shortValue |
| Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final Complex I
| Constructor Detail |
public Complex()
public Complex(double real)
real - Real part of a complex number
public Complex(double real,
double image)
real - Real part of a complex numberimage - Imaginary part of a complex numberpublic Complex(java.lang.String s)
s - The string representation of a complex number| Method Detail |
public ElementSet abs()
public ElementSet add(double arg)
arg - The second argumentpublic ElementSet add(Complex arg)
arg - The second argumentpublic ElementSet add(Decimal arg)
arg - The second argumentpublic ElementSet add(ElementSet arg)
arg - The second argumentpublic MatrixElementSet add(MatrixElementSet arg)
arg - The second argumentpublic java.lang.Object clone()
public Complex conjugate()
public ElementSet cos()
public ElementSet divide(double arg)
arg - The second argumentpublic ElementSet divide(Complex arg)
arg - The second argumentpublic ElementSet divide(Decimal arg)
arg - The second argumentpublic ElementSet divide(ElementSet arg)
arg - The second argumentpublic MatrixElementSet divide(MatrixElementSet arg)
arg - The second argumentpublic ElementSet divideInverse(double arg)
arg - The first argumentpublic ElementSet divideInverse(Complex arg)
arg - The first argumentpublic ElementSet divideInverse(Decimal arg)
arg - The first argumentpublic MatrixElementSet divideInverse(MatrixElementSet arg)
arg - The first argumentpublic double doubleValue()
double.
This may involve rounding.double.public boolean equals(java.lang.Object obj)
obj - The reference object with which to comparepublic ElementSet exp()
public float floatValue()
float.
This may involve rounding.float.public double getArgument()
public double getImage()
public double getModule()
public double getReal()
public int intValue()
int.
This may involve rounding.int.public ElementSet inverse()
public ElementSet log()
public long longValue()
long.
This may involve rounding.long.public ElementSet multiply(double arg)
arg - The second argumentpublic ElementSet multiply(Complex arg)
arg - The second argumentpublic ElementSet multiply(Decimal arg)
arg - The second argumentpublic ElementSet multiply(ElementSet arg)
arg - The second argumentpublic MatrixElementSet multiply(MatrixElementSet arg)
arg - The second argumentpublic ElementSet negate()
public ElementSet pow(double degree)
degree - The degree of powerpublic ElementSet root(int degree)
degree - The degree of rootpublic void setImage(double image)
image - The imaginary part of a complex numberpublic void setReal(double real)
real - The real part of a complex numberpublic ElementSet sin()
public ElementSet sqrt()
public ElementSet subtract(double arg)
arg - The second argumentpublic ElementSet subtract(Complex arg)
arg - The second argumentpublic ElementSet subtract(Decimal arg)
arg - The second argumentpublic ElementSet subtract(ElementSet arg)
arg - The second argumentpublic MatrixElementSet subtract(MatrixElementSet arg)
arg - The second argumentpublic ElementSet subtractInverse(double arg)
arg - The first argumentpublic ElementSet subtractInverse(Complex arg)
arg - The first argumentpublic ElementSet subtractInverse(Decimal arg)
arg - The first argumentpublic MatrixElementSet subtractInverse(MatrixElementSet arg)
arg - The first argumentpublic ElementSet tan()
public java.lang.String toFormattedString(java.text.DecimalFormat df)
df - Formatterpublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||