You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 73b5d17
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -318,7 +318,7 @@ class DoubleSumOp implements Function<double[], Double> {
318
318
// define total progress size
319
319
Progress.defineTotal(inArray.length);
320
320
double sum =0;
321
-
for (double v : inArray) {
321
+
for (var v : inArray) {
322
322
sum += v;
323
323
// increment progress
324
324
Progress.update();
@@ -356,11 +356,10 @@ class DoubleMeanOp implements Function<double[], Double> {
356
356
publicDoubleapply(finaldouble[] inArray) {
357
357
// There's no significant work here, but we do have 2 subtasks.
358
358
Progress.defineTotal(0, 2);
359
-
finalDouble sum = sumOp.apply(inArray);
359
+
finalvar sum = sumOp.apply(inArray);
360
360
finalDouble size = sizeOp.apply(inArray);
361
361
return sum / size;
362
-
}
363
-
}
362
+
364
363
```
365
364
366
365
For best results, ensure your Op records Progress updates at a reasonable frequency. If too frequent, progress updates can detract from algorithm performance, and if too infrequent, they will be of little help to the user!
0 commit comments