Class SkipIfAllUniformAttribute
The result is uniform (or an exception would be thrown) if all elements are uniform, hence the function call can be skipped.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors.Attributes
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)]
public class SkipIfAllUniformAttribute : Attribute
Remarks
Applies to message functions and message function array parameters. This annotation is optional and allows the inference engine to skip unnecessary function calls, i.e. ones which would produce a uniform result or throw an exception. When applied to a message function, it means that the result is uniform (or an exception would be thrown) whenever all parameters to the function are uniform. When applied to an array parameter, it means that the result is uniform (or an exception would be thrown) whenever all dependent elements in the array are uniform. Array elements that the function does not depend on are ignored.
It only makes sense to apply this attribute to a method when the method parameters have no SkipIfUniform attributes set. Otherwise SkipIfAllUniform is automatically implied by SkipIfUniform for the parameter.
Constructors
SkipIfAllUniformAttribute()
Creates a new SkipIfAllUniform attribute
Declaration
public SkipIfAllUniformAttribute()
SkipIfAllUniformAttribute(String[])
Creates a new SkipIfAllUniform attribute applied to the specified parameter names
Declaration
public SkipIfAllUniformAttribute(params string[] parameterNames)
Parameters
Type | Name | Description |
---|---|---|
String[] | parameterNames |
Fields
ParameterNames
List of parameter names for which to check for uniformity
Declaration
public string[] ParameterNames
Field Value
Type | Description |
---|---|
String[] |