I think there's a small problem with intermediate values in this code snippet:
const maxValue = Math.max(...samplingVector) samplingVector = samplingVector.map((value) => { value = x / maxValue; // Normalize value = Math.pow(x, exponent); value = x * maxValue; // Denormalize return value; })
reply
let maxValue = value; for (const externalIndex of AFFECTING_EXTERNAL_INDICES[i]) { maxValue = Math.max(value, externalSamplingVector[externalIndex]); }
I think there's a small problem with intermediate values in this code snippet:
Replace x by value.