| 132 | |
| 133 | |
| 134 | dReal dMaxDifferenceLowerTriangle (const dReal *A, const dReal *B, int n) |
| 135 | { |
| 136 | int i,j; |
| 137 | int skip = dPAD(n); |
| 138 | dReal diff,max; |
| 139 | max = 0; |
| 140 | for (i=0; i<n; i++) { |
| 141 | for (j=0; j<=i; j++) { |
| 142 | diff = dFabs(A[i*skip+j] - B[i*skip+j]); |
| 143 | if (diff > max) max = diff; |
| 144 | } |
| 145 | } |
| 146 | return max; |
| 147 | } |