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 thatfdepends on all elements of the array. SinceSkipIfAnyExceptIndexIsUniformwas given,freturns 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,fdepends 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)HereSkipIfAnyExceptIndexIsUniformis ignored sincefonly depends onarray[resultIndex].