| 225 | } |
| 226 | |
| 227 | private void mainLoop(boolean[] converged, Vec[] xit, int[] designations, Vec scratch, final KernelFunction k) |
| 228 | { |
| 229 | boolean progress = true; |
| 230 | |
| 231 | int count = 0; |
| 232 | |
| 233 | while(progress && count++ < maxIterations) |
| 234 | { |
| 235 | progress = false; |
| 236 | |
| 237 | for(int i = 0; i < converged.length; i++) |
| 238 | { |
| 239 | if(converged[i]) |
| 240 | continue; |
| 241 | progress = true; |
| 242 | |
| 243 | convergenceStep(xit, i, converged, designations, scratch, k); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | //Fill b/c we may have bailed out due to maxIterations |
| 248 | Arrays.fill(converged, true); |
| 249 | } |
| 250 | |
| 251 | private void mainLoop(final boolean[] converged, final Vec[] xit, final int[] designations, final KernelFunction k, ExecutorService ex) throws InterruptedException, BrokenBarrierException |
| 252 | { |