Click or drag to resize
VariableCountTrue Method
Microsoft Research
Returns an integer variable equal to the number of array elements that are true.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.7.1803.2803 (2.7.1803.2803)
Syntax
public static Variable<int> CountTrue(
	Variable<bool[]> array
)

Parameters

array
Type: MicrosoftResearch.Infer.ModelsVariableBoolean
The array variable

Return Value

Type: VariableInt32
sum_i array[i]
See Also