public class RealAlgebraicNumber<C extends GcdRingElem<C> & Rational> extends java.lang.Object implements GcdRingElem<RealAlgebraicNumber<C>>, Rational
Modifier and Type | Field and Description |
---|---|
AlgebraicNumber<C> |
number
Representing AlgebraicNumber.
|
RealAlgebraicRing<C> |
ring
Ring part of the data structure.
|
Constructor and Description |
---|
RealAlgebraicNumber(RealAlgebraicRing<C> r)
The constructor creates a RealAlgebraicNumber object from a GenPolynomial
object module.
|
RealAlgebraicNumber(RealAlgebraicRing<C> r,
AlgebraicNumber<C> a)
The constructor creates a RealAlgebraicNumber object from
RealAlgebraicRing modul and a AlgebraicNumber value.
|
RealAlgebraicNumber(RealAlgebraicRing<C> r,
GenPolynomial<C> a)
The constructor creates a RealAlgebraicNumber object from
RealAlgebraicRing modul and a GenPolynomial value.
|
Modifier and Type | Method and Description |
---|---|
RealAlgebraicNumber<C> |
abs()
RealAlgebraicNumber absolute value.
|
int |
compareTo(AlgebraicNumber<C> b)
RealAlgebraicNumber comparison.
|
int |
compareTo(RealAlgebraicNumber<C> b)
RealAlgebraicNumber comparison.
|
RealAlgebraicNumber<C> |
copy()
Copy this.
|
BigDecimal |
decimalMagnitude()
RealAlgebraicNumber magnitude.
|
RealAlgebraicNumber<C> |
divide(RealAlgebraicNumber<C> S)
RealAlgebraicNumber division.
|
RealAlgebraicNumber<C>[] |
egcd(RealAlgebraicNumber<C> S)
RealAlgebraicNumber extended greatest common divisor.
|
boolean |
equals(java.lang.Object b)
Comparison with any other object.
|
RealAlgebraicRing<C> |
factory()
Get the corresponding element factory.
|
RealAlgebraicNumber<C> |
gcd(RealAlgebraicNumber<C> S)
RealAlgebraicNumber greatest common divisor.
|
BigRational |
getRational()
Return a BigRational approximation of this Element.
|
void |
halfInterval()
RealAlgebraicNumber half interval.
|
int |
hashCode()
Hash code for this RealAlgebraicNumber.
|
RealAlgebraicNumber<C> |
inverse()
RealAlgebraicNumber inverse.
|
boolean |
isONE()
Is RealAlgebraicNumber one.
|
boolean |
isRootOfUnity()
Is RealAlgebraicNumber a root of unity.
|
boolean |
isUnit()
Is RealAlgebraicNumber unit.
|
boolean |
isZERO()
Is RealAlgebraicNumber zero.
|
BigRational |
magnitude()
RealAlgebraicNumber magnitude.
|
RealAlgebraicNumber<C> |
monic()
RealAlgebraicNumber monic.
|
RealAlgebraicNumber<C> |
multiply(C c)
RealAlgebraicNumber multiplication.
|
RealAlgebraicNumber<C> |
multiply(GenPolynomial<C> c)
RealAlgebraicNumber multiplication.
|
RealAlgebraicNumber<C> |
multiply(RealAlgebraicNumber<C> S)
RealAlgebraicNumber multiplication.
|
RealAlgebraicNumber<C> |
negate()
RealAlgebraicNumber negate.
|
RealAlgebraicNumber<C>[] |
quotientRemainder(RealAlgebraicNumber<C> S)
Quotient and remainder by division of this by S.
|
RealAlgebraicNumber<C> |
remainder(RealAlgebraicNumber<C> S)
RealAlgebraicNumber remainder.
|
int |
signum()
RealAlgebraicNumber signum.
|
RealAlgebraicNumber<C> |
subtract(RealAlgebraicNumber<C> S)
RealAlgebraicNumber subtraction.
|
RealAlgebraicNumber<C> |
sum(C c)
RealAlgebraicNumber summation.
|
RealAlgebraicNumber<C> |
sum(GenPolynomial<C> c)
RealAlgebraicNumber summation.
|
RealAlgebraicNumber<C> |
sum(RealAlgebraicNumber<C> S)
RealAlgebraicNumber summation.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toScriptFactory()
Get a scripting compatible string representation of the factory.
|
java.lang.String |
toString()
Get the String representation as RingElem.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
leftDivide, leftRemainder, power, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
public final AlgebraicNumber<C extends GcdRingElem<C> & Rational> number
public final RealAlgebraicRing<C extends GcdRingElem<C> & Rational> ring
public RealAlgebraicNumber(RealAlgebraicRing<C> r, GenPolynomial<C> a)
r
- ring RealAlgebraicRinga
- value GenPolynomialpublic RealAlgebraicNumber(RealAlgebraicRing<C> r, AlgebraicNumber<C> a)
r
- ring RealAlgebraicRinga
- value AlgebraicNumberpublic RealAlgebraicNumber(RealAlgebraicRing<C> r)
r
- ring RealAlgebraicRingpublic RealAlgebraicRing<C> factory()
factory
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
Element.factory()
public RealAlgebraicNumber<C> copy()
copy
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
Element.copy()
public BigRational getRational()
getRational
in interface Rational
Rational.getRational()
public boolean isZERO()
isZERO
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
AbelianGroupElem.isZERO()
public boolean isONE()
isONE
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
MonoidElem.isONE()
public boolean isUnit()
isUnit
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
MonoidElem.isUnit()
public boolean isRootOfUnity()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
toScript
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
Element.toScript()
public java.lang.String toScriptFactory()
toScriptFactory
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
Element.toScriptFactory()
public int compareTo(RealAlgebraicNumber<C> b)
compareTo
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
compareTo
in interface java.lang.Comparable<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
b
- RealAlgebraicNumber.public int compareTo(AlgebraicNumber<C> b)
b
- AlgebraicNumber.public boolean equals(java.lang.Object b)
equals
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in interface Element<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
hashCode
in class java.lang.Object
Object.hashCode()
public RealAlgebraicNumber<C> abs()
abs
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
AbelianGroupElem.abs()
public RealAlgebraicNumber<C> sum(RealAlgebraicNumber<C> S)
sum
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C> sum(GenPolynomial<C> c)
c
- coefficient.public RealAlgebraicNumber<C> sum(C c)
c
- polynomial.public RealAlgebraicNumber<C> negate()
negate
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
AbelianGroupElem.negate()
public int signum()
signum
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
AbelianGroupElem.signum()
public void halfInterval()
public BigRational magnitude()
public BigDecimal decimalMagnitude()
public RealAlgebraicNumber<C> subtract(RealAlgebraicNumber<C> S)
subtract
in interface AbelianGroupElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C> divide(RealAlgebraicNumber<C> S)
divide
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C> inverse()
inverse
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
NotInvertibleException
- if the element is not invertible.MonoidElem.inverse()
public RealAlgebraicNumber<C> remainder(RealAlgebraicNumber<C> S)
remainder
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C>[] quotientRemainder(RealAlgebraicNumber<C> S)
quotientRemainder
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- a RealAlgebraicNumberpublic RealAlgebraicNumber<C> multiply(RealAlgebraicNumber<C> S)
multiply
in interface MonoidElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C> multiply(C c)
c
- coefficient.public RealAlgebraicNumber<C> multiply(GenPolynomial<C> c)
c
- polynomial.public RealAlgebraicNumber<C> monic()
public RealAlgebraicNumber<C> gcd(RealAlgebraicNumber<C> S)
gcd
in interface RingElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.public RealAlgebraicNumber<C>[] egcd(RealAlgebraicNumber<C> S)
egcd
in interface RingElem<RealAlgebraicNumber<C extends GcdRingElem<C> & Rational>>
S
- RealAlgebraicNumber.