public class RealPolynomial extends java.lang.Object implements Polynomial
Ring.Member
over a real Field
POLYEPS
Constructor and Description |
---|
RealPolynomial(double[] coeff)
Creates a new instance of RealPolynomial
|
RealPolynomial(Field.Member[] f)
Creates a new RealPolynomial object.
|
Modifier and Type | Method and Description |
---|---|
AbelianGroup.Member |
add(AbelianGroup.Member g)
The group composition law.
|
int |
degree()
The degree
|
RealPolynomial |
differentiate()
Differentiate the real polynomial.
|
RealPolynomial |
divide(double a)
return a new real Polynomial with coefficients divided by a
|
Polynomial |
divide(Field.Member f)
return a new real Polynomial with coefficients divided by f
|
boolean |
equals(java.lang.Object o)
Is this-o == Null ?
|
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
|
int |
hashCode()
Some kind of hashcode...
|
RealPolynomial |
integrate()
"inverse" operation for differentiate
|
boolean |
isNull()
Does this polynomial represent a "NULL".
|
boolean |
isOne()
Does this polynomial represent a "ONE".
|
RealPolynomial |
multiply(double a)
Returns the multiplication of this polynomial by a scalar
|
Polynomial |
multiply(Field.Member f)
Returns the multiplication of this polynomial by a scalar
|
Ring.Member |
multiply(Ring.Member r)
The multiplication law.
|
AbelianGroup.Member |
negate()
Returns the inverse member.
|
AbelianGroup.Member |
subtract(AbelianGroup.Member g)
The group composition law with inverse.
|
java.lang.String |
toString()
String representation P(x) = a_k x^k +...
|
public RealPolynomial(double[] coeff)
public RealPolynomial(Field.Member[] f)
f
- public Field.Member getCoefficient(int n)
getCoefficient
in interface Polynomial
k
- degreepublic double getCoefficientAsDouble(int n)
k
- degreepublic Field.Member[] getCoefficients()
getCoefficients
in interface Polynomial
public double[] getCoefficientsAsDoubles()
public int degree()
degree
in interface Polynomial
public boolean isNull()
public boolean isOne()
public AbelianGroup.Member add(AbelianGroup.Member g)
add
in interface AbelianGroup.Member
g
- a group memberpublic RealPolynomial differentiate()
public Polynomial divide(Field.Member f)
divide
in interface Polynomial
f
- divisorpublic RealPolynomial divide(double a)
a
- divisorpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other polynomialpublic int hashCode()
hashCode
in class java.lang.Object
public RealPolynomial integrate()
public Polynomial multiply(Field.Member f)
multiply
in interface Polynomial
f
- public RealPolynomial multiply(double a)
a
- factorpublic Ring.Member multiply(Ring.Member r)
multiply
in interface Ring.Member
r
- a ring memberpublic AbelianGroup.Member negate()
negate
in interface AbelianGroup.Member
public AbelianGroup.Member subtract(AbelianGroup.Member g)
subtract
in interface AbelianGroup.Member
g
- a group memberpublic java.lang.String toString()
toString
in class java.lang.Object