Documentation
¶
Overview ¶
package sketchtest is an internal module with test helpers for generating points from a given distribution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CDF ¶
CDF is the cumulative distribution function of a distribution (inverse of QuantileFunction).
func ExponentialCDF ¶
ExponentialCDF is the CDF of the Exponential distribution with parameter lambda. See https://en.wikipedia.org/wiki/Exponential_distribution
func NormalCDF ¶
NormalCDF is the CDF of the Normal distribution with parameters mu and sigma. See https://en.wikipedia.org/wiki/Normal_distribution
func TruncateCDF ¶
Truncate a CDF to the interval (a,b). See https://en.wikipedia.org/wiki/Truncated_distribution.
type QuantileFunction ¶
QuantileFunction for a distribution. The function MUST be defined in (0,1). The function MAY return the minimum at 0 and the maximum at 1, for distributions where this makes sense.
func ExponentialQ ¶
func ExponentialQ(lambda float64) QuantileFunction
ExponentialQ is the quantile function of the Exponential distribution with parameter lambda See https://en.wikipedia.org/wiki/Exponential_distribution
func NormalQ ¶
func NormalQ(mu, sigma float64) QuantileFunction
NormalQ is the quantile function of the Normal distribution with parameters mu and sigma. See https://en.wikipedia.org/wiki/Normal_distribution
func TruncateQ ¶
func TruncateQ(a, b float64, quantile QuantileFunction, cdf CDF) QuantileFunction
Truncate a quantile function to the interval [a,b] given its CDF. See https://en.wikipedia.org/wiki/Truncated_distribution. This function assumes but does not check that quantile is the inverse of cdf.
func UQuadraticQ ¶
func UQuadraticQ(a, b float64) QuantileFunction
UQuadraticQ returns the quantile function for an U-Quadratic distribution with parameters a and b. See https://en.wikipedia.org/wiki/U-quadratic_distribution
func UniformQ ¶
func UniformQ(a, b float64) QuantileFunction
UniformQ returns the quantile function for an uniform distribution with parameters a and b. See https://en.wikipedia.org/wiki/Continuous_uniform_distribution