Click or drag to resize
VariableSumWhere Method
Microsoft Research
Returns a double random variable which is the inner product of a array of binary variables and a vector variable.

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41127.1 (2.6.41127.1)
Syntax
public static Variable<double> SumWhere(
	VariableArray<bool> a,
	Variable<Vector> b
)

Parameters

a
Type: MicrosoftResearch.Infer.ModelsVariableArrayBoolean
The first, binary vector variable
b
Type: MicrosoftResearch.Infer.ModelsVariableVector
The second vector variable

Return Value

Type: VariableDouble
sum_i a[i]*b[i]
See Also