public class DebugGroupElementImpl extends java.lang.Object implements GroupElementImpl
DebugGroupImpl able to count group operations, inversions and squarings
it is involved with.
The actual group operations are realized via a Zn element.DebugGroupElement,
DebugGroupImpl| Modifier and Type | Field and Description |
|---|---|
protected Zn.ZnElement |
elem
The underlying Zn element that realizes the actual group operations.
|
protected DebugGroupImpl |
group
The group this element belongs to.
|
| Constructor and Description |
|---|
DebugGroupElementImpl(DebugGroupImpl group,
Zn.ZnElement elem)
Initializes this element as belonging to the given group and using the given Zn element for its group operations.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
Representation |
getRepresentation()
The representation of this object.
|
GroupImpl |
getStructure()
Retrieves the group this element belongs to.
|
int |
hashCode() |
GroupElementImpl |
inv()
Calculates the inverse of this group element.
|
boolean |
isNeutralElement()
Returns true iff this is the neutral element of the group.
|
GroupElementImpl |
op(GroupElementImpl e)
Calculates the result of this op e.
|
protected GroupElementImpl |
op(GroupElementImpl e,
boolean count)
Allows to configure whether to count this operation.
|
GroupElementImpl |
pow(java.math.BigInteger k)
Calculates the result of applying the group operation k times.
|
protected GroupElementImpl |
pow(java.math.BigInteger k,
boolean count)
Allows to configure whether to count this exponentiation.
|
java.lang.String |
toString() |
ByteAccumulator |
updateAccumulator(ByteAccumulator accumulator)
Updates the ByteAccumulator with the unique byte representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitsquaregetUniqueByteRepresentationprotected Zn.ZnElement elem
protected DebugGroupImpl group
public DebugGroupElementImpl(DebugGroupImpl group, Zn.ZnElement elem)
group - The group this element belongs to.elem - The Zn element through which the group operations are done.public GroupImpl getStructure()
GroupElementImplgetStructure in interface GroupElementImplpublic GroupElementImpl inv()
GroupElementImplinv in interface GroupElementImplx.op(this).equals(getStructure().getNeutralElement())protected GroupElementImpl op(GroupElementImpl e, boolean count)
DebugGroupImpl.multiexp(Multiexponentiation) method.count - true if we want to count the operation, false otherwisepublic GroupElementImpl op(GroupElementImpl e) throws java.lang.IllegalArgumentException
GroupElementImplop in interface GroupElementImple - right hand side of the operationjava.lang.IllegalArgumentException - if e is of the wrong typeprotected GroupElementImpl pow(java.math.BigInteger k, boolean count)
DebugGroupImpl.multiexp(Multiexponentiation) method.k - exponentcount - true if we want to count the exponentiation, false otherwisepublic GroupElementImpl pow(java.math.BigInteger k)
GroupElementImplpow in interface GroupElementImplpublic boolean isNeutralElement()
GroupElementImplisNeutralElement in interface GroupElementImplpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object