Infer.NET user guide : Factors and Constraints
This page lists the remaining built-in methods, which have not already been covered. In these methods, you can often pass in random variables as arguments e.g.
Variable<Vector> instead of
Vector. For compactness, this is not shown in the syntax below.
These methods provide a convenient short alternative to using
Variable<T>.Factor and passing in the factor method, as described on this page.
||Create a T random variable array by extracting elements of array at the specified indices, which cannot include duplicates. Subarray should be used instead of
||Create a T random variable array by extracting elements of array at the specified indices, which may include duplicates. Some uses of GetItems can also be achieved through indexing. If there are no duplicate indices, Subarray should be used instead.|
|Enum to int||
||Create an int random variable corresponding to the supplied enum random variable. This allows enums to be used as arguments to Variable.Case() or Variable.Switch().|
|Vector from array||
||Create a vector random variable corresponding the supplied array of random doubles.|
|Array from vector||
||Create an array of double random variables corresponding to the elements of the supplied random vector. This is more efficient than calling
||Concatenates two random vectors.|
||Extract contiguous elements from a random vector.|
||Create a string random variable from a random character array.|
||Extract an element of a random vector or a string.|
||Evaluate a random function at a point. Used to construct Gaussian Process models like this one.|