Extends
Methods
add(other)
Computes the sum of this element and the input.
Parameters:
Name | Type | Description |
---|---|---|
other |
Other ring element from the same ring as this element. |
- Overrides:
- Source:
Returns:
this + other.
assertType(other)
Throws an error if this and the input are not
instances of the same class and are contained in the same ring.
Parameters:
Name | Type | Description |
---|---|---|
other |
Other element expected to be contained in the same ring. |
- Inherited From:
- Source:
equals(other)
Compares this element and the input.
Parameters:
Name | Type | Description |
---|---|---|
other |
Other ring element. |
- Overrides:
- Source:
Returns:
true or false depending on if this element equals the input
or not.
getPRing()
Returns the ring containing this element.
- Inherited From:
- Source:
Returns:
Ring containing this element.
inv()
Returns the multiplicative inverse of this element.
- Overrides:
- Source:
Returns:
Multiplicative inverse of this element.
mul(other)
Computes product of this element and the input. If the
input belongs to the ring of exponents to which this element
belongs, then we multiply each component of this element with each
component of the input, and otherwise we simply multiply each
component of this element by the input directly.
Parameters:
Name | Type | Description |
---|---|---|
other |
Other ring element or integer. |
- Overrides:
- Source:
Returns:
this * other.
neg()
Returns the negative of this element.
- Overrides:
- Source:
Returns:
Negative of this element.
sub(other)
Computes the difference of this element and the input.
Parameters:
Name | Type | Description |
---|---|---|
other |
Other ring element from the same ring as this element. |
- Overrides:
- Source:
Returns:
this - other.
toByteTree()
Computes a byte tree representation of this element.
- Overrides:
- Source:
Returns:
Byte tree representation of this element.
toString()
Compiles a human readable representation of this
element. This should only be used for debugging.
- Overrides:
- Source:
Returns:
Human readable representation of this element.