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.rayleigh
This module contains algorithms for the Rayleigh Distribution.
License:
Authors:
John Michael Hall
- pure nothrow @nogc @safe T
rayleighPDF
(T)(const Tx
)
if (isFloatingPoint!T); - Computes the Rayleigh probability density function (PDF).Parameters:
T x
value to evaluate PDF See Also: - pure nothrow @nogc @safe T
rayleighPDF
(T)(const Tx
, const Tscale
)
if (isFloatingPoint!T); - Ditto, with scale parameter.Parameters:
T x
value to evaluate PDF T scale
scale parameter Examples:import mir.test: shouldApprox; 0.0.rayleighPDF.shouldApprox == 0.0; 0.5.rayleighPDF.shouldApprox == 0.4412485; 1.0.rayleighPDF.shouldApprox == 0.6065307; 2.0.rayleighPDF.shouldApprox == 0.2706706; // Can also provide scale parameter 0.5.rayleighPDF(2.0).shouldApprox == 0.1211541; 1.0.rayleighPDF(2.0).shouldApprox == 0.2206242; 4.0.rayleighPDF(2.0).shouldApprox == 0.1353353;
- pure nothrow @nogc @safe T
rayleighCDF
(T)(const Tx
)
if (isFloatingPoint!T); - Computes the Rayleigh cumulative distribution function (CDF).Parameters:
T x
value to evaluate CDF See Also: - T
rayleighCDF
(T)(const Tx
, const Tscale
)
if (isFloatingPoint!T); - Ditto, with scale parameter.Parameters:
T x
value to evaluate CDF T scale
scale parameter Examples:import mir.test: shouldApprox; 0.0.rayleighCDF.shouldApprox == 0.0; 0.5.rayleighCDF.shouldApprox == 0.1175031; 1.0.rayleighCDF.shouldApprox == 0.3934693; 2.0.rayleighCDF.shouldApprox == 0.8646647; // Can also provide scale parameter 0.5.rayleighCDF(2.0).shouldApprox == 0.03076677; 1.0.rayleighCDF(2.0).shouldApprox == 0.1175031; 4.0.rayleighCDF(2.0).shouldApprox == 0.8646647;
- pure nothrow @nogc @safe T
rayleighCCDF
(T)(const Tx
)
if (isFloatingPoint!T); - Computes the Rayleigh complementary cumulative distribution function (CCDF).Parameters:
T x
value to evaluate CCDF See Also: - pure nothrow @nogc @safe T
rayleighCCDF
(T)(const Tx
, const Tscale
)
if (isFloatingPoint!T); - Ditto, with scale parameter.Parameters:
T x
value to evaluate CCDF T scale
scale parameter Examples:import mir.test: shouldApprox; 0.0.rayleighCCDF.shouldApprox == 1.0; 0.5.rayleighCCDF.shouldApprox == 0.8824969; 1.0.rayleighCCDF.shouldApprox == 0.6065307; 2.0.rayleighCCDF.shouldApprox == 0.1353353; // Can also provide scale parameter 0.5.rayleighCCDF(2.0).shouldApprox == 0.9692332; 1.0.rayleighCCDF(2.0).shouldApprox == 0.8824969; 4.0.rayleighCCDF(2.0).shouldApprox == 0.1353353;
- pure nothrow @nogc @safe T
rayleighInvCDF
(T)(const Tp
)
if (isFloatingPoint!T); - Computes the Rayleigh inverse cumulative distribution function (InvCDF).Parameters:
T p
value to evaluate InvCDF See Also: - pure nothrow @nogc @safe T
rayleighInvCDF
(T)(const Tp
, const Tscale
)
if (isFloatingPoint!T); - Ditto, with scale parameter.Parameters:
T p
value to evaluate InvCDF T scale
scale parameter See Also:Examples:import mir.test: shouldApprox; rayleighInvCDF(0.0).shouldApprox == 0.0; rayleighInvCDF(0.25).shouldApprox == 0.7585276; rayleighInvCDF(0.5).shouldApprox == 1.17741; rayleighInvCDF(0.75).shouldApprox == 1.665109; rayleighInvCDF(1.0).shouldApprox == double.infinity; // Can also provide scale parameter rayleighInvCDF(0.2, 2).shouldApprox == 1.336094; rayleighInvCDF(0.4, 2).shouldApprox == 2.021535; rayleighInvCDF(0.6, 2).shouldApprox == 2.707457; rayleighInvCDF(0.8, 2).shouldApprox == 3.588245;
- pure nothrow @nogc @safe T
rayleighLPDF
(T)(const Tx
)
if (isFloatingPoint!T); - Computes the Rayleigh log probability density function (LPDF).Parameters:
T x
value to evaluate LPDF See Also: - pure nothrow @nogc @safe T
rayleighLPDF
(T)(const Tx
, const Tscale
)
if (isFloatingPoint!T); - Ditto, with scale parameter.Parameters:
T x
value to evaluate LPDF T scale
scale parameter See Also:Examples:import mir.math.common: log; import mir.test: shouldApprox; 0.0.rayleighLPDF.shouldApprox == -double.infinity; 0.5.rayleighLPDF.shouldApprox == log(0.4412485); 1.0.rayleighLPDF.shouldApprox == log(0.6065307); 2.0.rayleighLPDF.shouldApprox == log(0.2706706); // Can also provide scale parameter 0.5.rayleighLPDF(2.0).shouldApprox == log(0.1211541); 1.0.rayleighLPDF(2.0).shouldApprox == log(0.2206242); 4.0.rayleighLPDF(2.0).shouldApprox == log(0.1353353);
Copyright © 2016-2023 by Ilya Yaroshenko | Page generated by
Ddoc on Wed Oct 18 12:23:06 2023