C# Класс YAMP.Numerics.DiscreteUniformDistribution

Provides generation of discrete uniformly distributed random numbers.
The discrete uniform distribution generates only discrete numbers.
The implementation of the DiscreteUniformDistribution type bases upon information presented on Wikipedia - Uniform distribution (discrete).
Наследование: Distribution
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DiscreteUniformDistribution ( ) : System

Initializes a new instance of the DiscreteUniformDistribution class, using a StandardGenerator as underlying random number generator.

DiscreteUniformDistribution ( Generator generator ) : System

Initializes a new instance of the DiscreteUniformDistribution class, using the specified Generator as underlying random number generator.

IsValidAlpha ( int value ) : bool

Determines whether the specified value is valid for parameter Alpha.

IsValidBeta ( int value ) : bool

Determines whether the specified value is valid for parameter Beta.

Next ( ) : int

Returns a uniformly distributed random number.

NextDouble ( ) : double

Returns a uniformly distributed floating point random number.

Приватные методы

Метод Описание
UpdateHelpers ( ) : void

Updates the helper variables that store intermediate results for generation of uniformly distributed random numbers.

Описание методов

DiscreteUniformDistribution() публичный Метод

Initializes a new instance of the DiscreteUniformDistribution class, using a StandardGenerator as underlying random number generator.
public DiscreteUniformDistribution ( ) : System
Результат System

DiscreteUniformDistribution() публичный Метод

Initializes a new instance of the DiscreteUniformDistribution class, using the specified Generator as underlying random number generator.
/// is NULL ( in Visual Basic). ///
public DiscreteUniformDistribution ( Generator generator ) : System
generator Generator A object.
Результат System

IsValidAlpha() публичный Метод

Determines whether the specified value is valid for parameter Alpha.
public IsValidAlpha ( int value ) : bool
value int The value to check.
Результат bool

IsValidBeta() публичный Метод

Determines whether the specified value is valid for parameter Beta.
public IsValidBeta ( int value ) : bool
value int The value to check.
Результат bool

Next() публичный Метод

Returns a uniformly distributed random number.
public Next ( ) : int
Результат int

NextDouble() публичный Метод

Returns a uniformly distributed floating point random number.
public NextDouble ( ) : double
Результат double