C# Class 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.
Afficher le fichier Open project: colgreen/Redzen Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
NormaliseProbabilities ( double probs ) : void

Method Details

DiscreteDistribution() public méthode

Copy constructor.
public DiscreteDistribution ( DiscreteDistribution copyFrom ) : System
copyFrom DiscreteDistribution
Résultat System

DiscreteDistribution() public méthode

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
Résultat System

DiscreteDistribution() public méthode

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
Résultat System

RemoveOutcome() public méthode

Remove the specified outcome from the set of probabilities and return as a new DiscreteDistribution object.
public RemoveOutcome ( int labelId ) : DiscreteDistribution
labelId int
Résultat DiscreteDistribution