Click or drag to resize
VariableDiscrete Method (Range, VariableVector)
Microsoft Research
Creates a random variable that is statistically defined by a Discrete distribution with the number of possible values specified by a Range object and the probabilities of the possible values specified by an Vector random variable.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.7.1803.2803 (2.7.1803.2803)
public static Variable<int> Discrete(
	Range valueRange,
	Variable<Vector> probs


Type: MicrosoftResearch.Infer.ModelsRange
A range defining the possible values for the variable.
Type: MicrosoftResearch.Infer.ModelsVariableVector
A variable holding the set of probabilities of having each value. Must add up to one.

Return Value

Type: VariableInt32
Returns a random variable that is statistically defined by the specified Discrete distribution.
See Also