Matrix
Matrix class over FpField. Data is row-major.
Constructors
Constructor
new Matrix(
field,data):Matrix
Parameters
| Parameter | Type |
|---|---|
field | FpField |
data | readonly bigint[][] |
Returns
Matrix
Properties
| Property | Type |
|---|---|
data | readonly bigint[][] |
field | FpField |
Methods
add()
add(
rhs,ct):Matrix
Element-wise addition between this and rhs.
Parameters
| Parameter | Type | Default value |
|---|---|---|
rhs | Matrix | undefined |
ct | boolean | false |
Returns
Matrix
det()
det():
bigint
computs the determinant using gaus elimination matches the determinant implementation in arcis
Returns
bigint
is_square()
is_square():
boolean
Returns
boolean
matMul()
matMul(
rhs):Matrix
Matrix multiplication between this and rhs.
Parameters
| Parameter | Type |
|---|---|
rhs | Matrix |
Returns
Matrix
pow()
pow(
e):Matrix
Raises each element of this to the power e.
Parameters
| Parameter | Type |
|---|---|
e | bigint |
Returns
Matrix
sub()
sub(
rhs,ct):Matrix
Element-wise subtraction between this and rhs.
Parameters
| Parameter | Type | Default value |
|---|---|---|
rhs | Matrix | undefined |
ct | boolean | false |
Returns
Matrix