Search Results for

    Show / Hide Table of Contents

    Class Collection

    Contains commonly used factor methods.

    Inheritance
    Object
    Collection
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Factors
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [Quality(QualityBand.Stable)]
    public static class Collection

    Methods

    GetDeepJaggedItems<T>(IReadOnlyList<T>, IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>>)

    Get multiple elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[][][] GetDeepJaggedItems<T>(IReadOnlyList<T> array, IReadOnlyList<IReadOnlyList<IReadOnlyList<int>>> indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>> indices

    Array of indices for items we want to get

    Returns
    Type Description
    T[][][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetItem<T>(IReadOnlyList<T>, Int32)

    Get an element of an array.

    Declaration
    [ParameterNames(new string[]{"item", "array", "index"})]
    public static T GetItem<T>(IReadOnlyList<T> array, int index)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    Int32 index

    The index to get

    Returns
    Type Description
    T

    The item

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetItem2D<T>(T[,], Int32, Int32)

    Get an element of a 2D array.

    Declaration
    [ParameterNames(new string[]{"item", "array", "index1", "index2"})]
    public static T GetItem2D<T>(T[, ] array, int index1, int index2)
    Parameters
    Type Name Description
    T[,] array

    The array

    Int32 index1

    The first index

    Int32 index2

    The second index

    Returns
    Type Description
    T

    The item

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetItems<T>(IReadOnlyList<T>, IReadOnlyList<Int32>)

    Get multiple elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[] GetItems<T>(IReadOnlyList<T> array, IReadOnlyList<int> indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    IReadOnlyList<Int32> indices

    Array of indices for items we want to get

    Returns
    Type Description
    T[]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetItemsFromDeepJagged<T>(IReadOnlyList<IReadOnlyList<IReadOnlyList<T>>>, IReadOnlyList<Int32>, IReadOnlyList<Int32>, IReadOnlyList<Int32>)

    Get multiple elements of a jagged array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices", "indices2", "indices3"})]
    public static T[] GetItemsFromDeepJagged<T>(IReadOnlyList<IReadOnlyList<IReadOnlyList<T>>> array, IReadOnlyList<int> indices, IReadOnlyList<int> indices2, IReadOnlyList<int> indices3)
    Parameters
    Type Name Description
    IReadOnlyList<IReadOnlyList<IReadOnlyList<T>>> array

    The array

    IReadOnlyList<Int32> indices

    Array of depth 1 indices for items we want to get

    IReadOnlyList<Int32> indices2

    Array of depth 2 indices for items we want to get

    IReadOnlyList<Int32> indices3

    Array of depth 3 indices for items we want to get

    Returns
    Type Description
    T[]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetItemsFromJagged<T>(IReadOnlyList<IReadOnlyList<T>>, IReadOnlyList<Int32>, IReadOnlyList<Int32>)

    Get multiple elements of a jagged array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices", "indices2"})]
    public static T[] GetItemsFromJagged<T>(IReadOnlyList<IReadOnlyList<T>> array, IReadOnlyList<int> indices, IReadOnlyList<int> indices2)
    Parameters
    Type Name Description
    IReadOnlyList<IReadOnlyList<T>> array

    The array

    IReadOnlyList<Int32> indices

    Array of depth 1 indices for items we want to get

    IReadOnlyList<Int32> indices2

    Array of depth 2 indices for items we want to get

    Returns
    Type Description
    T[]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetJaggedItems<T>(IReadOnlyList<T>, IReadOnlyList<IReadOnlyList<Int32>>)

    Get multiple elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[][] GetJaggedItems<T>(IReadOnlyList<T> array, IReadOnlyList<IReadOnlyList<int>> indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    IReadOnlyList<IReadOnlyList<Int32>> indices

    Array of indices for items we want to get

    Returns
    Type Description
    T[][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    GetJaggedItemsFromJagged<T>(IReadOnlyList<IReadOnlyList<T>>, IReadOnlyList<IReadOnlyList<Int32>>, IReadOnlyList<IReadOnlyList<Int32>>)

    Get multiple elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices", "indices2"})]
    public static T[][] GetJaggedItemsFromJagged<T>(IReadOnlyList<IReadOnlyList<T>> array, IReadOnlyList<IReadOnlyList<int>> indices, IReadOnlyList<IReadOnlyList<int>> indices2)
    Parameters
    Type Name Description
    IReadOnlyList<IReadOnlyList<T>> array

    The array

    IReadOnlyList<IReadOnlyList<Int32>> indices

    Array of depth 1 indices for items we want to get

    IReadOnlyList<IReadOnlyList<Int32>> indices2

    Array of depth 2 indices for items we want to get

    Returns
    Type Description
    T[][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    JaggedSubarray<T>(IReadOnlyList<T>, Int32[][])

    Get multiple different elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[][] JaggedSubarray<T>(IReadOnlyList<T> array, int[][] indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    Int32[][] indices

    Array of indices for items to get. indices[i][j] must be different for different j and same i, but can match for different i.

    Returns
    Type Description
    T[][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    JaggedSubarrayWithMarginal<T>(IReadOnlyList<T>, Int32[][], out IReadOnlyList<T>)

    Get multiple different elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices", "marginal"})]
    public static T[][] JaggedSubarrayWithMarginal<T>(IReadOnlyList<T> array, int[][] indices, out IReadOnlyList<T> marginal)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    Int32[][] indices

    Array of indices for items to get. indices[i][j] must be different for different j and same i, but can match for different i.

    IReadOnlyList<T> marginal
    Returns
    Type Description
    T[][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    Split<T>(IReadOnlyList<T>, Int32, out T[])

    Declaration
    [ParameterNames(new string[]{"head", "array", "count", "tail"})]
    public static T[] Split<T>(IReadOnlyList<T> array, int count, out T[] tail)
    Parameters
    Type Name Description
    IReadOnlyList<T> array
    Int32 count
    T[] tail
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    SplitSubarray<T>(IReadOnlyList<T>, Int32[][])

    Get multiple different elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[][] SplitSubarray<T>(IReadOnlyList<T> array, int[][] indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    Int32[][] indices

    Jagged array containing the indices of the elements to get. The indices must all be different. The shape of this array determines the shape of the result.

    Returns
    Type Description
    T[][]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    Subarray<T>(IReadOnlyList<T>, IReadOnlyList<Int32>)

    Get multiple different elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices"})]
    public static T[] Subarray<T>(IReadOnlyList<T> array, IReadOnlyList<int> indices)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    IReadOnlyList<Int32> indices

    Array of indices for items we want to get. Must all be different.

    Returns
    Type Description
    T[]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    Subarray2<T>(IReadOnlyList<T>, IReadOnlyList<Int32>, IReadOnlyList<T>)

    Get multiple different elements of an array.

    Declaration
    [ParameterNames(new string[]{"items", "array", "indices", "array2"})]
    public static T[] Subarray2<T>(IReadOnlyList<T> array, IReadOnlyList<int> indices, IReadOnlyList<T> array2)
    Parameters
    Type Name Description
    IReadOnlyList<T> array

    The array

    IReadOnlyList<Int32> indices

    Array of indices for items to get. Indices must all be different.

    IReadOnlyList<T> array2
    Returns
    Type Description
    T[]

    The items

    Type Parameters
    Name Description
    T

    Type of element in the array

    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.