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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPerfectPower()Returns whether the cardinality is a perfect power (p^k with k > 1)BigIntegerperfectPowerBase()Returnsbaseso thatcardinality == base^exponentor null if cardinality is not finiteBigIntegerperfectPowerExponent()Returnsexponentso thatcardinality == base^exponentor null if cardinality is not finite-
Methods 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
-
-
-
-
Method Detail
-
isPerfectPower
public boolean isPerfectPower()
Description copied from interface:RingReturns whether the cardinality is a perfect power (p^k with k > 1)- Specified by:
isPerfectPowerin interfaceRing<E>- Returns:
- whether the cardinality is a perfect power (p^k with k > 1)
-
perfectPowerBase
public BigInteger perfectPowerBase()
Description copied from interface:RingReturnsbaseso thatcardinality == base^exponentor null if cardinality is not finite- Specified by:
perfectPowerBasein interfaceRing<E>- Returns:
baseso thatcardinality == base^exponentor null if cardinality is not finite
-
perfectPowerExponent
public BigInteger perfectPowerExponent()
Description copied from interface:RingReturnsexponentso thatcardinality == base^exponentor null if cardinality is not finite- Specified by:
perfectPowerExponentin interfaceRing<E>- Returns:
exponentso thatcardinality == base^exponentor null if cardinality is not finite
-
-