public interface GenericFieldElement extends Cloneable
Modifier and Type | Method and Description |
---|---|
GenericFieldElement |
add(GenericFieldElement b)
Adds
b to this . |
GenericFieldElement |
addBase(GenericFieldElement b)
Adds
b to this where b is an element
of the underlying base field. |
GenericFieldElement |
addOutOfPlace(GenericFieldElement b)
Adds
this with b which is an element of the base
field, where a new object holding the result is created. |
GenericFieldElement |
clone()
Clones the value of this field element.
|
GenericFieldElement |
divide(GenericFieldElement b)
Divides
this and another field elements. |
boolean |
equals(Object obj) |
GenericFieldElement |
exponentiate(BigInteger n)
Raises
this to the power n . |
GenericFieldElement |
exponentiate(int n)
Raises
this to the power n . |
GenericFieldElement |
exponentiateByPowerOf2(int n)
Raise
this to the power of 2^n . |
GenericFieldElement |
exponentiateOutOfPlace(BigInteger n)
Raises
this to the power n . |
GenericFieldElement |
exponentiateOutOfPlace(int n)
Raises
this to the power n . |
GenericField |
getField()
Returns the associated finite field.
|
int |
hashCode() |
GenericFieldElement |
invert()
Sets
this to its inverse. |
boolean |
isOne()
Determines whether
this is one. |
boolean |
isZero()
Determines whether
this is zero. |
GenericFieldElement |
multiply(BigInteger n)
Multiples
this by n . |
GenericFieldElement |
multiply(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field. |
GenericFieldElement |
multiplyByBase(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field. |
GenericFieldElement |
multiplyByBaseOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field, where a new object holding the result is created. |
GenericFieldElement |
multiplyOutOfPlace(BigInteger n)
Multiples
this by n , where a new object holding
the result is created. |
GenericFieldElement |
multiplyOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field, where a new object holding the result is created. |
GenericFieldElement |
negate()
Returns the negative of
this . |
GenericFieldElement |
negateOutOfPlace()
Returns the negative of
this , where a new object holding the
result is created. |
GenericFieldElement |
square()
Computes the square of
this in-place. |
GenericFieldElement |
squareOutOfPlace()
Computes the square of
this , where a new object holding the
result is created. |
GenericFieldElement |
squareRoot()
Computes the square root of
this in-place. |
GenericFieldElement |
subtract(GenericFieldElement b)
Subtracts
b from this . |
GenericFieldElement |
subtractOutOfPlace(GenericFieldElement b)
Subtracts
b from this which is an element of the
base field, where a new object holding the result is created. |
byte[] |
toByteArray()
Returns the
byte[] representation of this instance. |
String |
toString() |
GenericFieldElement negate()
this
. This functions works in-place.this
GenericFieldElement negateOutOfPlace()
this
, where a new object holding the
result is created.this
GenericFieldElement add(GenericFieldElement b)
b
to this
. This functions works in-place.b
- the second addendthis
and b
GenericFieldElement addOutOfPlace(GenericFieldElement b)
this
with b
which is an element of the base
field, where a new object holding the result is created.b
- the second factorthis
and b
GenericFieldElement addBase(GenericFieldElement b)
b
to this
where b
is an element
of the underlying base field.b
- the second addendthis
and b
GenericFieldElement subtract(GenericFieldElement b)
b
from this
. This functions works in-place.b
- the subtrahendthis
and b
GenericFieldElement subtractOutOfPlace(GenericFieldElement b)
b
from this
which is an element of the
base field, where a new object holding the result is created.b
- the second factorthis
and b
GenericFieldElement invert()
this
to its inverse.this
GenericFieldElement multiply(GenericFieldElement b)
this
with b
which is an element of the
same field.b
- the second factorthis
and b
GenericFieldElement multiplyOutOfPlace(GenericFieldElement b)
this
with b
which is an element of the
same field, where a new object holding the result is created.b
- the second factorthis
and b
GenericFieldElement multiplyByBase(GenericFieldElement b)
this
with b
which is an element of the
base field.b
- the second factorthis
and b
GenericFieldElement multiplyByBaseOutOfPlace(GenericFieldElement b)
this
with b
which is an element of the
base field, where a new object holding the result is created.b
- the second factorthis
and b
GenericFieldElement multiply(BigInteger n)
this
by n
.n
- the factorthis
and n
GenericFieldElement multiplyOutOfPlace(BigInteger n)
this
by n
, where a new object holding
the result is created.n
- the factorthis
and n
GenericFieldElement divide(GenericFieldElement b)
this
and another field elements.b
- the divisorthis
and b
GenericFieldElement square()
this
in-place.this
GenericFieldElement squareOutOfPlace()
this
, where a new object holding the
result is created.this
GenericFieldElement squareRoot()
this
in-place.this
or null
if the
square root does not exist.GenericFieldElement exponentiate(BigInteger n)
this
to the power n
.
Works in-place.n
- the exponentn
th power of this
GenericFieldElement exponentiate(int n)
this
to the power n
.
Works in-place.n
- the exponentn
th power of this
GenericFieldElement exponentiateOutOfPlace(BigInteger n)
this
to the power n
.n
- the exponentn
th power of this
GenericFieldElement exponentiateOutOfPlace(int n)
this
to the power n
.n
- the exponentn
th power of this
GenericFieldElement exponentiateByPowerOf2(int n)
this
to the power of 2^n
.n
- the exponentn
-th power of this
.boolean isOne()
this
is one.this
is the one elementboolean isZero()
this
is zero.this
is the zero elementGenericField getField()
GenericFieldElement clone()
byte[] toByteArray()
byte[]
representation of this instance.byte[]
representationCopyright © 2011–2022 Stiftung SIC. All rights reserved.