|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.analysis.DoubleFunction
org.jscience.mathematics.analysis.polynomials.DoublePolynomial
public class DoublePolynomial
A Polynomial as a Ring.Member over a
realField
| Field Summary | |
|---|---|
static DoublePolynomial |
ONE
The real polynomial representing the multiplicative identity. |
static DoublePolynomial |
ZERO
The real polynomial representing the additive identity. |
| Constructor Summary | |
|---|---|
DoublePolynomial(double[] coeff)
Creates a new instance of DoublePolynomial, polynom is always simplified discarding every trailing zeros and array copied. |
|
DoublePolynomial(double d,
int degree)
Simple constructor. |
|
DoublePolynomial(DoublePolynomial polynomial)
Creates a new instance of DoublePolynomial, polynom is always simplified discarding every trailing zeros. |
|
DoublePolynomial(Field.Member[] f)
Creates a new RealPolynomial object, polynom is always simplified discarding every trailing zeros and array copied. |
|
| Method Summary | |
|---|---|
DoubleFunction |
add(DoubleFunction g)
The group composition law. |
java.lang.Object |
clone()
|
static Complex[] |
cubic(double d,
double c,
double b,
double a)
|
int |
degree()
The degree understood as the highest degree |
DoubleFunction |
differentiate()
Differentiate the real polynomial. |
boolean |
equals(java.lang.Object o)
Is this-o == Null ? |
DoublePolynomial[] |
euclidianDivision(DoublePolynomial divisor)
Perform the euclidian division of two polynomials. |
Field.Member |
getCoefficient(int n)
Get the coefficient of degree k, i.e. |
double |
getCoefficientAsDouble(int n)
Get the coefficient of degree k, i.e. |
Field.Member[] |
getCoefficients()
Get the coefficients as an array |
double[] |
getCoefficientsAsDoubles()
Get the coefficients as an array of doubles |
java.lang.Object |
getSet()
|
int |
hashCode()
Some kind of hashcode... |
DoublePolynomial |
integrate()
"inverse" operation for differentiate, zero degree constant set to zero |
boolean |
isOne()
Returns true if this polynomial is equal to one. |
boolean |
isZero()
Returns true if this polynomial is equal to zero. |
double |
map(double x)
Evaluates this polynomial. |
double |
map(float x)
Evaluates this polynomial. |
double |
map(int x)
Evaluates this polynomial. |
double |
map(long x)
Evaluates this polynomial. |
DoubleFunction |
multiply(DoubleFunction r)
The multiplication law. |
AbelianGroup.Member |
negate()
Returns the inverse member. |
static Complex[] |
quadratic(double c,
double b,
double a)
|
Complex[] |
roots()
|
static DoublePolynomial |
rootsToPolynomial(double[] roots)
|
DoublePolynomial |
scalarDivide(double a)
return a new real Polynomial with coefficients divided by a |
Polynomial |
scalarDivide(Field.Member f)
return a new real Polynomial with coefficients divided by f |
DoublePolynomial |
scalarMultiply(double a)
Returns the multiplication of this polynomial by a scalar |
Polynomial |
scalarMultiply(Field.Member f)
Returns the multiplication of this polynomial by a scalar |
void |
setCoefficient(int n,
Field.Member c)
DOCUMENT ME! |
void |
setCoefficientAsDouble(int n,
double c)
DOCUMENT ME! |
DoubleFunction |
subtract(DoubleFunction g)
The group composition law with inverse. |
ComplexPolynomial |
toComplexPolynomial()
|
ExactComplexPolynomial |
toExactComplexPolynomial()
|
ExactRealPolynomial |
toExactRealPolynomial()
|
java.lang.String |
toString()
String representation P(x) = a_k x^k +... |
java.lang.String |
toString(java.lang.String unknown)
String representation P(x) = a_k x^k +... |
| Methods inherited from class org.jscience.mathematics.analysis.DoubleFunction |
|---|
add, compose, cos, divide, divide, exp, getIntervalsList, inverse, log, multiply, power, setIntervalsList, sin, sqrt, subtract, taylorExpand, tensor |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.fields.Ring.Member |
|---|
multiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.groups.AbelianGroup.Member |
|---|
add, subtract |
| Field Detail |
|---|
public static final DoublePolynomial ZERO
public static final DoublePolynomial ONE
| Constructor Detail |
|---|
public DoublePolynomial(double[] coeff)
coeff - DOCUMENT ME!
java.lang.NullPointerException - DOCUMENT ME!public DoublePolynomial(DoublePolynomial polynomial)
polynomial - DOCUMENT ME!public DoublePolynomial(Field.Member[] f)
f -
public DoublePolynomial(double d,
int degree)
d - coefficientdegree - degree associated with the coefficient| Method Detail |
|---|
public Field.Member getCoefficient(int n)
getCoefficient in interface Polynomialn - degree
public double getCoefficientAsDouble(int n)
n - degree
public Field.Member[] getCoefficients()
getCoefficients in interface Polynomialpublic double[] getCoefficientsAsDoubles()
public void setCoefficient(int n,
Field.Member c)
n -
public void setCoefficientAsDouble(int n,
double c)
n - public double map(double x)
map in interface PrimitiveMappingmap in class DoubleFunctionx - DOCUMENT ME!
org.jscience.mathematics.analysis.IntervalList.public double map(float x)
map in interface PrimitiveMappingmap in class DoubleFunctionx - DOCUMENT ME!
public double map(long x)
map in interface PrimitiveMappingmap in class DoubleFunctionx - DOCUMENT ME!
public double map(int x)
map in interface PrimitiveMappingmap in class DoubleFunctionx - DOCUMENT ME!
public int degree()
degree in interface Polynomialpublic java.lang.Object getSet()
public boolean isZero()
public boolean isOne()
public DoubleFunction add(DoubleFunction g)
add in class DoubleFunctiong - a group member
public DoubleFunction differentiate()
differentiate in interface C1Functiondifferentiate in class DoubleFunctionpublic Polynomial scalarDivide(Field.Member f)
scalarDivide in interface Polynomialf - divisor
java.lang.IllegalArgumentException - DOCUMENT ME!public DoublePolynomial scalarDivide(double a)
a - divisor
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other polynomial
public int hashCode()
hashCode in class java.lang.Objectpublic DoublePolynomial integrate()
public Polynomial scalarMultiply(Field.Member f)
scalarMultiply in interface Polynomialf -
java.lang.IllegalArgumentException - DOCUMENT ME!public DoublePolynomial scalarMultiply(double a)
a - factor
public DoubleFunction multiply(DoubleFunction r)
multiply in class DoubleFunctionr - a RealFunction
java.lang.IllegalArgumentException - DOCUMENT ME!public AbelianGroup.Member negate()
negate in interface AbelianGroup.Membernegate in class DoubleFunctionpublic DoubleFunction subtract(DoubleFunction g)
subtract in class DoubleFunctiong - a group member
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String unknown)
unknown - The name of the unkwown
public DoublePolynomial[] euclidianDivision(DoublePolynomial divisor)
divisor - denominator polynomial
public ComplexPolynomial toComplexPolynomial()
public ExactRealPolynomial toExactRealPolynomial()
public ExactComplexPolynomial toExactComplexPolynomial()
public java.lang.Object clone()
clone in class java.lang.Objectpublic static DoublePolynomial rootsToPolynomial(double[] roots)
public Complex[] roots()
public static Complex[] quadratic(double c,
double b,
double a)
public static Complex[] cubic(double d,
double c,
double b,
double a)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||