MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / mainLoop

Method mainLoop

JSAT/src/jsat/clustering/MeanShift.java:227–249  ·  view source on GitHub ↗
(boolean[] converged, Vec[] xit, int[] designations, Vec scratch, final KernelFunction k)

Source from the content-addressed store, hash-verified

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 {

Callers 1

clusterMethod · 0.95

Calls 5

convergenceStepMethod · 0.95
submitMethod · 0.80
resetMethod · 0.80
putMethod · 0.45
awaitMethod · 0.45

Tested by

no test coverage detected