|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.analysis.RealFunction JSci.maths.polynomials.RealPolynomial
public class RealPolynomial
A Polynomial as a Ring.Member
over a real Field
Constructor Summary | |
---|---|
RealPolynomial(double[] coeff)
Creates a new instance of RealPolynomial |
|
RealPolynomial(Field.Member[] f)
Creates a new RealPolynomial object. |
Method Summary | |
---|---|
RealFunction |
add(RealFunction g)
The group composition law. |
int |
degree()
The degree |
RealFunction |
differentiate()
Differentiate the real polynomial. |
boolean |
equals(java.lang.Object o)
Returns true if this polynomial is equal to another. |
Field.Member |
getCoefficient(int k)
Get the coefficient of degree k, i.e. |
double |
getCoefficientAsDouble(int k)
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... |
RealPolynomial |
integrate()
"inverse" operation for differentiate |
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. |
RealFunction |
multiply(RealFunction r)
The multiplication law. |
AbelianGroup.Member |
negate()
Returns the inverse member. |
RealPolynomial |
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 |
RealPolynomial |
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 |
RealFunction |
subtract(RealFunction g)
The group composition law with inverse. |
java.lang.String |
toString()
String representation P(x) = a_k x^k +... |
Methods inherited from class JSci.maths.analysis.RealFunction |
---|
add, compose, constant, dimension, divide, divide, inverse, multiply, subtract, taylorExpand, tensor |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface JSci.maths.fields.Ring.Member |
---|
multiply |
Methods inherited from interface JSci.maths.groups.AbelianGroup.Member |
---|
add, subtract |
Constructor Detail |
---|
public RealPolynomial(double[] coeff)
public RealPolynomial(Field.Member[] f)
f
- Method Detail |
---|
public Field.Member getCoefficient(int k)
getCoefficient
in interface Polynomial
k
- degree
public double getCoefficientAsDouble(int k)
k
- degree
public Field.Member[] getCoefficients()
getCoefficients
in interface Polynomial
public double[] getCoefficientsAsDoubles()
public double map(double x)
map
in interface Mapping
public int degree()
degree
in interface Polynomial
public java.lang.Object getSet()
getSet
in interface Member
getSet
in class RealFunction
public boolean isZero()
public boolean isOne()
public RealFunction add(RealFunction g)
add
in class RealFunction
g
- a group memberpublic RealFunction differentiate()
differentiate
in class RealFunction
public Polynomial scalarDivide(Field.Member f)
scalarDivide
in interface Polynomial
f
- divisor
public RealPolynomial scalarDivide(double a)
a
- divisor
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other polynomial
public int hashCode()
hashCode
in class java.lang.Object
public RealPolynomial integrate()
public Polynomial scalarMultiply(Field.Member f)
scalarMultiply
in interface Polynomial
f
-
public RealPolynomial scalarMultiply(double a)
a
- factor
public RealFunction multiply(RealFunction r)
multiply
in class RealFunction
r
- a polynomial
public AbelianGroup.Member negate()
negate
in interface AbelianGroup.Member
negate
in class RealFunction
public RealFunction subtract(RealFunction g)
subtract
in class RealFunction
g
- a group memberpublic 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 |