Arcium LogoArcium TS SDK Docs

Matrix

Matrix class over FpField. Data is row-major.

Constructors

Constructor

new Matrix(field, data): Matrix

Parameters

ParameterType
fieldFpField
datareadonly bigint[][]

Returns

Matrix

Properties

PropertyType
datareadonly bigint[][]
fieldFpField

Methods

add()

add(rhs, ct): Matrix

Element-wise addition between this and rhs.

Parameters

ParameterTypeDefault value
rhsMatrixundefined
ctbooleanfalse

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

ParameterType
rhsMatrix

Returns

Matrix


pow()

pow(e): Matrix

Raises each element of this to the power e.

Parameters

ParameterType
ebigint

Returns

Matrix


sub()

sub(rhs, ct): Matrix

Element-wise subtraction between this and rhs.

Parameters

ParameterTypeDefault value
rhsMatrixundefined
ctbooleanfalse

Returns

Matrix