Package cc.redberry.rings
Class ARing<E>
java.lang.Object
cc.redberry.rings.ARing<E>
- All Implemented Interfaces:
IParser<E>
,Stringifiable<E>
,Ring<E>
,Serializable
,Iterable<E>
,Comparator<E>
- Direct Known Subclasses:
Integers
,IntegersZp
,MultivariateRing
,QuotientRing
,SimpleFieldExtension
,UnivariateRing
public abstract class ARing<E> extends Object implements Ring<E>
Abstract ring which holds perfect power decomposition of its cardinality.
- Since:
- 1.0
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ARing()
-
Method Summary
Modifier and Type Method Description boolean
isPerfectPower()
Returns whether the cardinality is a perfect power (p^k with k > 1)BigInteger
perfectPowerBase()
Returnsbase
so thatcardinality == base^exponent
or null if cardinality is not finiteBigInteger
perfectPowerExponent()
Returnsexponent
so thatcardinality == base^exponent
or null if cardinality is not finiteMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface cc.redberry.rings.Ring
abs, add, add, addMutable, cardinality, characteristic, copy, createArray, createArray, createArray, createArray, createArray2d, createArray2d, createZeroesArray, createZeroesArray2d, decrement, divideAndRemainder, divideExact, divideExactMutable, divideOrNull, extendedGCD, factor, factorial, factorSquareFree, fillZeros, firstBezoutCoefficient, gcd, gcd, gcd, getNegativeOne, getOne, getZero, increment, isEuclideanRing, isField, isFinite, isFiniteField, isMinusOne, isOne, isUnit, isUnitOrZero, isZero, iterator, lcm, lcm, lcm, max, min, multiply, multiply, multiply, multiply, multiplyMutable, negate, negateMutable, parse, pow, pow, pow, quotient, randomElement, randomElement, randomElementTree, randomElementTree, randomNonZeroElement, reciprocal, remainder, setToValueOf, signum, subtract, subtractMutable, valueOf, valueOf, valueOf, valueOfBigInteger
Methods inherited from interface cc.redberry.rings.io.Stringifiable
toString
-
Constructor Details
-
ARing
public ARing()
-
-
Method Details
-
isPerfectPower
public boolean isPerfectPower()Description copied from interface:Ring
Returns whether the cardinality is a perfect power (p^k with k > 1)- Specified by:
isPerfectPower
in interfaceRing<E>
- Returns:
- whether the cardinality is a perfect power (p^k with k > 1)
-
perfectPowerBase
Description copied from interface:Ring
Returnsbase
so thatcardinality == base^exponent
or null if cardinality is not finite- Specified by:
perfectPowerBase
in interfaceRing<E>
- Returns:
base
so thatcardinality == base^exponent
or null if cardinality is not finite
-
perfectPowerExponent
Description copied from interface:Ring
Returnsexponent
so thatcardinality == base^exponent
or null if cardinality is not finite- Specified by:
perfectPowerExponent
in interfaceRing<E>
- Returns:
exponent
so thatcardinality == base^exponent
or null if cardinality is not finite
-