Search Results for

    Show / Hide Table of Contents

    Class Variable<T>

    A typed variable in a model.

    Inheritance
    Object
    Variable
    Variable<T>
    VariableArrayBase<TItem, TArray>
    Implements
    IVariable
    CanGetContainers
    IModelExpression<T>
    IModelExpression
    SettableTo<Variable<T>>
    ICloneable
    HasObservedValue
    Inherited Members
    Variable.NameInGeneratedCode
    Variable.ToString()
    Variable.Definition
    Variable.IsDefined
    Variable.IsDefinedInContext(List<ConditionBlock>)
    Variable.IsPrefixOf<T>(IReadOnlyList<T>, IReadOnlyList<T>)
    Variable.ShorterIsPrefixOfLonger<T>(IReadOnlyList<T>, IReadOnlyList<T>)
    Variable.HasAnyItemDefined(IReadOnlyList<ConditionBlock>)
    Variable.HasDefinedItem(IReadOnlyList<ConditionBlock>, List<List<IModelExpression>>, Int32)
    Variable.MayOverlap(IReadOnlyList<IModelExpression>, IReadOnlyList<IModelExpression>)
    Variable.IsConstantScalar(IModelExpression)
    Variable.isObserved
    Variable.IsObserved
    Variable.GetDomainType()
    Variable.GetExpression()
    Variable.attributes
    Variable.AddAttribute(ICompilerAttribute)
    Variable.AddAttribute(QueryType)
    Variable.AddAttributes(ICompilerAttribute[])
    Variable.AddAttributes(IEnumerable<ICompilerAttribute>)
    Variable.AddDefinitionAttribute(ICompilerAttribute)
    Variable.GetValueRange()
    Variable.GetValueRange(Boolean)
    Variable.SetValueRange(Range)
    Variable.SetSparsity(Sparsity)
    Variable.GetAttributes<AttributeType>()
    Variable.RemoveAllAttributes<AttributeType>()
    Variable.HasAttribute<AttributeType>()
    Variable.GetFirstAttribute<AttributeType>()
    Variable.GetContainers<T>()
    Variable.array
    Variable.ArrayVariable
    Variable.IsArrayElement
    Variable.GetItemExpression()
    Variable.loopRange
    Variable.IsLoopIndex
    Variable.Constant<T>(T)
    Variable.Constant<T>(T[])
    Variable.Constant<T>(T[], Range)
    Variable.Constant<T>(T[,])
    Variable.Constant<T>(T[,], Range, Range)
    Variable.Constant<T>(T[][], Range, Range)
    Variable.Constant<T>(T[,][], Range, Range, Range)
    Variable.Constant<T>(T[][][], Range, Range, Range)
    Variable.Constant<T>(IList<T>)
    Variable.Constant<T>(IList<T>, Range)
    Variable.Constant<T>(IList<IList<T>>, Range, Range)
    Variable.Constant<T>(IReadOnlyList<T>)
    Variable.Constant<T>(IReadOnlyList<T>, Range)
    Variable.Constant<T>(IReadOnlyList<IReadOnlyList<T>>, Range, Range)
    Variable.Observed<T>(T)
    Variable.Observed<T>(T[])
    Variable.Observed<T>(T[,])
    Variable.Observed<T>(T[], Range)
    Variable.Observed<T>(T[][], Range, Range)
    Variable.Observed<T>(T[][][], Range, Range, Range)
    Variable.Observed<T>(T[][][][], Range, Range, Range, Range)
    Variable.Observed<T>(T[,], Range, Range)
    Variable.Observed<T>(IReadOnlyList<T>)
    Variable.Observed<T>(IReadOnlyList<T>, Range)
    Variable.Observed<T>(IReadOnlyList<IReadOnlyList<T>>, Range, Range)
    Variable.Random<T>(IDistribution<T>)
    Variable.Random<T, TDist>(Variable<TDist>)
    Variable.New<T>()
    Variable.Repeat(Variable<Double>)
    Variable.Array<T>(Range)
    Variable.IList<T>(Range)
    Variable.ISparseList<T>(Range)
    Variable.IArray<T>(Range)
    Variable.Array<T>(Range, Range)
    Variable.IArray<T>(Range, Range)
    Variable.Array<T>(Range, Range, Range)
    Variable.Array<T>(IList<Range>)
    Variable.Array<T>(VariableArray<T>, Range)
    Variable.IList<T>(VariableArray<T>, Range)
    Variable.IArray<T>(VariableArray<T>, Range)
    Variable.Array<T>(VariableArray2D<T>, Range)
    Variable.IArray<T>(VariableArray2D<T>, Range)
    Variable.Array<T>(VariableArray<T>, Range, Range)
    Variable.IArray<T>(VariableArray<T>, Range, Range)
    Variable.Array<T>(VariableArray<T>, Range, Range, Range)
    Variable.Array<TItem, TArray>(VariableArray<TItem, TArray>, Range)
    Variable.IList<TItem, TArray>(VariableArray<TItem, TArray>, Range)
    Variable.IArray<TItem, TArray>(VariableArray<TItem, TArray>, Range)
    Variable.Array<TItem, TArray>(TItem, Range)
    Variable.Constrain<T>(Action<T>, Variable<T>)
    Variable.Constrain<T1, T2>(Action<T1, T2>, Variable<T1>, Variable<T2>)
    Variable.Constrain<T1, T2, T3>(Action<T1, T2, T3>, Variable<T1>, Variable<T2>, Variable<T3>)
    Variable.Constrain<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, Variable<T1>, Variable<T2>, Variable<T3>, Variable<T4>)
    Variable.ConstrainInternal(MethodInfo, Variable[])
    Variable.GaussianFromMeanAndPrecision(Variable<Double>, Variable<Double>)
    Variable.GaussianFromMeanAndPrecision(Double, Double)
    Variable.GaussianFromMeanAndVariance(Variable<Double>, Variable<Double>)
    Variable.GaussianFromMeanAndVariance(Variable<Double>, Double)
    Variable.GaussianFromMeanAndVariance(Double, Double)
    Variable.TruncatedGaussian(Double, Double, Double, Double)
    Variable.TruncatedGammaFromShapeAndRate(Variable<Double>, Variable<Double>, Variable<Double>, Variable<Double>)
    Variable.GaussianListFromMeanAndPrecision(Variable<ISparseList<Double>>, Variable<ISparseList<Double>>)
    Variable.GaussianListFromMeanAndPrecision(ISparseList<Double>, Variable<ISparseList<Double>>)
    Variable.GaussianListFromMeanAndPrecision(Variable<ISparseList<Double>>, ISparseList<Double>)
    Variable.GaussianListFromMeanAndPrecision(ISparseList<Double>, ISparseList<Double>)
    Variable.VectorGaussianFromMeanAndPrecision(Variable<Vector>, Variable<PositiveDefiniteMatrix>)
    Variable.VectorGaussianFromMeanAndPrecision(Vector, PositiveDefiniteMatrix)
    Variable.VectorGaussianFromMeanAndVariance(Vector, PositiveDefiniteMatrix)
    Variable.VectorGaussianFromMeanAndVariance(Variable<Vector>, PositiveDefiniteMatrix)
    Variable.VectorGaussianFromMeanAndVariance(Variable<Vector>, Variable<PositiveDefiniteMatrix>)
    Variable.GammaFromShapeAndScale(Double, Double)
    Variable.GammaFromShapeAndScale(Variable<Double>, Variable<Double>)
    Variable.GammaFromShapeAndRate(Double, Double)
    Variable.GammaFromShapeAndRate(Variable<Double>, Variable<Double>)
    Variable.GammaFromMeanAndVariance(Double, Double)
    Variable.GammaFromMeanAndVariance(Variable<Double>, Variable<Double>)
    Variable.WishartFromShapeAndScale(Double, PositiveDefiniteMatrix)
    Variable.WishartFromShapeAndScale(Variable<Double>, Variable<PositiveDefiniteMatrix>)
    Variable.WishartFromShapeAndRate(Variable<Double>, Variable<PositiveDefiniteMatrix>)
    Variable.Bernoulli(Double)
    Variable.Bernoulli(Variable<Double>)
    Variable.BernoulliList(Variable<ISparseList<Double>>)
    Variable.BernoulliList(VariableArray<Variable<Boolean>, ISparseList<Double>>)
    Variable.BernoulliList(ISparseList<Double>)
    Variable.BernoulliIntegerSubset(Variable<ISparseList<Double>>)
    Variable.BernoulliIntegerSubset(VariableArray<Variable<Double>, ISparseList<Double>>)
    Variable.BernoulliIntegerSubset(ISparseList<Double>)
    Variable.BernoulliFromLogOdds(Double)
    Variable.BernoulliFromLogOdds(Variable<Double>)
    Variable.Discrete(Double[])
    Variable.Discrete(Range, Double[])
    Variable.Discrete(Vector)
    Variable.Discrete(Range, Vector)
    Variable.DiscreteUniform(Int32)
    Variable.DiscreteUniform(Range)
    Variable.DiscreteUniform(Variable<Int32>)
    Variable.DiscreteUniform(Range, Variable<Int32>)
    Variable.Discrete(Variable<Vector>)
    Variable.Discrete(Range, Variable<Vector>)
    Variable.EnumDiscrete<TEnum>(Variable<Vector>)
    Variable.EnumDiscrete<TEnum>(Double[])
    Variable.EnumDiscrete<TEnum>(Range, Double[])
    Variable.EnumDiscrete<TEnum>(Vector)
    Variable.EnumDiscrete<TEnum>(Range, Vector)
    Variable.EnumUniform<TEnum>()
    Variable.EnumUniform<TEnum>(Range)
    Variable.EnumToInt<TEnum>(Variable<TEnum>)
    Variable.DiscreteFromLogProbs(VariableArray<Double>)
    Variable.BetaFromMeanAndVariance(Double, Double)
    Variable.BetaFromMeanAndVariance(Variable<Double>, Variable<Double>)
    Variable.Beta(Double, Double)
    Variable.Beta(Variable<Double>, Variable<Double>)
    Variable.DirichletUniform(Int32)
    Variable.DirichletUniform(Variable<Int32>)
    Variable.DirichletUniform(Range)
    Variable.DirichletSymmetric(Int32, Double)
    Variable.DirichletSymmetric(Int32, Variable<Double>)
    Variable.DirichletSymmetric(Range, Variable<Double>)
    Variable.Dirichlet(Double[])
    Variable.Dirichlet(Range, Double[])
    Variable.Dirichlet(Vector)
    Variable.Dirichlet(Variable<Vector>)
    Variable.Dirichlet(Range, Vector)
    Variable.Dirichlet(Range, Variable<Vector>)
    Variable.Double(Variable<Int32>)
    Variable.Double(IModelExpression<Int32>)
    Variable.Double(Variable<Boolean>)
    Variable.Poisson(Double)
    Variable.Poisson(Variable<Double>)
    Variable.Binomial(Int32, Variable<Double>)
    Variable.Binomial(Variable<Int32>, Variable<Double>)
    Variable.MultinomialList(Variable<Int32>, Variable<Vector>)
    Variable.Multinomial(Variable<Int32>, Variable<Vector>)
    Variable.Multinomial(Variable<Int32>, Vector)
    Variable.Multinomial(Range, Variable<Vector>)
    Variable.FunctionEvaluate(Variable<IFunction>, Variable<Vector>)
    Variable.IsPositive(Variable<Double>)
    Variable.IsBetween(Variable<Double>, Variable<Double>, Variable<Double>)
    Variable.InnerProduct(Variable<Vector>, Variable<Vector>)
    Variable.InnerProduct(Variable<Vector>, Variable<DenseVector>)
    Variable.InnerProduct(Variable<DenseVector>, Variable<Vector>)
    Variable.InnerProduct(VariableArray<Double>, Variable<Vector>)
    Variable.InnerProduct(VariableArray<Double>, VariableArray<Double>)
    Variable.SumWhere(VariableArray<Boolean>, Variable<Vector>)
    Variable.SumWhere(VariableArray<Boolean>, VariableArray<Double>)
    Variable.Matrix(Variable<Double[,]>)
    Variable.MatrixTimesVector(Variable<Matrix>, Variable<Vector>)
    Variable.MatrixTimesVector(Variable<Double[,]>, Variable<Vector>)
    Variable.MatrixTimesScalar(Variable<PositiveDefiniteMatrix>, Variable<Double>)
    Variable.VectorTimesScalar(Variable<Vector>, Variable<Double>)
    Variable.MatrixMultiply(VariableArray2D<Double>, VariableArray2D<Double>)
    Variable.Sum(Variable<Int32[]>)
    Variable.Sum(Variable<IList<Double>>)
    Variable.Sum(Variable<Double[]>)
    Variable.Sum_Expanded(VariableArray<Double>)
    Variable.Sum(Variable<IList<Vector>>)
    Variable.Sum(Variable<Vector[]>)
    Variable.Max(Variable<Double>, Variable<Double>)
    Variable.Max(Variable<Int32>, Variable<Int32>)
    Variable.Min(Variable<Double>, Variable<Double>)
    Variable.Min(Variable<Int32>, Variable<Int32>)
    Variable.Exp(Variable<Double>)
    Variable.Log(Variable<Double>)
    Variable.Logistic(Variable<Double>)
    Variable.Softmax(VariableArray<Double>)
    Variable.Softmax(Variable<IList<Double>>)
    Variable.Softmax(Variable<Vector>)
    Variable.Softmax(Variable<ISparseList<Double>>)
    Variable.ProductExp(Variable<Double>, Variable<Double>)
    Variable.Rotate(Variable<Double>, Variable<Double>, Variable<Double>)
    Variable.AllTrue(Variable<IList<Boolean>>)
    Variable.AllTrue(Variable<Boolean[]>)
    Variable.CountTrue(Variable<Boolean[]>)
    Variable.Concat(Variable<Vector>, Variable<Vector>)
    Variable.Vector(Variable<Double[]>)
    Variable.ArrayFromVector(Variable<Vector>, Range)
    Variable.Split<T>(VariableArray<T>, Range, Range, VariableArray<T>)
    Variable.Split<TItem, T>(VariableArray<TItem, T[]>, Range, Range, VariableArray<TItem, T[]>)
    Variable.Subvector(Variable<Vector>, Variable<Int32>, Variable<Int32>)
    Variable.GetItem(Variable<Vector>, Variable<Int32>)
    Variable.Copy<T>(Variable<T>)
    Variable.Copy<T>(VariableArray<T>)
    Variable.Copy<T>(VariableArray<VariableArray<T>, T[][]>)
    Variable.Copy<TItem, T>(VariableArray<VariableArray<TItem, T>, T[]>)
    Variable.SequentialCopy<T>(Variable<T>, Variable<T>)
    Variable.SequentialCopy<T>(VariableArray<T>, VariableArray<T>)
    Variable.SequentialCopy<T>(VariableArray<VariableArray<T>, T[][]>, VariableArray<VariableArray<T>, T[][]>)
    Variable.CutForwardWhen<T>(Variable<T>, Variable<Boolean>)
    Variable.Cut<T>(Variable<T>)
    Variable.Cut<T>(VariableArray<T>)
    Variable.Cut<T>(VariableArray<VariableArray<T>, T[][]>)
    Variable.Replicate<T>(Variable<T>, Range)
    Variable.Replicate<T>(VariableArray<T>, Range)
    Variable.Replicate<T>(VariableArray<VariableArray<T>, T[][]>, Range)
    Variable.Replicate<TItem, T>(VariableArray<VariableArray<TItem, T>, T[]>, Range)
    Variable.Subarray<T>(Variable<T[]>, VariableArray<Int32>)
    Variable.Subarray<T>(Variable<IReadOnlyList<T>>, VariableArray<Int32>)
    Variable.Subarray<T>(VariableArray<T>, VariableArray<Int32>)
    Variable.Subarray2<T>(VariableArray<T>, VariableArray<Int32>, VariableArray<T>)
    Variable.Subarray<T>(VariableArray<T>, VariableArray<Variable<Int32>, IReadOnlyList<Int32>>)
    Variable.SplitSubarray<T>(VariableArray<T>, VariableArray<VariableArray<Int32>, Int32[][]>)
    Variable.SplitSubarray<TItem, T>(VariableArray<TItem, T[]>, VariableArray<VariableArray<Int32>, Int32[][]>)
    Variable.JaggedSubarray<T>(VariableArray<T>, VariableArray<VariableArray<Int32>, Int32[][]>)
    Variable.Subarray<TItem, T>(VariableArray<TItem, T[]>, VariableArray<Int32>)
    Variable.GetItems<T>(Variable<T[]>, VariableArray<Int32>)
    Variable.GetItems<T>(Variable<IReadOnlyList<T>>, VariableArray<Int32>)
    Variable.GetItems<T>(VariableArray<T>, VariableArray<Int32>)
    Variable.GetItems<TItem, T>(VariableArray<TItem, T[]>, VariableArray<Int32>)
    Variable.Char(Variable<Vector>)
    Variable.CharUniform()
    Variable.CharLower()
    Variable.CharUpper()
    Variable.CharLetter()
    Variable.CharDigit()
    Variable.CharLetterOrDigit()
    Variable.CharWord()
    Variable.CharNonWord()
    Variable.CharWhitespace()
    Variable.StringUniform()
    Variable.StringLower()
    Variable.StringLower(Variable<Int32>, Variable<Int32>)
    Variable.StringUpper()
    Variable.StringUpper(Variable<Int32>, Variable<Int32>)
    Variable.StringLetters()
    Variable.StringLetters(Variable<Int32>, Variable<Int32>)
    Variable.StringDigits()
    Variable.StringDigits(Variable<Int32>, Variable<Int32>)
    Variable.StringLettersOrDigits()
    Variable.StringLettersOrDigits(Variable<Int32>, Variable<Int32>)
    Variable.StringWhitespace()
    Variable.StringWhitespace(Variable<Int32>, Variable<Int32>)
    Variable.StringWord()
    Variable.StringWord(Variable<Int32>, Variable<Int32>)
    Variable.StringNonWord()
    Variable.StringNonWord(Variable<Int32>, Variable<Int32>)
    Variable.StringCapitalized()
    Variable.StringCapitalized(Variable<Int32>, Variable<Int32>)
    Variable.StringOfLength(Variable<Int32>)
    Variable.StringOfLength(Variable<Int32>, Variable<DiscreteChar>)
    Variable.String(Variable<Int32>, Variable<Int32>)
    Variable.String(Variable<Int32>, Variable<Int32>, Variable<DiscreteChar>)
    Variable.StringFromArray(VariableArray<Char>)
    Variable.Substring(Variable<String>, Variable<Int32>, Variable<Int32>)
    Variable.StringFormat(Variable<String>, Variable<String>[])
    Variable.StringFormat(Variable<String>, VariableArray<String>)
    Variable.GetItem(Variable<String>, Variable<Int32>)
    Variable.ConstrainTrue(Variable<Boolean>)
    Variable.ConstrainFalse(Variable<Boolean>)
    Variable.ConstrainPositive(Variable<Double>)
    Variable.ConstrainBetween(Variable<Double>, Variable<Double>, Variable<Double>)
    Variable.ConstrainEqual<T>(Variable<T>, Variable<T>)
    Variable.ConstrainEqual<T>(T, Variable<T>)
    Variable.ConstrainEqual<T>(Variable<T>, T)
    Variable.ConstrainEqualRandom<T, TDist>(Variable<T>, Variable<TDist>)
    Variable.ConstrainEqualRandom<T, TDist>(T, Variable<TDist>)
    Variable.ConstrainEqualRandom<T, TDist>(Variable<T>, TDist)
    Variable.Potts(Variable<Boolean>, Variable<Boolean>, Variable<Double>)
    Variable.Potts(Variable<Int32>, Variable<Int32>, Variable<Double>)
    Variable.Linear(Variable<Int32>, Variable<Int32>, Variable<Double>)
    Variable.LinearTrunc(Variable<Int32>, Variable<Int32>, Variable<Double>, Variable<Double>)
    Variable.operatorFactorRegistry
    Variable.RegisterOperatorFactor(Variable.Operator, Delegate)
    Variable.LookupOperatorFactor(Variable.Operator, Type[])
    Variable.If(Variable<Boolean>)
    Variable.IfNot(Variable<Boolean>)
    Variable.Case(Variable<Int32>, Int32)
    Variable.CloseAllBlocks()
    Variable.Switch(Variable<Int32>)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Models
    Assembly: Microsoft.ML.Probabilistic.Compiler.dll
    Syntax
    public class Variable<T> : Variable, IVariable, CanGetContainers, IModelExpression<T>, IModelExpression, SettableTo<Variable<T>>, ICloneable, HasObservedValue
    Type Parameters
    Name Description
    T

    The domain of the variable.

    Constructors

    Variable(Variable<T>)

    Copy constructor.

    Declaration
    protected Variable(Variable<T> that)
    Parameters
    Type Name Description
    Variable<T> that

    Fields

    declaration

    Cache of GetDeclaration. Stores the name and type of the variable.

    Declaration
    protected object declaration
    Field Value
    Type Description
    Object
    Remarks

    Always null for derived variables. The declaration must be cached because we later use reference equality between declarations.

    isReadOnly

    Declaration
    protected bool isReadOnly
    Field Value
    Type Description
    Boolean

    observedValue

    Declaration
    protected T observedValue
    Field Value
    Type Description
    T

    Properties

    IsReadOnly

    Read only property

    Declaration
    public override bool IsReadOnly { get; set; }
    Property Value
    Type Description
    Boolean
    Overrides
    Variable.IsReadOnly

    Name

    Name

    Declaration
    public override string Name { get; set; }
    Property Value
    Type Description
    String
    Overrides
    Variable.Name

    ObservedValue

    Observed value property

    Declaration
    public T ObservedValue { get; set; }
    Property Value
    Type Description
    T

    Methods

    Array(Range)

    Create a 1D random variable array with a specified size.

    Declaration
    public static VariableArray<T> Array(Range r)
    Parameters
    Type Name Description
    Range r

    A Range object that specifies the array length.

    Returns
    Type Description
    VariableArray<T>

    Returns a VariableArray object whose size is specified by r.

    Attrib(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());

    Declaration
    public Variable<T> Attrib(ICompilerAttribute attr)
    Parameters
    Type Name Description
    ICompilerAttribute attr

    The attribute to add

    Returns
    Type Description
    Variable<T>

    The variable object

    Attrib(QueryType)

    Helper to add a query type attribute to this variable.

    Declaration
    public Variable<T> Attrib(QueryType queryType)
    Parameters
    Type Name Description
    QueryType queryType

    The query type to use to create the attribute

    Returns
    Type Description
    Variable<T>

    ClearObservedValue()

    Clear the observed value.

    Declaration
    public void ClearObservedValue()
    Remarks

    Calling this method sets the IsReadOnly and IsObserved flags to false. This cannot be called for array items.

    Clone()

    Clone this variable

    Declaration
    public virtual object Clone()
    Returns
    Type Description
    Object

    Factor(Func<T>)

    Creates a random variable from a factor method with no arguments.

    Declaration
    public static Variable<T> Factor(Func<T> factorDelegate)
    Parameters
    Type Name Description
    Func<T> factorDelegate

    The method that represents the factor

    Returns
    Type Description
    Variable<T>

    Factor<T1>(Func<T1, T>, T1)

    Creates a random variable from a factor method with one argument.

    Declaration
    public static Variable<T> Factor<T1>(Func<T1, T> factorDelegate, T1 arg1)
    Parameters
    Type Name Description
    Func<T1, T> factorDelegate

    The method that represents the factor

    T1 arg1
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1

    Factor<T1>(Func<T1, T>, Variable<T1>)

    Creates a random variable from a factor method with one argument.

    Declaration
    public static Variable<T> Factor<T1>(Func<T1, T> factorDelegate, Variable<T1> arg1)
    Parameters
    Type Name Description
    Func<T1, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1

    Factor<T1, T2>(FuncOut<T1, T2, T>, Variable<T1>, Variable<T2>)

    Creates a random variable from a factor method with two arguments.

    Declaration
    public static Variable<T> Factor<T1, T2>(FuncOut<T1, T2, T> factorDelegate, Variable<T1> arg1, Variable<T2> arg2)
    Parameters
    Type Name Description
    FuncOut<T1, T2, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1
    Variable<T2> arg2
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2

    Factor<T1, T2>(Func<T1, T2, T>, T1, T2)

    Creates a random variable from a factor method with two arguments.

    Declaration
    public static Variable<T> Factor<T1, T2>(Func<T1, T2, T> factorDelegate, T1 arg1, T2 arg2)
    Parameters
    Type Name Description
    Func<T1, T2, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Variable first argument

    T2 arg2

    Variable second argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2

    Factor<T1, T2>(Func<T1, T2, T>, T1, Variable<T2>)

    Creates a random variable from a factor method with two arguments.

    Declaration
    public static Variable<T> Factor<T1, T2>(Func<T1, T2, T> factorDelegate, T1 arg1, Variable<T2> arg2)
    Parameters
    Type Name Description
    Func<T1, T2, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Fixed first argument

    Variable<T2> arg2

    Variable second argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2

    Factor<T1, T2>(Func<T1, T2, T>, Variable<T1>, T2)

    Creates a random variable from a factor method with two arguments.

    Declaration
    public static Variable<T> Factor<T1, T2>(Func<T1, T2, T> factorDelegate, Variable<T1> arg1, T2 arg2)
    Parameters
    Type Name Description
    Func<T1, T2, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1

    Variable first argument

    T2 arg2

    Fixed second argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2

    Factor<T1, T2>(Func<T1, T2, T>, Variable<T1>, Variable<T2>)

    Creates a random variable from a factor method with two arguments.

    Declaration
    public static Variable<T> Factor<T1, T2>(Func<T1, T2, T> factorDelegate, Variable<T1> arg1, Variable<T2> arg2)
    Parameters
    Type Name Description
    Func<T1, T2, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1
    Variable<T2> arg2
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, T1, T2, T3)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, T1 arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Variable first argument

    T2 arg2

    Fixed second argument

    T3 arg3

    Fixed third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, T1, T2, Variable<T3>)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, T1 arg1, T2 arg2, Variable<T3> arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Fixed first argument

    T2 arg2

    Fixed second argument

    Variable<T3> arg3

    Variable third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, T1, Variable<T2>, T3)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, T1 arg1, Variable<T2> arg2, T3 arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Fixed first argument

    Variable<T2> arg2

    Variable second argument

    T3 arg3

    Fixed third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, T1, Variable<T2>, Variable<T3>)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, T1 arg1, Variable<T2> arg2, Variable<T3> arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    T1 arg1

    Fixed first argument

    Variable<T2> arg2

    Variable second argument

    Variable<T3> arg3

    Variable third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, Variable<T1>, T2, T3)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, Variable<T1> arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1

    Variable first argument

    T2 arg2

    Fixed second argument

    T3 arg3

    Fixed third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, Variable<T1>, T2, Variable<T3>)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, Variable<T1> arg1, T2 arg2, Variable<T3> arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1

    Variable first argument

    T2 arg2

    Fixed second argument

    Variable<T3> arg3

    Variable third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, Variable<T1>, Variable<T2>, T3)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, Variable<T1> arg1, Variable<T2> arg2, T3 arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1

    Variable first argument

    Variable<T2> arg2

    Variable second argument

    T3 arg3

    Fixed third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3>(Func<T1, T2, T3, T>, Variable<T1>, Variable<T2>, Variable<T3>)

    Creates a random variable from a factor method with three arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3>(Func<T1, T2, T3, T> factorDelegate, Variable<T1> arg1, Variable<T2> arg2, Variable<T3> arg3)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T> factorDelegate

    The method that represents the factor

    Variable<T1> arg1

    Variable first argument

    Variable<T2> arg2

    Variable second argument

    Variable<T3> arg3

    Variable third argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3

    Factor<T1, T2, T3, T4>(Func<T1, T2, T3, T4, T>, Variable<T1>, Variable<T2>, Variable<T3>, Variable<T4>)

    Creates a random variable from a factor method with four arguments.

    Declaration
    public static Variable<T> Factor<T1, T2, T3, T4>(Func<T1, T2, T3, T4, T> factorDelegate, Variable<T1> arg1, Variable<T2> arg2, Variable<T3> arg3, Variable<T4> arg4)
    Parameters
    Type Name Description
    Func<T1, T2, T3, T4, T> factorDelegate

    Factor delegate

    Variable<T1> arg1

    Variable first argument

    Variable<T2> arg2

    Variable second argument

    Variable<T3> arg3

    Variable third argument

    Variable<T4> arg4

    Variable fourth argument

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    T1
    T2
    T3
    T4

    FactorUntyped(MethodInfo, Variable[])

    Creates a random variable from a factor

    Declaration
    public static Variable<T> FactorUntyped(MethodInfo methodInfo, params Variable[] args)
    Parameters
    Type Name Description
    MethodInfo methodInfo

    The method

    Variable[] args

    The arguments

    Returns
    Type Description
    Variable<T>

    ForEach(Range)

    Create multiple variables with the same definition.

    Declaration
    public Variable<T> ForEach(Range range)
    Parameters
    Type Name Description
    Range range

    The desired range.

    Returns
    Type Description
    Variable<T>

    this, modified to range over the newly created items.

    ForEach(Range[])

    Create multiple variables with the same definition.

    Declaration
    public Variable<T> ForEach(params Range[] ranges)
    Parameters
    Type Name Description
    Range[] ranges

    The desired ranges.

    Returns
    Type Description
    Variable<T>

    this, modified to range over the newly created items.

    Remarks

    GreaterThan(Variable<T>, Variable<T>)

    Declaration
    protected static Variable<bool> GreaterThan(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    GreaterThanOrEqual(Variable<T>, Variable<T>)

    Declaration
    protected static Variable<bool> GreaterThanOrEqual(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    InitialiseBackwardTo<TDist>(TDist)

    Provide a backward distribution to initialize inference.

    Declaration
    public Variable<T> InitialiseBackwardTo<TDist>(TDist initialBackward)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist initialBackward
    Returns
    Type Description
    Variable<T>

    this

    Type Parameters
    Name Description
    TDist
    Remarks

    Only relevant for iterative algorithms. May be ignored by some inference algorithms.

    InitialiseBackwardTo<TDist>(IModelExpression<TDist>)

    Set the initialiseBackwardTo field if it is valid to do so

    Declaration
    protected Variable<T> InitialiseBackwardTo<TDist>(IModelExpression<TDist> initialBackward)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    IModelExpression<TDist> initialBackward
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    TDist

    InitialiseBackwardTo<TDist>(Variable<TDist>)

    Provide a backward distribution to initialize inference.

    Declaration
    public Variable<T> InitialiseBackwardTo<TDist>(Variable<TDist> initialBackward)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    Variable<TDist> initialBackward
    Returns
    Type Description
    Variable<T>

    this

    Type Parameters
    Name Description
    TDist
    Remarks

    Only relevant for iterative algorithms. May be ignored by some inference algorithms.

    InitialiseTo<TDist>(TDist)

    Provide a marginal distribution to initialize inference.

    Declaration
    public Variable<T> InitialiseTo<TDist>(TDist initialMarginal)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    TDist initialMarginal
    Returns
    Type Description
    Variable<T>

    this

    Type Parameters
    Name Description
    TDist
    Remarks

    Only relevant for iterative algorithms. May be ignored by some inference algorithms.

    InitialiseTo<TDist>(IModelExpression<TDist>)

    Set the initialiseTo field if it is valid to do so

    Declaration
    protected Variable<T> InitialiseTo<TDist>(IModelExpression<TDist> initialMarginal)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    IModelExpression<TDist> initialMarginal
    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    TDist

    InitialiseTo<TDist>(Variable<TDist>)

    Provide a marginal distribution to initialize inference.

    Declaration
    public Variable<T> InitialiseTo<TDist>(Variable<TDist> initialMarginal)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    Variable<TDist> initialMarginal
    Returns
    Type Description
    Variable<T>

    this

    Type Parameters
    Name Description
    TDist
    Remarks

    Only relevant for iterative algorithms. May be ignored by some inference algorithms.

    Named(String)

    Set the name of the variable.

    Declaration
    public Variable<T> Named(string name)
    Parameters
    Type Name Description
    String name
    Returns
    Type Description
    Variable<T>

    this

    OperatorUntyped(Variable.Operator, MethodInfo, Variable[])

    Creates a random variable from an operator

    Declaration
    public static Variable<T> OperatorUntyped(Variable.Operator op, MethodInfo methodInfo, params Variable[] args)
    Parameters
    Type Name Description
    Variable.Operator op

    The operator

    MethodInfo methodInfo

    The factor method corresponding to the operator

    Variable[] args

    The method arguments

    Returns
    Type Description
    Variable<T>

    Random<TDist>(Variable<TDist>)

    Creates a random variable with the specified prior distribution

    Declaration
    public static Variable<T> Random<TDist>(Variable<TDist> dist)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    Variable<TDist> dist

    The distribution to use

    Returns
    Type Description
    Variable<T>
    Type Parameters
    Name Description
    TDist

    The type of the distribution

    SetMarginalPrototype<TDist>(IModelExpression<TDist>)

    Add a MarginalPrototype attribute

    Declaration
    public void SetMarginalPrototype<TDist>(IModelExpression<TDist> prototype)
        where TDist : IDistribution<T>
    Parameters
    Type Name Description
    IModelExpression<TDist> prototype

    An expression for the marginal prototype

    Type Parameters
    Name Description
    TDist

    A distribution type

    SetTo(Variable<T>)

    Sets the value of a random variable. Should only be invoked on variables created using New() which do not yet have a value.

    Declaration
    public void SetTo(Variable<T> variable)
    Parameters
    Type Name Description
    Variable<T> variable

    A variable whose definition will be consumed by this and no longer available for use

    Remarks

    variable must have exactly the same set of ranges as this.

    Operators

    Addition(Variable<T>, T)

    Operator overload for addition

    Declaration
    public static Variable<T> operator +(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<T>

    Addition(Variable<T>, Variable<T>)

    Operator overload for addition

    Declaration
    public static Variable<T> operator +(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Addition(Variable<T>, Variable<Char>)

    Declaration
    public static Variable<T> operator +(Variable<T> a, Variable<char> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<Char> b
    Returns
    Type Description
    Variable<T>

    Addition(Variable<T>, Char)

    Declaration
    public static Variable<T> operator +(Variable<T> a, char b)
    Parameters
    Type Name Description
    Variable<T> a
    Char b
    Returns
    Type Description
    Variable<T>

    Addition(Variable<Char>, Variable<T>)

    Declaration
    public static Variable<T> operator +(Variable<char> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<Char> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Addition(Char, Variable<T>)

    Declaration
    public static Variable<T> operator +(char a, Variable<T> b)
    Parameters
    Type Name Description
    Char a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    BitwiseAnd(Variable<T>, Variable<T>)

    Operator overload for AND

    Declaration
    public static Variable<T> operator &(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    BitwiseOr(Variable<T>, Variable<T>)

    Operator overload for OR

    Declaration
    public static Variable<T> operator |(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Division(T, Variable<T>)

    Operator overload for division

    Declaration
    public static Variable<T> operator /(T a, Variable<T> b)
    Parameters
    Type Name Description
    T a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Division(Variable<T>, T)

    Operator overload for division

    Declaration
    public static Variable<T> operator /(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<T>

    Division(Variable<T>, Variable<T>)

    Operator overload for division

    Declaration
    public static Variable<T> operator /(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Equality(Variable<T>, T)

    Returns a new variable that is true when a variable equals a given value.

    Declaration
    public static Variable<bool> operator ==(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a

    A variable

    T b

    A value

    Returns
    Type Description
    Variable<Boolean>

    A new variable that is true when a equals b.

    Remarks

    If you want to test if a variable object points to null, then cast to object first and use reference equality, like so: if((object)var == null) ...

    Equality(Variable<T>, Variable<T>)

    Returns a new variable that is true when two variables are equal.

    Declaration
    public static Variable<bool> operator ==(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    A new variable that is true when a and b are equal.

    Remarks

    If you want to test if a variable object points to null, or if two variable objects are the same object, then cast to object first and use reference equality, like so:

    ExclusiveOr(Variable<T>, Variable<T>)

    Operator overload for XOR

    Declaration
    public static Variable<T> operator ^(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    GreaterThan(Variable<T>, T)

    Operator overload for greater than

    Declaration
    public static Variable<bool> operator>(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<Boolean>

    GreaterThan(Variable<T>, Variable<T>)

    Operator overload for greater than

    Declaration
    public static Variable<bool> operator>(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    GreaterThanOrEqual(Variable<T>, T)

    Operator overload for greater than or equal

    Declaration
    public static Variable<bool> operator >=(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<Boolean>

    GreaterThanOrEqual(Variable<T>, Variable<T>)

    Operator overload for greater than or equal

    Declaration
    public static Variable<bool> operator >=(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    Implicit(T to Variable<T>)

    Provides implicit conversion from .NET instances to constant Infer.NET variables.

    Declaration
    public static implicit operator Variable<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    Variable<T>

    Inequality(Variable<T>, T)

    Returns a new variable that is true when a variable does not equal a given value.

    Declaration
    public static Variable<bool> operator !=(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a

    A variable

    T b

    A value

    Returns
    Type Description
    Variable<Boolean>

    A new variable that is true when a does not equal b.

    Remarks

    If you want to test if a variable object does not point to null, then cast to object first and use reference equality, like so: if((object)var != null) ...

    Inequality(Variable<T>, Variable<T>)

    Returns a new variable that is true when two variables are not equal.

    Declaration
    public static Variable<bool> operator !=(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    A new variable that is true when a and b are not equal.

    Remarks

    If you want to test if a variable object does not point to null, or if two variable objects are not the same object, then cast to object first and use reference equality, like so:

    LessThan(Variable<T>, T)

    Operator overload for less than

    Declaration
    public static Variable<bool> operator <(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<Boolean>

    LessThan(Variable<T>, Variable<T>)

    Operator overload for less than

    Declaration
    public static Variable<bool> operator <(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    LessThanOrEqual(Variable<T>, T)

    Operator overload for less than or equal

    Declaration
    public static Variable<bool> operator <=(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<Boolean>

    LessThanOrEqual(Variable<T>, Variable<T>)

    Operator overload for less than or equal

    Declaration
    public static Variable<bool> operator <=(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<Boolean>

    LogicalNot(Variable<T>)

    Operator overload for NOT

    Declaration
    public static Variable<T> operator !(Variable<T> a)
    Parameters
    Type Name Description
    Variable<T> a
    Returns
    Type Description
    Variable<T>

    Modulus(Variable<T>, T)

    Operator overload for modulus

    Declaration
    public static Variable<T> operator %(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<T>

    Modulus(Variable<T>, Variable<T>)

    Operator overload for modulus

    Declaration
    public static Variable<T> operator %(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Multiply(T, Variable<T>)

    Operator overload for multiplication

    Declaration
    public static Variable<T> operator *(T a, Variable<T> b)
    Parameters
    Type Name Description
    T a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Multiply(Variable<T>, T)

    Operator overload for multiplication

    Declaration
    public static Variable<T> operator *(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<T>

    Multiply(Variable<T>, Variable<T>)

    Operator overload for multiplication

    Declaration
    public static Variable<T> operator *(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    OnesComplement(Variable<T>)

    Operator overload for NOT

    Declaration
    public static Variable<T> operator ~(Variable<T> a)
    Parameters
    Type Name Description
    Variable<T> a
    Returns
    Type Description
    Variable<T>

    Subtraction(T, Variable<T>)

    Operator overload for subtraction

    Declaration
    public static Variable<T> operator -(T a, Variable<T> b)
    Parameters
    Type Name Description
    T a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    Subtraction(Variable<T>, T)

    Operator overload for subtraction

    Declaration
    public static Variable<T> operator -(Variable<T> a, T b)
    Parameters
    Type Name Description
    Variable<T> a
    T b
    Returns
    Type Description
    Variable<T>

    Subtraction(Variable<T>, Variable<T>)

    Operator overload for subtraction

    Declaration
    public static Variable<T> operator -(Variable<T> a, Variable<T> b)
    Parameters
    Type Name Description
    Variable<T> a
    Variable<T> b
    Returns
    Type Description
    Variable<T>

    UnaryNegation(Variable<T>)

    Operator overload for unary negation

    Declaration
    public static Variable<T> operator -(Variable<T> a)
    Parameters
    Type Name Description
    Variable<T> a
    Returns
    Type Description
    Variable<T>

    Explicit Interface Implementations

    HasObservedValue.ObservedValue

    Observed value property

    Declaration
    object HasObservedValue.ObservedValue { get; set; }
    Returns
    Type Description
    Object

    IModelExpression.Name

    Declaration
    string IModelExpression.Name { get; }
    Returns
    Type Description
    String

    Implements

    IVariable
    CanGetContainers
    IModelExpression<T>
    IModelExpression
    SettableTo<T>
    System.ICloneable
    HasObservedValue
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.