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

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

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
maxCost
Type: MicrosoftResearch.Infer.ModelsVariableDouble
The maximum negative log cost
Remarks
This factor has the value of exp( - min( |a-b|* logUnitCost, maxCost) )).
See Also