import mir.test: shouldApprox; 0.uniformDiscreteCDF.shouldApprox == 0.5; 1.uniformDiscreteCDF.shouldApprox == 1.0; 1.uniformDiscreteCDF(1, 3).shouldApprox == 1.0 / 3; 2.uniformDiscreteCDF(1, 3).shouldApprox == 2.0 / 3; 3.uniformDiscreteCDF(1, 3).shouldApprox == 1.0;
Computes the discrete uniform cumulative distribution function (CDF).