1
0
This commit is contained in:
2024-10-03 14:36:39 +03:00
parent 072f536fd8
commit de5ca5fa13

View File

@@ -122,15 +122,12 @@ public class IntegralCalculator {
currentStart = end; currentStart = end;
futures.add(executor.submit(() -> { futures.add(executor.submit(() -> {
var prevSteps = 0;
var steps = 0;
var partitionSum = 0.0; var partitionSum = 0.0;
for (var j = start; j < end; j++) { for (var j = start; j < end; j++) {
partitionSum += function.apply(lowerBound + h * j); partitionSum += function.apply(lowerBound + h * j);
steps++;
var progress = total.incrementAndGet(); var progress = total.incrementAndGet();
progressCallback.accept(progress, n); this.callProgressCallback(progress, n);
} }
return partitionSum; return partitionSum;