class Statistics::Distributions::Uniform

Overview

Represents a continuous uniform distribution.

See wikipedia.

Defined in:

lib/distributions.cr

Constructors

Instance Method Summary

Instance methods inherited from class Statistics::Distributions::ContinuousDistribution

pdf(x) pdf

Instance methods inherited from class Statistics::Distributions::Distribution(Float64)

rand : T rand

Constructor Detail

def self.new(min : Float64, max : Float64) #

Creates a uniform distribution within the interval [min, max].


Instance Method Detail

def pdf(x) #

The Probability Density Function (PDF) of a continuous random variable.


def rand : Float64 #
Description copied from class Statistics::Distributions::Distribution(Float64)

Samples a random variable with the given distribution.