Click or drag to resize
VariableLinear Method
Microsoft Research
Adds a linear factor between two int variables (max product only!).

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.7.1803.2803 (2.7.1803.2803)
Syntax
public static void Linear(
	Variable<int> a,
	Variable<int> b,
	Variable<double> logUnitCost
)

Parameters

a
Type: MicrosoftResearch.Infer.ModelsVariableInt32
The first int variable
b
Type: MicrosoftResearch.Infer.ModelsVariableInt32
The second int variable
logUnitCost
Type: MicrosoftResearch.Infer.ModelsVariableDouble
The negative log cost per unit absolute different between the variables
Remarks
This factor has the value of exp( -|a-b|* logUnitCost ).
See Also