Function scirust::linalg::det::det [] [src]

pub fn det<T: CommutativeRingPartial + Signed>(m: &Matrix<T>) -> Result<T, SRError>

Returns the determinant of a matrix.

Remarks

This is a naive implementation of determinant based on the definition of determinant. See det_float for better implementation for floating point matrices.

Usually determinants based on elimination or factorization are much faster.

The determinant is defined only for square matrices.

The determinant of an empty matrix is 1.
See http://en.wikipedia.org/wiki/Matrix_(mathematics)#Empty_matrices.