77 |
|
} |
78 |
|
} |
79 |
|
|
80 |
– |
|
80 |
|
abstract static class MatrixTree extends RecursiveAction { |
81 |
|
// maximum difference between old and new values |
82 |
|
double maxDiff; |
94 |
|
double m = maxDiff; |
95 |
|
return (md > m) ? md : m; |
96 |
|
} |
98 |
– |
|
97 |
|
} |
98 |
|
|
101 |
– |
|
99 |
|
static final class LeafNode extends MatrixTree { |
100 |
|
final double[][] A; // matrix to get old values from |
101 |
|
final double[][] B; // matrix to put new values into |
159 |
|
} |
160 |
|
} |
161 |
|
|
165 |
– |
|
162 |
|
static final class TwoNode extends MatrixTree { |
163 |
|
final MatrixTree q1; |
164 |
|
final MatrixTree q2; |
174 |
|
|
175 |
|
} |
176 |
|
|
181 |
– |
|
177 |
|
static final class Driver extends RecursiveAction { |
178 |
|
MatrixTree mat; |
179 |
|
double[][] A; double[][] B; |
245 |
|
System.out.println("max diff after " + steps + " steps = " + md); |
246 |
|
} |
247 |
|
} |
253 |
– |
|
254 |
– |
|
248 |
|
} |