|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--calc.ComplexPowerSum
Field Summary | |
protected Complex[] |
coefficients
An Array of the coefficients |
protected Complex |
logCoeff
contains the coefficient for a constructed logarithm (which may happen, when integrating z^-1) |
protected Complex[] |
powers
the corresponding powers |
protected boolean |
valid
a flag indicating, that an integration of z^-1 has happened, this flag must be checked, to test if further operations (other than eval()) are allowed. |
Constructor Summary | |
ComplexPowerSum()
|
|
ComplexPowerSum(Complex[] coefficients,
Complex[] powers)
Nullpowersums (i.e. coefficients.length == 0) are allowed, but not a nullpointer argument! |
|
ComplexPowerSum(Polynom p)
convert a polynomial to a ComplexPowerSum |
Method Summary | |
Complex |
eval(Complex z)
evaluates the powersum for a certain Complex number |
Complex |
getCoefficient(int i)
return a coefficient of a single indexed monom |
Complex[] |
getCoefficients()
returns all coefficients |
BaseCalc |
getOperationTree()
builds and returns the corresponding operational tree for further calculations |
Complex |
getPower(int i)
returns the power of a single indexed monom |
Complex[] |
getPowers()
returns all powers |
void |
integrate(Complex constant)
integrates the powersum numerically, using the arguments as range |
static void |
main(java.lang.String[] args)
for testing purposes |
void |
multiply(Complex d)
multiplication with a number |
void |
multiply(ComplexPowerSum p)
multiplication with another powersum |
void |
setCoefficient(int i,
Complex value)
sets a single specified coefficient |
void |
setCoefficient(int i,
Complex value,
Complex power)
sets a single specified coefficient with the according power |
void |
sort()
sorts the arrays in ascending order of powers |
java.lang.String |
toString()
for pretty printing: output is of form: X^6 - 3.0X^5 + 2.5X^4 - 0.49999999999999956X^2 + 0.023809523809523885 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Complex logCoeff
protected boolean valid
protected Complex[] coefficients
protected Complex[] powers
Constructor Detail |
public ComplexPowerSum(Complex[] coefficients, Complex[] powers)
public ComplexPowerSum(Polynom p)
public ComplexPowerSum()
Method Detail |
public Complex getCoefficient(int i) throws calc.InvalidException
public Complex getPower(int i) throws calc.InvalidException
public void setCoefficient(int i, Complex value) throws calc.InvalidException
public void setCoefficient(int i, Complex value, Complex power) throws calc.InvalidException
public Complex[] getCoefficients() throws calc.InvalidException
public Complex[] getPowers() throws calc.InvalidException
public void multiply(Complex d) throws calc.InvalidException
public void multiply(ComplexPowerSum p) throws calc.InvalidException
public Complex eval(Complex z)
public void sort()
public void integrate(Complex constant) throws calc.InvalidException
public java.lang.String toString()
X^6 - 3.0X^5 + 2.5X^4 - 0.49999999999999956X^2 + 0.023809523809523885
toString
in class java.lang.Object
public BaseCalc getOperationTree()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |