chsvlib
chsv helper source code

◆ Cofactor() [1/2]

derived_type Cofactor ( ) const

Returns a new matrix with each element being a cofactor value for the corresponding element in the current matrix. .

Returns
A new cofactor matrix.

For the matrix \(A_{m\times n} = \left\{a_{i,j}\right\}\) the method returns a new matrix \(B_{m\times n} = \left\{b_{i,j}\right\}\), such that \(\forall 0 \leq i < m, 0 \leq j < n: b_{i,j} \leftarrow A.Cofactor(i, j)\).

Exceptions
Chusov::Exceptions::InvalidParameterExceptionThe current matrix is not square