Package cc.redberry.rings.poly
Class AlgebraicNumberField<E extends IUnivariatePolynomial<E>>
- java.lang.Object
-
- cc.redberry.rings.ARing<E>
-
- cc.redberry.rings.poly.SimpleFieldExtension<E>
-
- cc.redberry.rings.poly.AlgebraicNumberField<E>
-
- All Implemented Interfaces:
IParser<E>,Stringifiable<E>,IPolynomialRing<E>,Ring<E>,Serializable,Iterable<E>,Comparator<E>
public class AlgebraicNumberField<E extends IUnivariatePolynomial<E>> extends SimpleFieldExtension<E>
Algebraic number fieldF(α)represented as a simple field extension, for details seeSimpleFieldExtension.- Since:
- 2.5
- See Also:
SimpleFieldExtension,FiniteField,Rings.AlgebraicNumberField(IUnivariatePolynomial), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlgebraicNumberField(E minimalPoly)Constructs a simple field extensionF(α)generated by the algebraic numberαwith the specified minimal polynomial.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E[]divideAndRemainder(E a, E b)Returns quotient and remainder ofdividend / dividerEgcd(E a, E b)Returns the greatest common divisor of two elementsbooleanisField()Returns whether this ring is a fieldbooleanisUnit(E element)Tests whether specified element is a ring unitIterator<E>iterator()Returns iterator over ring elements (for finite rings, otherwise throws exception)Enormalizer(E element)Gives an elementC(element)of this field extension with the property thatelement * C(element)is in the base field.Eremainder(E dividend, E divider)Returns the remainder ofdividend / divider-
Methods inherited from class cc.redberry.rings.poly.SimpleFieldExtension
add, addMutable, asMultipleExtension, cardinality, characteristic, compare, conjugatesProduct, copy, createArray, createArray2d, createArray2d, degree, equals, factor, factory, generator, getMinimalPolynomial, getMinimalPolynomialRef, getOne, getZero, hashCode, isEuclideanRing, isInTheBaseField, isOne, isZero, minimalPolynomial, multiply, multiplyMutable, negate, negateMutable, norm, normOfPolynomial, normOfPolynomial, nVariables, parse, randomElement, reciprocal, shouldReduceFast, subtract, subtractMutable, toString, toString, toString, trace, valueOf, valueOf, valueOfBigInteger, variable
-
Methods inherited from class cc.redberry.rings.ARing
isPerfectPower, perfectPowerBase, perfectPowerExponent
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface cc.redberry.rings.poly.IPolynomialRing
mkCoder, parse, signum
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface cc.redberry.rings.Ring
abs, add, createArray, createArray, createArray, createZeroesArray, createZeroesArray2d, decrement, divideExact, divideExactMutable, divideOrNull, extendedGCD, factorial, factorSquareFree, fillZeros, firstBezoutCoefficient, gcd, gcd, getNegativeOne, increment, isFinite, isFiniteField, isMinusOne, isPerfectPower, isUnitOrZero, lcm, lcm, lcm, max, min, multiply, multiply, multiply, perfectPowerBase, perfectPowerExponent, pow, pow, pow, quotient, randomElement, randomElementTree, randomElementTree, randomNonZeroElement, setToValueOf, valueOf
-
-
-
-
Constructor Detail
-
AlgebraicNumberField
public AlgebraicNumberField(E minimalPoly)
Constructs a simple field extensionF(α)generated by the algebraic numberαwith the specified minimal polynomial.NOTE: irreducibility test for the minimal polynomial is not performed here, use
IrreduciblePolynomials.irreducibleQ(IUnivariatePolynomial)to test irreducibility.- Parameters:
minimalPoly- the minimal polynomial
-
-
Method Detail
-
isField
public boolean isField()
Description copied from interface:RingReturns whether this ring is a field- Returns:
- whether this ring is a field
-
isUnit
public boolean isUnit(E element)
Description copied from interface:RingTests whether specified element is a ring unit- Parameters:
element- the ring element- Returns:
- whether specified element is a ring unit
- See Also:
Ring.isOne(Object)
-
gcd
public E gcd(E a, E b)
Description copied from interface:RingReturns the greatest common divisor of two elements- Parameters:
a- the first elementb- the second element- Returns:
- gcd
-
divideAndRemainder
public E[] divideAndRemainder(E a, E b)
Description copied from interface:RingReturns quotient and remainder ofdividend / divider- Parameters:
a- the dividendb- the divider- Returns:
{quotient, remainder}
-
remainder
public E remainder(E dividend, E divider)
Description copied from interface:RingReturns the remainder ofdividend / divider- Parameters:
dividend- the dividenddivider- the divider- Returns:
- the remainder of
dividend / divider
-
normalizer
public E normalizer(E element)
Gives an elementC(element)of this field extension with the property thatelement * C(element)is in the base field.
-
-