Class SkipIfAnyExceptIndexIsUniformAttribute
The result is uniform (or an exception would be thrown) if any element except at the result index is uniform, hence the function call can be skipped.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors.Attributes
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class SkipIfAnyExceptIndexIsUniformAttribute : Attribute
Remarks
Examples:
f([SkipIfAnyExceptIndexIsUniform] Message[] array, int resultIndex)
Since no dependency attribute was given, the default is thatf
depends on all elements of the array. SinceSkipIfAnyExceptIndexIsUniform
was given,f
returns uniform (or throws an exception) if any elements except the one at resultIndex is uniform. Thusarray[resultIndex]
is a dependency but its uniformity is ignored.f([AllExceptIndex,SkipIfAnyExceptIndexIsUniform] Message[] array, int resultIndex)
In this case,f
depends on all elements other than resultIndex, and returns uniform (or throws an exception) if any of them are uniform. Thus it is equivalent to[AllExceptIndex,SkipIfUniform]
f([MatchingIndex,SkipIfAnyExceptIndexIsUniform] Message[] array, int resultIndex)
HereSkipIfAnyExceptIndexIsUniform
is ignored sincef
only depends onarray[resultIndex]
.