public class ProductRingElement extends java.lang.Object implements RingElement
| Modifier and Type | Field and Description |
|---|---|
protected RingElement[] |
elems |
| Constructor and Description |
|---|
ProductRingElement(java.util.List<? extends RingElement> elems) |
ProductRingElement(Representation repr) |
ProductRingElement(RingElement... elems) |
| Modifier and Type | Method and Description |
|---|---|
ProductRingElement |
add(Element e)
Computes \(\text{this} + e\).
|
boolean |
divides(RingElement e)
Returns true iff there exists an \(x\) in the ring such that \(\text{this} \cdot x = e\).
|
RingElement[] |
divideWithRemainder(RingElement e)
Divides this by e with remainder, returning both quotient and remainder.
|
boolean |
equals(java.lang.Object o) |
RingElement |
get(int index) |
java.math.BigInteger |
getRank()
Implements the euclidean function of a euclidean domain.
|
Representation |
getRepresentation()
The representation of this object.
|
ProductRing |
getStructure()
Returns the
Structure that this Element belongs to. |
int |
hashCode() |
ProductRingElement |
inv()
Computes the multiplicative inverse of this element.
|
ProductRingElement |
mul(java.math.BigInteger k)
Computes \(\text{this} \cdot k\) (equivalent to \(\text{this} + \text{this} + \cdots\) k-times).
|
ProductRingElement |
mul(Element e)
Computes \(\text{this} \cdot e\).
|
ProductRingElement |
neg()
Computes the additive inverse of this element.
|
ProductRingElement |
pow(java.math.BigInteger k)
Calculates \(\text{this}^k\).
|
ByteAccumulator |
updateAccumulator(ByteAccumulator accumulator)
Updates the ByteAccumulator with the unique byte representation of this object.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitasInteger, div, isOne, isUnit, isZero, mul, pow, square, sub, toAdditiveGroupElement, toUnitGroupElementgetUniqueByteRepresentationprotected RingElement[] elems
public ProductRingElement(java.util.List<? extends RingElement> elems)
public ProductRingElement(RingElement... elems)
public ProductRingElement(Representation repr)
public ProductRing getStructure()
ElementStructure that this Element belongs to.getStructure in interface ElementgetStructure in interface RingElementpublic ProductRingElement add(Element e)
RingElementadd in interface RingElemente - the addendpublic ProductRingElement neg()
RingElementneg in interface RingElementpublic ProductRingElement mul(Element e)
RingElementmul in interface RingElemente - the factorpublic ProductRingElement mul(java.math.BigInteger k)
RingElementmul in interface RingElementk - the factorpublic ProductRingElement inv()
RingElementinv in interface RingElementpublic boolean divides(RingElement e) throws java.lang.UnsupportedOperationException
RingElementdivides in interface RingElementjava.lang.UnsupportedOperationException - if this cannot be decided (efficiently)public RingElement[] divideWithRemainder(RingElement e) throws java.lang.UnsupportedOperationException, java.lang.IllegalArgumentException
RingElement
Specifically, returns an array result such that the first entry contains the quotient
and the second entry the remainder.
Furthermore, result[1].getRank() < e.getRank() or result[1] = 0.
This definition implies that the remainder is zero if and only if e divides this element.
divideWithRemainder in interface RingElementjava.lang.UnsupportedOperationException - if the ring is not a euclidean domainjava.lang.IllegalArgumentException - if e is zeropublic java.math.BigInteger getRank()
throws java.lang.UnsupportedOperationException
RingElementThe euclidean function is a function from \(R \setminus \{0\}\) to \(\mathbb{N}_0\) such that
a.getRank() >= 0 for any a in the ring
a.mul(b).getRank() >= a.getRank() for any a, b != 0
divideWithRemainder is less than the divisor's rank
The rank of the zero element is undefined (no guarantee as to what this method returns in that case).
getRank in interface RingElementjava.lang.UnsupportedOperationException - if the ring is not a euclidean domainpublic ProductRingElement pow(java.math.BigInteger k)
RingElementNote that \(a^0 = 1\) for any \(a\) in the ring, particularly \(0^0 = 1\).
pow in interface RingElementpublic RingElement get(int index)
public ByteAccumulator updateAccumulator(ByteAccumulator accumulator)
UniqueByteRepresentableThe input to the accumulators update function is an injective (with respect to a given domain) byte encoding of this object.
For many use-cases, the AnnotatedUbrUtil can be used to quickly implement this method.
updateAccumulator in interface UniqueByteRepresentablepublic Representation getRepresentation()
RepresentableReprUtilgetRepresentation in interface RepresentableRepresentationpublic boolean equals(java.lang.Object o)