Click or drag to resize
VariableT Class
Microsoft Research
A typed variable in a model.
Inheritance Hierarchy
SystemObject
  MicrosoftResearch.Infer.ModelsVariable
    MicrosoftResearch.Infer.ModelsVariableT

Namespace: MicrosoftResearch.Infer.Models
Assembly: Infer.Compiler (in Infer.Compiler.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
public class Variable<T> : Variable, IModelExpression<T>, 
	IModelExpression, SettableTo<Variable<T>>, ICloneable, HasObservedValue

Type Parameters

T
The domain of the variable.

The VariableT type exposes the following members.

Methods
  NameDescription
Public methodStatic memberArray
Create a 1D random variable array with a specified size.
Public methodAttrib(ICompilerAttribute)
Inline method for adding an attribute to a variable. This method returns the variable object, so that is can be used in an inline expression. e.g. Variable.GaussianFromMeanAndVariance(0,1).Attrib(new MyAttribute());
Public methodAttrib(QueryType)
Helper to add a query type attribute to this variable.
Public methodClearObservedValue
Clear the observed value.
Public methodClone
Clone this variable
Public methodStatic memberFactor(FactorMethodT)
Creates a random variable from a factor method with no arguments.
Public methodStatic memberFactorT1(FactorMethodT, T1, VariableT1)
Creates a random variable from a factor method with one argument.
Public methodStatic memberFactorT1(FactorMethodT, T1, T1)
Creates a random variable from a factor method with one argument.
Public methodStatic memberFactorT1, T2(FactorMethodT, T1, T2, VariableT1, VariableT2)
Creates a random variable from a factor method with two arguments.
Public methodStatic memberFactorT1, T2(FactorMethodT, T1, T2, VariableT1, T2)
Creates a random variable from a factor method with two arguments.
Public methodStatic memberFactorT1, T2(FactorMethodT, T1, T2, T1, VariableT2)
Creates a random variable from a factor method with two arguments.
Public methodStatic memberFactorT1, T2(FactorMethodT, T1, T2, T1, T2)
Creates a random variable from a factor method with two arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, VariableT1, VariableT2, VariableT3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, VariableT1, VariableT2, T3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, VariableT1, T2, VariableT3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, VariableT1, T2, T3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, T1, VariableT2, VariableT3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, T1, VariableT2, T3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, T1, T2, VariableT3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3(FactorMethodT, T1, T2, T3, T1, T2, T3)
Creates a random variable from a factor method with three arguments.
Public methodStatic memberFactorT1, T2, T3, T4(FactorMethodT, T1, T2, T3, T4, VariableT1, VariableT2, VariableT3, VariableT4)
Creates a random variable from a factor method with four arguments.
Public methodStatic memberFactorUntyped
Creates a random variable from a factor
Public methodForEach(Range)
Create multiple variables with the same definition.
Public methodForEach(Range)
Create multiple variables with the same definition.
Public methodInitialiseBackwardToTDist(TDist)
Provide a backward distribution to initialize inference.
Public methodInitialiseBackwardToTDist(VariableTDist)
Provide a backward distribution to initialize inference.
Public methodInitialiseToTDist(TDist)
Provide a marginal distribution to initialize inference.
Public methodInitialiseToTDist(VariableTDist)
Provide a marginal distribution to initialize inference.
Public methodNamed
Set the name of the variable.
Public methodStatic memberOperatorUntyped
Creates a random variable from an operator
Public methodStatic memberRandomTDist
Creates a random variable with the specified prior distribution
Public methodSetTo
Sets the value of a random variable. Should only be invoked on variables created using New() which do not yet have a value.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Char, VariableT)
Public operatorStatic memberAddition(VariableChar, VariableT)
Public operatorStatic memberAddition(VariableT, VariableChar)
Public operatorStatic memberAddition(VariableT, VariableT)
Operator overload for addition
Public operatorStatic memberAddition(VariableT, Char)
Public operatorStatic memberAddition(VariableT, T)
Operator overload for addition
Public operatorStatic memberBitwiseAnd
Operator overload for AND
Public operatorStatic memberBitwiseOr
Operator overload for OR
Public operatorStatic memberDivision(T, VariableT)
Operator overload for division
Public operatorStatic memberDivision(VariableT, VariableT)
Operator overload for division
Public operatorStatic memberDivision(VariableT, T)
Operator overload for division
Public operatorStatic memberEquality(VariableT, VariableT)
Returns a new variable that is true when two variables are equal.
Public operatorStatic memberEquality(VariableT, T)
Returns a new variable that is true when a variable equals a given value.
Public operatorStatic memberExclusiveOr
Operator overload for XOR
Public operatorStatic memberGreaterThan(VariableT, VariableT)
Operator overload for greater than
Public operatorStatic memberGreaterThan(VariableT, T)
Operator overload for greater than
Public operatorStatic memberGreaterThanOrEqual(VariableT, VariableT)
Operator overload for greater than or equal
Public operatorStatic memberGreaterThanOrEqual(VariableT, T)
Operator overload for greater than or equal
Public operatorStatic member(T to VariableT)
Provides implicit conversion from .NET instances to constant Infer.NET variables.
Public operatorStatic memberInequality(VariableT, VariableT)
Returns a new variable that is true when two variables are not equal.
Public operatorStatic memberInequality(VariableT, T)
Returns a new variable that is true when a variable does not equal a given value.
Public operatorStatic memberLessThan(VariableT, VariableT)
Operator overload for less than
Public operatorStatic memberLessThan(VariableT, T)
Operator overload for less than
Public operatorStatic memberLessThanOrEqual(VariableT, VariableT)
Operator overload for less than or equal
Public operatorStatic memberLessThanOrEqual(VariableT, T)
Operator overload for less than or equal
Public operatorStatic memberLogicalNot
Operator overload for NOT
Public operatorStatic memberModulus(VariableT, VariableT)
Operator overload for modulus
Public operatorStatic memberModulus(VariableT, T)
Operator overload for modulus
Public operatorStatic memberMultiply(T, VariableT)
Operator overload for multiplication
Public operatorStatic memberMultiply(VariableT, VariableT)
Operator overload for multiplication
Public operatorStatic memberMultiply(VariableT, T)
Operator overload for multiplication
Public operatorStatic memberOnesComplement
Operator overload for NOT
Public operatorStatic memberSubtraction(T, VariableT)
Operator overload for subtraction
Public operatorStatic memberSubtraction(VariableT, VariableT)
Operator overload for subtraction
Public operatorStatic memberSubtraction(VariableT, T)
Operator overload for subtraction
Public operatorStatic memberUnaryNegation
Operator overload for unary negation
Top
Properties
Explicit Interface Implementations
See Also