Package edu.jas.root
Class DecimalRoots<C extends GcdRingElem<C> & Rational>
- java.lang.Object
-
- edu.jas.root.DecimalRoots<C>
-
- Type Parameters:
C
- coefficient type.
- All Implemented Interfaces:
java.io.Serializable
public class DecimalRoots<C extends GcdRingElem<C> & Rational> extends java.lang.Object implements java.io.Serializable
Container for the real and complex algebraic roots of a univariate polynomial.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<Complex<BigDecimal>>
complex
complex decimal roots.GenPolynomial<Complex<C>>
cp
univariate polynomial with complex coefficients.GenPolynomial<C>
p
univariate polynomial.java.util.List<BigDecimal>
real
real decimal roots.
-
Constructor Summary
Constructors Constructor Description DecimalRoots(GenPolynomial<C> p, GenPolynomial<Complex<C>> cp, java.util.List<BigDecimal> r, java.util.List<Complex<BigDecimal>> c)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DecimalRoots<C>
copy()
Copy this.boolean
equals(java.lang.Object b)
Comparison with any other object.int
hashCode()
Hash code for this AlgebraicRoots.java.lang.String
toScript()
Get a scripting compatible string representation.java.lang.String
toString()
String representation of AlgebraicRoots.
-
-
-
Field Detail
-
p
public final GenPolynomial<C extends GcdRingElem<C> & Rational> p
univariate polynomial.
-
real
public final java.util.List<BigDecimal> real
real decimal roots.
-
cp
public final GenPolynomial<Complex<C extends GcdRingElem<C> & Rational>> cp
univariate polynomial with complex coefficients.
-
complex
public final java.util.List<Complex<BigDecimal>> complex
complex decimal roots.
-
-
Constructor Detail
-
DecimalRoots
public DecimalRoots(GenPolynomial<C> p, GenPolynomial<Complex<C>> cp, java.util.List<BigDecimal> r, java.util.List<Complex<BigDecimal>> c)
Constructor.- Parameters:
p
- univariate polynomialcp
- univariate complex polynomialr
- list of real decimal rootsc
- list of complex decimal roots
-
-
Method Detail
-
toString
public java.lang.String toString()
String representation of AlgebraicRoots.- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.- Returns:
- script compatible representation for this Interval.
-
copy
public DecimalRoots<C> copy()
Copy this.- Returns:
- a copy of this.
-
equals
public boolean equals(java.lang.Object b)
Comparison with any other object.- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hash code for this AlgebraicRoots.- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
-