Quantile

Quantile function interface

interface Quantile (
T
) {}

Members

Functions

opCall
T opCall(T x)

Call operator

Examples

1 import std.traits, std.mathspecial;
2 
3 class NormalQuantile : Quantile!real
4 {
5 	real opCall(real x)
6 	in {
7 		assert(x >= 0);
8 		assert(x <= 1);
9 	}
10 	body {
11 		return normalDistributionInverse(x);
12 	}
13 }
14 
15 auto qf = new NormalQuantile;
16 auto x = qf(0.1);
17 assert(isNormal(x));

Meta