Click or drag to resize
VariableStringOfLength Method (VariableInt32, VariableDiscreteChar)
Microsoft Research
Creates a string random variable from a uniform distribution over all strings of given length. String characters are restricted to be non zero probability characters under the given character distribution.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public static Variable<string> StringOfLength(
	Variable<int> length,
	Variable<DiscreteChar> allowedCharacters
)

Parameters

length
Type: MicrosoftResearch.Infer.ModelsVariableInt32
The desired string length.
allowedCharacters
Type: MicrosoftResearch.Infer.ModelsVariableDiscreteChar
The distribution specifying the allowed string characters.

Return Value

Type: VariableString
The created random variable.
Remarks
The resulting random variable has an improper distribution.
See Also