Search Results for

    Show / Hide Table of Contents

    Class ParallelCursorArray<CursorType, ArrayType>

    A multidimensional array of objects where each field is in a CursorArray.

    Inheritance
    Object
    ParallelCursorArray<CursorType, ArrayType>
    Implements
    ICursor
    ICloneable
    ICursorArray<CursorType>
    IEnumerable<CursorType>
    IEnumerable
    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.Collections
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public class ParallelCursorArray<CursorType, ArrayType> : ICursor, ICloneable, ICursorArray<CursorType>, IEnumerable<CursorType>, IEnumerable where ArrayType : ICursorArray
    Type Parameters
    Name Description
    CursorType
    ArrayType

    A cursor-based array type, such as CursorArray or ParallelCursorArray.

    Remarks

    A ParallelCursorArray is meant to behave like an ordinary Array, while being more memory-efficient. It uses a cursor similar to a CursorArray. However, the storage layout is different. Each field of the cursor is stored in a separate ICursorArray, with its own inner cursor. By advancing these inner cursors, the outer cursor is automatically updated. Thus CursorType does not need to implement ICursor. For example, CursorType might be Array<ICursor>, holding an array of inner cursors.

    There must be at least one member array, and all member arrays must have the same dimensions.

    Examples

    See CursorArrayTest.cs.

    Constructors

    ParallelCursorArray(CursorType, IList<ArrayType>)

    Create a new ParallelCursorArray.

    Declaration
    public ParallelCursorArray(CursorType cursor, IList<ArrayType> members)
    Parameters
    Type Name Description
    CursorType cursor

    An object to use as the cursor.

    IList<ArrayType> members

    A list of cursor-based arrays.

    Remarks

    cursor must already be initialized to contain the cursors of the arrays in members. There must be at least one member array, and all member arrays must have the same dimensions.

    Fields

    cursor

    Declaration
    protected CursorType cursor
    Field Value
    Type Description
    CursorType

    members

    Declaration
    protected IList<ArrayType> members
    Field Value
    Type Description
    IList<ArrayType>

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    Int32

    Item[Int32]

    Declaration
    public CursorType this[int index] { get; }
    Parameters
    Type Name Description
    Int32 index
    Property Value
    Type Description
    CursorType

    Item[Int32[]]

    Declaration
    public CursorType this[params int[] index] { get; }
    Parameters
    Type Name Description
    Int32[] index
    Property Value
    Type Description
    CursorType

    Lengths

    Declaration
    public IList<int> Lengths { get; }
    Property Value
    Type Description
    IList<Int32>

    Rank

    Declaration
    public int Rank { get; }
    Property Value
    Type Description
    Int32

    Start

    Declaration
    public int Start { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    CheckMembers()

    Declaration
    protected void CheckMembers()

    Clone()

    Declaration
    public object Clone()
    Returns
    Type Description
    Object

    CreateSourceArray(Int32)

    Declaration
    public void CreateSourceArray(int nRecords)
    Parameters
    Type Name Description
    Int32 nRecords

    GetEnumerator()

    Declaration
    public IEnumerator<CursorType> GetEnumerator()
    Returns
    Type Description
    IEnumerator<CursorType>

    GetLength(Int32)

    Declaration
    public int GetLength(int dimension)
    Parameters
    Type Name Description
    Int32 dimension
    Returns
    Type Description
    Int32

    IsCompatibleWith(ICursorArray)

    Declaration
    public bool IsCompatibleWith(ICursorArray that)
    Parameters
    Type Name Description
    ICursorArray that
    Returns
    Type Description
    Boolean

    MoveTo(Int32)

    Declaration
    public void MoveTo(int index)
    Parameters
    Type Name Description
    Int32 index

    MoveTo(Int32[])

    Declaration
    public void MoveTo(params int[] index)
    Parameters
    Type Name Description
    Int32[] index

    ReferenceClone()

    Declaration
    public ICursor ReferenceClone()
    Returns
    Type Description
    ICursor

    Explicit Interface Implementations

    ICursor.Count

    Declaration
    int ICursor.Count { get; }
    Returns
    Type Description
    Int32

    IEnumerable.GetEnumerator()

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    IEnumerator

    Implements

    ICursor
    System.ICloneable
    ICursorArray<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<T>)
    EnumerableExtensions.ForEach<T>(IEnumerable<T>, Action<Int32, T>)
    EnumerableExtensions.ForEach<T>(IEnumerable, Action<Int32, T>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt32>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt64>)
    EnumerableExtensions.ValueEquals<T>(IEnumerable<T>, IEnumerable<T>)
    EnumerableExtensions.IndexOf<T>(IEnumerable<T>, T)
    EnumerableExtensions.IndexOf<T>(IEnumerable, T)
    EnumerableExtensions.FindIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.FindIndex<T>(IEnumerable, Predicate<T>)
    EnumerableExtensions.FindAllIndex<T>(IEnumerable<T>, Predicate<T>)
    EnumerableExtensions.IndexOfAll<T>(IEnumerable<T>, T)
    EnumerableExtensions.Skip<T>(IEnumerable<T>, Int32, out List<T>)
    EnumerableExtensions.CopyTo<T>(IEnumerable<T>, T[], Int32)
    EnumerableExtensions.ToReadOnlyList<T>(IEnumerable<T>)
    IEnumerableExensions.EnumerableReduce<T, TRes>(IEnumerable<T>, TRes, Func<TRes, T, TRes>, Func<TRes, T, Int32, TRes>)
    IEnumerableExensions.EnumerableSum<T>(IEnumerable<T>, Func<T, Double>)
    ReadOnlyArray.ToReadOnlyArray<T>(IEnumerable<T>)
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.