| 217 | |
| 218 | |
| 219 | dReal dMatrix::maxDifference (const dMatrix &a) |
| 220 | { |
| 221 | if (n != a.n || m != a.m) dDebug (0,"maxDifference(), mismatched sizes"); |
| 222 | dReal max = 0; |
| 223 | for (int i=0; i<n; i++) { |
| 224 | for (int j=0; j<m; j++) { |
| 225 | dReal diff = dFabs(data[i*m+j] - a.data[i*m+j]); |
| 226 | if (diff > max) max = diff; |
| 227 | } |
| 228 | } |
| 229 | return max; |
| 230 | } |
no test coverage detected