value to evaluate CCDF
slice containing the probability associated with the Categorical Distribution
import mir.ndslice.slice: sliced; import mir.test: shouldApprox; static immutable x = [0.1, 0.5, 0.4]; auto p = x.sliced; 0.categoricalCCDF(p).shouldApprox == 1.0; 1.categoricalCCDF(p).shouldApprox == 0.9; 2.categoricalCCDF(p).shouldApprox == 0.4;
Can also use dynamic array
import mir.test: shouldApprox; double[] p = [0.1, 0.5, 0.4]; 0.categoricalCCDF(p).shouldApprox == 1.0; 1.categoricalCCDF(p).shouldApprox == 0.9; 2.categoricalCCDF(p).shouldApprox == 0.4;
Computes the Categorical complementary cumulative distribution function (CCDF).