Package edu.jas.root
Class AlgebraicRoots<C extends GcdRingElem<C> & Rational>
- java.lang.Object
-
- edu.jas.root.AlgebraicRoots<C>
-
- Type Parameters:
C
- coefficient type.
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AlgebraicRootsPrimElem
public class AlgebraicRoots<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<ComplexAlgebraicNumber<C>>
complex
Complex algebraic roots.GenPolynomial<Complex<C>>
cp
Univariate polynomial with complex coefficients equivalent to p.GenPolynomial<C>
p
Univariate polynomial.java.util.List<RealAlgebraicNumber<C>>
real
Real algebraic roots.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AlgebraicRoots()
Constructor not for use.AlgebraicRoots(GenPolynomial<C> p, GenPolynomial<Complex<C>> cp, java.util.List<RealAlgebraicNumber<C>> r, java.util.List<ComplexAlgebraicNumber<C>> c)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgebraicRoots<C>
copy()
Copy this.boolean
equals(java.lang.Object b)
Comparison with any other object.AlgebraicNumberRing<C>
getAlgebraicRing()
Algebraic number ring.int
hashCode()
Hash code for this AlgebraicRoots.java.lang.String
toDecimalScript()
Get a decimal number scripting compatible string representation.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<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>> real
Real algebraic roots.
-
cp
public final GenPolynomial<Complex<C extends GcdRingElem<C> & Rational>> cp
Univariate polynomial with complex coefficients equivalent to p.
-
complex
public final java.util.List<ComplexAlgebraicNumber<C extends GcdRingElem<C> & Rational>> complex
Complex algebraic roots.
-
-
Constructor Detail
-
AlgebraicRoots
protected AlgebraicRoots()
Constructor not for use.
-
AlgebraicRoots
public AlgebraicRoots(GenPolynomial<C> p, GenPolynomial<Complex<C>> cp, java.util.List<RealAlgebraicNumber<C>> r, java.util.List<ComplexAlgebraicNumber<C>> c)
Constructor.- Parameters:
p
- univariate polynomialcp
- univariate polynomial with compelx coefficientsr
- list of real algebraic rootsc
- list of complex algebraic 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 roots.
-
toDecimalScript
public java.lang.String toDecimalScript()
Get a decimal number scripting compatible string representation.- Returns:
- decimal number script compatible representation for this roots.
-
copy
public AlgebraicRoots<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()
-
getAlgebraicRing
public AlgebraicNumberRing<C> getAlgebraicRing()
Algebraic number ring.- Returns:
- algebraic ring of roots.
-
-