77 |
|
} |
78 |
|
} |
79 |
|
|
80 |
– |
|
80 |
|
abstract static class MatrixTree extends CountedCompleter<Void> { |
81 |
|
// maximum difference between old and new values |
82 |
|
double maxDiff; |
83 |
|
MatrixTree(CountedCompleter<?> p, int c) { super(p, c); } |
84 |
|
} |
85 |
|
|
87 |
– |
|
86 |
|
static final class LeafNode extends MatrixTree { |
87 |
|
final double[][] A; // matrix to get old values from |
88 |
|
final double[][] B; // matrix to put new values into |
156 |
|
} |
157 |
|
} |
158 |
|
|
161 |
– |
|
159 |
|
static final class TwoNode extends MatrixTree { |
160 |
|
MatrixTree q1; |
161 |
|
MatrixTree q2; |
257 |
|
System.out.println("max diff after " + steps + " steps = " + md); |
258 |
|
} |
259 |
|
} |
263 |
– |
|
264 |
– |
|
260 |
|
} |