Documentation
Preparing search index...
@divviup/field
<internal>
PrimeField
Class PrimeField
Index
Constructors
constructor
Properties
element
Size
modulus
Methods
add
add
Polys
add
Vector
Elements
combine
Vectors
div
div
Polys
div
Vector
Elements
eval
Poly
At
eval
Poly
At
Roots
exp
exp
Vector
Elements
get
Power
Series
get
Root
Of
Unity
interpolate
interpolate
Roots
inv
inv
Vector
Elements
mod
mul
mul
Polys
mul
Vector
Elements
new
Vector
From
rand
sub
sub
Polys
sub
Vector
Elements
Constructors
constructor
new
PrimeField
(
modulus
:
bigint
)
:
PrimeField
Parameters
modulus
:
bigint
Returns
PrimeField
Properties
Readonly
element
Size
elementSize
:
number
Readonly
modulus
modulus
:
bigint
Methods
add
add
(
x
:
bigint
,
y
:
bigint
)
:
bigint
Parameters
x
:
bigint
y
:
bigint
Returns
bigint
add
Polys
addPolys
(
a
:
Vector
,
b
:
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
Vector
Returns
Vector
add
Vector
Elements
addVectorElements
(
a
:
Vector
,
b
:
bigint
|
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
bigint
|
Vector
Returns
Vector
combine
Vectors
combineVectors
(
a
:
Vector
,
b
:
Vector
)
:
bigint
Parameters
a
:
Vector
b
:
Vector
Returns
bigint
div
div
(
x
:
bigint
,
y
:
bigint
)
:
bigint
Parameters
x
:
bigint
y
:
bigint
Returns
bigint
div
Polys
divPolys
(
a
:
Vector
,
b
:
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
Vector
Returns
Vector
div
Vector
Elements
divVectorElements
(
a
:
Vector
,
b
:
bigint
|
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
bigint
|
Vector
Returns
Vector
eval
Poly
At
evalPolyAt
(
p
:
Vector
,
x
:
bigint
)
:
bigint
Parameters
p
:
Vector
x
:
bigint
Returns
bigint
eval
Poly
At
Roots
evalPolyAtRoots
(
p
:
Vector
,
rootsOfUnity
:
Vector
)
:
Vector
Parameters
p
:
Vector
rootsOfUnity
:
Vector
Returns
Vector
exp
exp
(
base
:
bigint
,
exponent
:
bigint
)
:
bigint
Parameters
base
:
bigint
exponent
:
bigint
Returns
bigint
exp
Vector
Elements
expVectorElements
(
a
:
Vector
,
b
:
bigint
|
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
bigint
|
Vector
Returns
Vector
get
Power
Series
getPowerSeries
(
seed
:
bigint
,
length
:
number
)
:
Vector
Parameters
seed
:
bigint
length
:
number
Returns
Vector
get
Root
Of
Unity
getRootOfUnity
(
order
:
number
)
:
bigint
Parameters
order
:
number
Returns
bigint
interpolate
interpolate
(
xs
:
Vector
,
ys
:
Vector
)
:
Vector
Parameters
xs
:
Vector
ys
:
Vector
Returns
Vector
interpolate
Roots
interpolateRoots
(
rootsOfUnity
:
Vector
,
ys
:
Vector
)
:
Vector
Parameters
rootsOfUnity
:
Vector
ys
:
Vector
Returns
Vector
inv
inv
(
a
:
bigint
)
:
bigint
Parameters
a
:
bigint
Returns
bigint
inv
Vector
Elements
invVectorElements
(
source
:
Vector
)
:
Vector
Parameters
source
:
Vector
Returns
Vector
mod
mod
(
value
:
bigint
)
:
bigint
Parameters
value
:
bigint
Returns
bigint
mul
mul
(
x
:
bigint
,
y
:
bigint
)
:
bigint
Parameters
x
:
bigint
y
:
bigint
Returns
bigint
mul
Polys
mulPolys
(
a
:
Vector
,
b
:
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
Vector
Returns
Vector
mul
Vector
Elements
mulVectorElements
(
a
:
Vector
,
b
:
bigint
|
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
bigint
|
Vector
Returns
Vector
new
Vector
From
newVectorFrom
(
values
:
bigint
[]
)
:
Vector
Parameters
values
:
bigint
[]
Returns
Vector
rand
rand
()
:
bigint
Returns
bigint
sub
sub
(
x
:
bigint
,
y
:
bigint
)
:
bigint
Parameters
x
:
bigint
y
:
bigint
Returns
bigint
sub
Polys
subPolys
(
a
:
Vector
,
b
:
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
Vector
Returns
Vector
sub
Vector
Elements
subVectorElements
(
a
:
Vector
,
b
:
bigint
|
Vector
)
:
Vector
Parameters
a
:
Vector
b
:
bigint
|
Vector
Returns
Vector
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
element
Size
modulus
Methods
add
add
Polys
add
Vector
Elements
combine
Vectors
div
div
Polys
div
Vector
Elements
eval
Poly
At
eval
Poly
At
Roots
exp
exp
Vector
Elements
get
Power
Series
get
Root
Of
Unity
interpolate
interpolate
Roots
inv
inv
Vector
Elements
mod
mul
mul
Polys
mul
Vector
Elements
new
Vector
From
rand
sub
sub
Polys
sub
Vector
Elements
Documentation
Loading...