Class CursorArray<CursorType>
A multidimensional array of objects which share a single storage block.
Inheritance
CursorArray<CursorType>
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class CursorArray<CursorType> : ICursor, ICloneable, ICursorArray<CursorType>, IEnumerable<CursorType>, ICursorArray, IEnumerable where CursorType : ICursor
Type Parameters
Name |
Description |
CursorType |
|
Constructors
CursorArray(CursorType)
Declaration
public CursorArray(CursorType cursor)
Parameters
Type |
Name |
Description |
CursorType |
cursor |
|
CursorArray(CursorType, IList<Int32>, IList<Int32>)
Declaration
public CursorArray(CursorType cursor, IList<int> lengths, IList<int> stride)
Parameters
CursorArray(CursorType, Int32[])
Declaration
public CursorArray(CursorType cursor, params int[] lengths)
Parameters
Type |
Name |
Description |
CursorType |
cursor |
|
Int32[] |
lengths |
|
Fields
count
Declaration
Field Value
cursor
Declaration
protected CursorType cursor
Field Value
Type |
Description |
CursorType |
|
dim
Declaration
Field Value
start
Declaration
Field Value
stride
Declaration
Field Value
Properties
Count
The total number of structures across all dimensions
Declaration
public int Count { get; }
Property Value
Item[Int32]
Retrieve an object by linear index.
Declaration
public CursorType this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Type |
Description |
CursorType |
|
Item[Int32[]]
Retrieve an object by multidimensional index.
Declaration
public CursorType this[params int[] index] { get; }
Parameters
Type |
Name |
Description |
Int32[] |
index |
|
Property Value
Type |
Description |
CursorType |
|
Lengths
The size of each dimension of the array.
Declaration
public IList<int> Lengths { get; protected set; }
Property Value
Rank
The number of dimensions of the array.
Declaration
Property Value
Start
Declaration
public int Start { get; set; }
Property Value
Stride
Declaration
public int[] Stride { get; }
Property Value
Methods
CheckCompatible(ICursorArray)
Declaration
public void CheckCompatible(ICursorArray that)
Parameters
Clone()
Declaration
public virtual object Clone()
Returns
CreateSourceArray(Int32)
Declaration
public void CreateSourceArray(int nRecords)
Parameters
Type |
Name |
Description |
Int32 |
nRecords |
|
ForEach(ICursorArray, ICursorArray, Action)
Invoke an element-wise action across three arrays.
Declaration
public void ForEach(ICursorArray a, ICursorArray b, Action action)
Parameters
Type |
Name |
Description |
ICursorArray |
a |
An array of the same size as this . Can be the same object as this .
|
ICursorArray |
b |
An array of the same size as this . Can be the same object as this .
|
Action |
action |
A delegate which accesses the array cursors.
|
ForEach(ICursorArray, Action)
Invoke an element-wise action across two arrays.
Declaration
public void ForEach(ICursorArray that, Action action)
Parameters
Type |
Name |
Description |
ICursorArray |
that |
An array of the same size as this . Can be the same object as this .
|
Action |
action |
A delegate which accesses the array cursors.
|
ForEach(Action)
Invoke an action for each element of an array.
Declaration
public void ForEach(Action action)
Parameters
Type |
Name |
Description |
Action |
action |
A delegate which accesses the array cursor.
|
GetEnumerator()
Declaration
public IEnumerator<CursorType> GetEnumerator()
Returns
GetLength(Int32)
Declaration
public int GetLength(int dimension)
Parameters
Type |
Name |
Description |
Int32 |
dimension |
|
Returns
IsCompatibleWith(ICursorArray)
Declaration
public bool IsCompatibleWith(ICursorArray that)
Parameters
Returns
IsCompatibleWith(Array)
Declaration
public bool IsCompatibleWith(Array that)
Parameters
Type |
Name |
Description |
Array |
that |
|
Returns
LinearIndexToMultidimensionalIndex(Int32, IList<Int32>)
Declaration
public void LinearIndexToMultidimensionalIndex(int index, IList<int> indexList)
Parameters
MoveTo(Int32)
Position the cursor at a linear index.
Declaration
public void MoveTo(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
|
MoveTo(Int32[])
Position the cursor at a multidimensional index.
Declaration
public void MoveTo(params int[] index)
Parameters
Type |
Name |
Description |
Int32[] |
index |
|
ReferenceClone()
Declaration
public virtual ICursor ReferenceClone()
Returns
UpdateCounts()
Declaration
protected void UpdateCounts()
Explicit Interface Implementations
ICursor.Count
Declaration
int ICursor.Count { get; }
Returns
ICursorArray.Item[Int32]
Declaration
object ICursorArray.this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Returns
ICursorArray.Item[Int32[]]
Declaration
object ICursorArray.this[params int[] index] { get; }
Parameters
Type |
Name |
Description |
Int32[] |
index |
|
Returns
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Implements
Extension Methods