15 |
|
/** |
16 |
|
* The maximum number of matrix cells |
17 |
|
* at which to stop recursing down and instead directly update. |
18 |
< |
**/ |
19 |
< |
|
18 |
> |
*/ |
19 |
|
static final double EPSILON = 0.0001; // convergence criterion |
20 |
|
|
21 |
|
public static void main(String[] args) throws Exception { |
92 |
|
reinitialize(); |
93 |
|
} |
94 |
|
double m = maxDiff; |
95 |
< |
return (md > m)? md : m; |
95 |
> |
return (md > m) ? md : m; |
96 |
|
} |
97 |
|
|
98 |
|
} |
118 |
|
|
119 |
|
public void compute() { |
120 |
|
boolean AtoB = (steps++ & 1) == 0; |
121 |
< |
double[][] a = (AtoB)? A : B; |
122 |
< |
double[][] b = (AtoB)? B : A; |
121 |
> |
double[][] a = AtoB ? A : B; |
122 |
> |
double[][] b = AtoB ? B : A; |
123 |
|
|
124 |
|
double md = 0.0; // local for computing max diff |
125 |
|
|