public interface FieldElement extends GenericFieldElement
Field
,
BinaryFieldElement
,
PrimeFieldElement
Modifier and Type | Method and Description |
---|---|
FieldElement |
add(GenericFieldElement b)
Adds
b to this . |
FieldElement |
addBase(GenericFieldElement B)
Adds
b to this where b is an element
of the underlying base field. |
FieldElement |
clone()
Clones the value of this field element.
|
FieldElement |
divide(GenericFieldElement b)
Divides
this and another field elements. |
FieldElement |
exponentiate(BigInteger n)
Raises
this to the power n . |
int |
getBit(int index)
Returns the value of a certain bit of
this . |
FieldElement |
invert()
Sets
this to its inverse. |
FieldElement |
multiply(BigInteger n)
Multiples
this by n . |
FieldElement |
multiply(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field. |
FieldElement |
multiplyByBase(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field. |
FieldElement |
multiplyByBaseOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
base field, where a new object holding the result is created. |
FieldElement |
multiplyOutOfPlace(BigInteger n)
Multiples
this by n , where a new object holding
the result is created. |
FieldElement |
multiplyOutOfPlace(GenericFieldElement b)
Multiplies
this with b which is an element of the
same field, where a new object holding the result is created. |
FieldElement |
negate()
Returns the negative of
this . |
FieldElement |
square()
Computes the square of
this in-place. |
FieldElement |
squareOutOfPlace()
Computes the square of
this , where a new object holding the
result is created. |
FieldElement |
squareRoot()
Computes the square root of
this . |
FieldElement |
subtract(GenericFieldElement b)
Subtracts
b from this . |
boolean |
testBit(int index)
Tests whether a certain bit of
this is set. |
BigInteger |
toBigInteger()
Returns the
BigInteger -representation of this instance. |
addOutOfPlace, equals, exponentiate, exponentiateByPowerOf2, exponentiateOutOfPlace, exponentiateOutOfPlace, getField, hashCode, isOne, isZero, negateOutOfPlace, subtractOutOfPlace, toByteArray, toString
FieldElement negate()
GenericFieldElement
this
. This functions works in-place.negate
in interface GenericFieldElement
this
FieldElement add(GenericFieldElement b)
GenericFieldElement
b
to this
. This functions works in-place.add
in interface GenericFieldElement
b
- the second addendthis
and b
FieldElement addBase(GenericFieldElement B)
GenericFieldElement
b
to this
where b
is an element
of the underlying base field.addBase
in interface GenericFieldElement
B
- the second addendthis
and b
FieldElement subtract(GenericFieldElement b)
GenericFieldElement
b
from this
. This functions works in-place.subtract
in interface GenericFieldElement
b
- the subtrahendthis
and b
FieldElement invert()
GenericFieldElement
this
to its inverse.invert
in interface GenericFieldElement
this
FieldElement multiply(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
same field.multiply
in interface GenericFieldElement
b
- the second factorthis
and b
FieldElement multiplyOutOfPlace(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
same field, where a new object holding the result is created.multiplyOutOfPlace
in interface GenericFieldElement
b
- the second factorthis
and b
FieldElement multiply(BigInteger n)
GenericFieldElement
this
by n
.multiply
in interface GenericFieldElement
n
- the factorthis
and n
FieldElement multiplyOutOfPlace(BigInteger n)
GenericFieldElement
this
by n
, where a new object holding
the result is created.multiplyOutOfPlace
in interface GenericFieldElement
n
- the factorthis
and n
FieldElement multiplyByBase(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
base field.multiplyByBase
in interface GenericFieldElement
b
- the second factorthis
and b
FieldElement multiplyByBaseOutOfPlace(GenericFieldElement b)
GenericFieldElement
this
with b
which is an element of the
base field, where a new object holding the result is created.multiplyByBaseOutOfPlace
in interface GenericFieldElement
b
- the second factorthis
and b
FieldElement divide(GenericFieldElement b)
GenericFieldElement
this
and another field elements.divide
in interface GenericFieldElement
b
- the divisorthis
and b
FieldElement square()
GenericFieldElement
this
in-place.square
in interface GenericFieldElement
this
FieldElement squareOutOfPlace()
GenericFieldElement
this
, where a new object holding the
result is created.squareOutOfPlace
in interface GenericFieldElement
this
FieldElement exponentiate(BigInteger n)
GenericFieldElement
this
to the power n
.
Works in-place.exponentiate
in interface GenericFieldElement
n
- the exponentn
th power of this
FieldElement squareRoot()
this
.squareRoot
in interface GenericFieldElement
this
boolean testBit(int index)
this
is set.index
- the index of the bitint getBit(int index)
this
.index
- the index of the bitBigInteger toBigInteger()
BigInteger
-representation of this instance.BigInteger
-representationFieldElement clone()
clone
in interface GenericFieldElement
Copyright © 2011–2022 Stiftung SIC. All rights reserved.