boolean calc = false;
for (int i = 0; i < GridVisualizer.GRIDSIZE; i++) {
for (int j = 0; j < GridVisualizer.GRIDSIZE; j++) {
if (dim0 != dim1 || i == j) {
Index index = new FastIndex();
index = index.set(dim0, i);
index = index.set(dim1, j);
int[] pixel = positionToPixel(new int[] {i, j});
EvalData data;
synchronized (valueMap) {
data = valueMap.get(index);
}
if (data == null) {
calc = true;
} else {
double contribution = data.contribution;
if (! Double.isNaN(contribution)) {
double b = 0.0;
double integrate = Math.abs(contribution);
int evals = evaluator.pointsForIndex(index);
if (mode == 0) {
b = 0.7 - 0.7 * MathTN.log10(integrate) / MathTN.log10(MathTN.FUDGE);
} else if (mode == 1) {
b = 0.4 + 0.1 * MathTN.log10(evals);
} else if (mode == 2) {
b = 0.7 - 0.7 * MathTN.log10(integrate / evals) / MathTN.log10(MathTN.FUDGE);
}
g.setColor(colorScale.getColor((b + colorOffset) * colorFactor));
g.fillRect(pixel[0], pixel[1], boxSize, boxSize);
// if (contribution > 0) {
// g.setColor(Color.BLACK);
// g.fillRect(pixel[0] + (boxSize * 3) / 8, pixel[1] + (boxSize * 3) / 8, boxSize / 4, boxSize / 4);
// }
}
}
}
}
}
g.setColor(Color.RED);
for (int i = 0; i < GridVisualizer.GRIDSIZE; i++) {
for (int j = 0; j < GridVisualizer.GRIDSIZE; j++) {
if (dim0 != dim1 || i == j) {
Index index = new FastIndex();
index = index.set(dim0, i);
index = index.set(dim1, j);
int[] pixel = positionToPixel(new int[] {i, j});
boolean borderX = false, borderY = false;
boolean evaluated;
synchronized (indicesEvaluated) {
evaluated = isEvaluatedInTimeLimit(index, timeLimit);
if (! evaluated) {
if (isEvaluatedInTimeLimit(index.add(dim0, -1), timeLimit)) {
borderX = true;
}
if (isEvaluatedInTimeLimit(index.add(dim1, -1), timeLimit)) {
borderY = true;
}
}
}