chsvlib
chsv helper source code

◆ determinant_field()

ValueType Chusov::Math::determinant_field ( const ValueType *  matrix_elements,
std::size_t  n 
)

Computes a determinant of a square matrix defined over a field.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]matrix_elementspoints to a two-dimensional array of elements representing the matrix. The size of the array is \(n^2\).
nA number of columns and a number of rows of the matrix.
Returns
The determinant of the matrix.
Exceptions
Anexception is possible as a result of an attempt to calculate a multiplicative reciprocal of an element that does not have a multiplicative inversion.