Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.stat.distribution.uniform
This module contains algorithms for the continuous Uniform Distribution.
License:
Authors:
John Michael Hall
- pure nothrow @nogc @safe T
uniformPDF(T)(const Tx, const Tlower= 0, const Tupper= 1)
if (isFloatingPoint!T); - Computes the uniform probability density function (PDF).Parameters:
T xvalue to evaluate PDF T lowerlower bound T upperupper bound See Also:Examples:import mir.math.common: approxEqual; assert(0.5.uniformPDF == 1); assert(0.5.uniformPDF(0.0, 1.5).approxEqual(2.0 / 3)); assert(2.5.uniformPDF(1.0, 3.0).approxEqual(0.5));
- pure nothrow @nogc @safe T
uniformCDF(T)(const Tx, const Tlower= 0, const Tupper= 1)
if (isFloatingPoint!T); - Computes the uniform cumulative distribution function (CDF).Parameters:
T xvalue to evaluate CDF T lowerlower bound T upperupper bound See Also:Examples:import mir.math.common: approxEqual; assert(0.5.uniformCDF == 0.5); assert(0.5.uniformCDF(0.0, 1.5).approxEqual(1.0 / 3)); assert(2.5.uniformCDF(1.0, 3.0).approxEqual(3.0 / 4));
- pure nothrow @nogc @safe T
uniformCCDF(T)(const Tx, const Tlower= 0, const Tupper= 1)
if (isFloatingPoint!T); - Computes the uniform complementary cumulative distribution function (CCDF).Parameters:
T xvalue to evaluate CCDF T lowerlower bound T upperupper bound See Also:Examples:import mir.math.common: approxEqual; assert(0.5.uniformCCDF == 0.5); assert(0.5.uniformCCDF(0.0, 1.5).approxEqual(2.0 / 3)); assert(2.5.uniformCCDF(1.0, 3.0).approxEqual(1.0 / 4));
- pure nothrow @nogc @safe T
uniformInvCDF(T)(const Tp, const Tlower= 0, const Tupper= 1)
if (isFloatingPoint!T); - Computes the uniform inverse cumulative distribution function (InvCDF)Parameters:
T pvalue to evaluate InvCDF T lowerlower bound T upperupper bound See Also:Examples:import mir.math.common: approxEqual; assert(0.5.uniformInvCDF == 0.5); assert((1.0 / 3).uniformInvCDF(0.0, 1.5).approxEqual(0.5)); assert((3.0 / 4).uniformInvCDF(1.0, 3.0).approxEqual(2.5));
- pure nothrow @nogc @safe T
uniformLPDF(T)(const Tx, const Tlower= 0, const Tupper= 1)
if (isFloatingPoint!T); - Computes the uniform log probability density function (LPDF)Parameters:
T xvalue to evaluate LPDF T lowerlower bound T upperupper bound See Also:Examples:import mir.math.common: approxEqual, log; assert(0.5.uniformLPDF == 0); assert(0.5.uniformLPDF(0.0, 1.5).approxEqual(-log(1.5))); assert(1.5.uniformLPDF(1.0, 3.0).approxEqual(-log(2.0)));
Copyright © 2016-2023 by Ilya Yaroshenko | Page generated by
Ddoc on Wed Oct 18 12:23:06 2023