The OpenD Programming Language

rayleighCDF

Ditto, with scale parameter.

  1. T rayleighCDF(T x)
  2. T rayleighCDF(T x, T scale)
    T
    rayleighCDF
    (
    T
    )
    (
    const T x
    ,
    const T scale
    )
    if (
    isFloatingPoint!T
    )

Parameters

x T

value to evaluate CDF

scale T

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;

Meta