VBuffer<T>.GetIndices Method

Definition

The indices. For a dense representation, this array is not used, and will return the default "empty" span. For a sparse representation it is parallel to that returned from GetValues() and specifies the logical indices for the corresponding values, in increasing order, between 0 inclusive and Length exclusive, corresponding to all explicitly defined values. All values at unspecified indices should be treated as being implicitly defined with the default value of T.

public ReadOnlySpan<int> GetIndices ();
member this.GetIndices : unit -> ReadOnlySpan<int>
Public Function GetIndices () As ReadOnlySpan(Of Integer)

Returns

ReadOnlySpan<Int32>

Remarks

To give one example, if GetIndices() returns [3, 5] and GetValues()() produces [98, 76], this VBuffer<T> stands for a vector with non-zero values 98 and 76 respectively at the 4th and 6th coordinates, and zeros at all other indices. (Zero, because that is the default value for all .NET numeric types.)

Applies to