C# Класс Redzen.Numerics.DiscreteDistribution

Represents a distribution over a discrete set of possible states. Total probability over all states must add up to 1.0 This class was previously called RouletteWheelLayout.
Показать файл Открыть проект Примеры использования класса

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

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

Copy constructor.

DiscreteDistribution ( double probArr ) : System

Construct the layout with provided probabilities. The provided probabilites do not have to add up to 1.0 as we implicitly normalise them when using the layout.

DiscreteDistribution ( double probArr, int labelArr ) : System

Construct the layout with provided probabilities. The provided probabilites do not have to add up to 1.0 as we implicitly normalise them when using the layout.

RemoveOutcome ( int labelId ) : DiscreteDistribution

Remove the specified outcome from the set of probabilities and return as a new DiscreteDistribution object.

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

Метод Описание
NormaliseProbabilities ( double probs ) : void

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

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

Copy constructor.
public DiscreteDistribution ( DiscreteDistribution copyFrom ) : System
copyFrom DiscreteDistribution
Результат System

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

Construct the layout with provided probabilities. The provided probabilites do not have to add up to 1.0 as we implicitly normalise them when using the layout.
public DiscreteDistribution ( double probArr ) : System
probArr double
Результат System

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

Construct the layout with provided probabilities. The provided probabilites do not have to add up to 1.0 as we implicitly normalise them when using the layout.
public DiscreteDistribution ( double probArr, int labelArr ) : System
probArr double
labelArr int
Результат System

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

Remove the specified outcome from the set of probabilities and return as a new DiscreteDistribution object.
public RemoveOutcome ( int labelId ) : DiscreteDistribution
labelId int
Результат DiscreteDistribution