| 142 | |
| 143 | |
| 144 | bool IsDiag(const matrix& A) |
| 145 | { |
| 146 | int i,j,r=A.size(),c=A[0].size(); |
| 147 | for (i=0; i<r; i++) |
| 148 | { for (j=0; j<c; j++) |
| 149 | { if (i!=j && A[i][j]!=0) { return false; } } |
| 150 | } |
| 151 | return true; |
| 152 | } |
| 153 | |
| 154 | bool IsIdent(const matrix& A) |
| 155 | { |