| 731 | } |
| 732 | |
| 733 | bool subMatrix(const matrix aMat, const int rowIndex1, const int rowIndex2, |
| 734 | const int colIndex1, const int colIndex2, matrix &subMat) |
| 735 | { |
| 736 | if (rowIndex1 > rowIndex2) return false; |
| 737 | if (colIndex1 > colIndex2) return false; |
| 738 | int rr = rowIndex2 - rowIndex1 + 1; |
| 739 | int cc = colIndex2 - colIndex1 + 1; |
| 740 | subMat = mpNew(rr, cc); |
| 741 | for (int r = 1; r <= rr; r++) |
| 742 | for (int c = 1; c <= cc; c++) |
| 743 | MATELEM(subMat, r, c) = |
| 744 | pCopy(MATELEM(aMat, rowIndex1 + r - 1, colIndex1 + c - 1)); |
| 745 | return true; |
| 746 | } |
| 747 | |
| 748 | bool charPoly(const matrix aMat, poly &charPoly) |
| 749 | { |
no test coverage detected