value_type Cofactor | ( | size_type | iColumn, |
size_type | iRow | ||
) | const |
Returns a cofactor associated with the specified element.
iColumn | is an index of a column, where the element is located. |
iRow | is an index of a row, where the element is located. |
iColumn
and iRow
is even, the value is equal to the result of applying the Minor method with the same parameters. Otherwise the returned value is equal to the additive invertion of the Minor return value.For any matrix \(A_{m\times n} = \left(\begin{array}{ccccccc} a_{1,1} & \cdots & a_{1,j-1} & a_{1,j} & a_{1,j+1} & \cdots & a_{1,n} \\ \vdots & \ddots & \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{j-1,1} & \cdots & a_{i-1,j-1} & a_{i-1,j} & a_{i-1,j+1} & \cdots & a_{i-1,n}\\ a_{j,1} & \cdots & a_{i,j-1} & a_{i,j} & a_{i,j+1} & \cdots & a_{i,n} \\ a_{j+1,1} & \cdots & a_{i+1,j-1} & a_{i+1,j} & a_{i+1,j+1} & \cdots & a_{i+1,n}\\ \vdots & \ddots & \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{m,1} & \cdots & a_{m,j-1} & a_{m,j} & a_{m,j+1} & \cdots & a_{m,n} \end{array}\right)\)
will calculate the determinant \({\left(-1\right)}^{i+i}\cdot \left|\begin{array}{cccccc} a_{1,1} & \cdots & a_{1,j-1} & a_{1,j+1} & \cdots & a_{1,n} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{j-1,1} & \cdots & a_{i-1,j-1} & a_{i-1,j+1} & \cdots & a_{i-1,n}\\ a_{j+1,1} & \cdots & a_{i+1,j-1} & a_{i+1,j+1} & \cdots & a_{i+1,n}\\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{m,1} & \cdots & a_{m,j-1} & a_{m,j+1} & \cdots & a_{m,n} \end{array}\right|\).
Chusov::Exceptions::InvalidParameterException | The current matrix is not square |