minor abstract method

Matrix<T> minor(
  1. int row,
  2. int col
)

A minor of a matrix A is the determinant of some smaller square matrix, cut down from A by removing one or more of its rows and columns.

This function only computes the first minor, which is the minor obtained by only removing 1 row and 1 column from the source matrix. This is often useful to calculate cofactors.

A MatrixException object is thrown in a few cases:

  • row or col is smaller than zero;
  • row or col are higher than, respectively, the total row or column count;
  • row or col is 1.

Implementation

Matrix<T> minor(int row, int col);