class Statistics::Distributions::Uniform
- Statistics::Distributions::Uniform
- Statistics::Distributions::ContinuousDistribution
- Statistics::Distributions::Distribution(Float64)
- Reference
- Object
Overview
Represents a continuous uniform distribution.
See wikipedia.
Defined in:
lib/distributions.crConstructors
-
.new(min : Float64, max : Float64)
Creates a uniform distribution within the interval [
min
,max
].
Instance Method Summary
-
#pdf(x)
The Probability Density Function (PDF) of a continuous random variable.
-
#rand : Float64
Samples a random variable with the given distribution.
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)
#
Description copied from class Statistics::Distributions::ContinuousDistribution
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.