normalSequence function
Returns a monotonically decreasing sequence with
entries: tStart, ..., tEnd
.
t(k) = tStart * exp(-pow(k / (2 * sigma), 2)
where
sigma = n/sqrt(2 * log(tStart / tEnd))
.
Implementation
List<num> normalSequence(
num tStart,
num tEnd, {
int iterations = 1000,
}) {
final invTwoSigmaSq = log(tStart / tEnd) / pow(iterations - 1, 2);
return List<num>.generate(
iterations, (i) => tStart * exp(-i * i * invTwoSigmaSq));
}