if (isValid(indexMap, succIndex)) {
if (evaluator.canEvaluate(succIndex)) {
activateIndex(succIndex, estimate);
} else {
couldExpandFully = false;
IntegrationInfo info = new CouldNotEvaluateInfo(evaluator, succIndex);
result.supplementalInfo.add(info);
}
}
}
if (dimension == 0 && index.lastEntry() == currentDimension - 1) {
currentDimension++;
activateIndex(zeroIndex.set(currentDimension - 1, 1), Double.POSITIVE_INFINITY);
}
if (couldExpandFully) {
errorEstimate -= Math.abs(evalData.contribution);
}
if (! primaryCompleted && index.sum() == 1) {
primaryIndices++;
if (dimension == 0) {
if (primaryIndices == 2) {
primaryCompleted = true;
}
} else {
if (primaryIndices == dimension) {
primaryCompleted = true;
}
}
}
if (primaryCompleted) {
result.errorEstimate = errorEstimate;
}
Visualizers.submitToList(visualizers, new IndexStatus(index, "expanded"));
}
result.supplementalInfo.add(new IntegrationInfo("Indices higher than estimate: " + higherThanEstimate +
" contribution: " + higherContributions));
Visualizers.submitToList(visualizers, new StopIntegration(result));
return result;