Share via


VectorDataViewType.Dimensions Property

Definition

The dimensions. This will always have at least one item. All values will be non-negative. As with Size, a zero value indicates that the vector type is considered to have unknown length along that dimension.

public System.Collections.Immutable.ImmutableArray<int> Dimensions { get; }
member this.Dimensions : System.Collections.Immutable.ImmutableArray<int>
Public ReadOnly Property Dimensions As ImmutableArray(Of Integer)

Property Value

Remarks

In the case where this is a multi-dimensional type, that is, a situation where Dimensions has length greater than one, since VBuffer<T> itself is a single dimensional structure, we must clarify what we mean. The indices represent a "flattened" view of the coordinates implicit in the dimensions. We consider that the last dimension is the most "minor" index. In the case where Dimensions has length 2, this is commonly referred to as row-major order. So, if you hypothetically had dimensions of { 5, 2 }, then the VBuffer<T> values would be all of length 10, and the flattened indices 0, 1, 2, 3, 4, ... would correspond to "coordinates" of (0, 0), (0, 1), (1, 0), (1, 1), (2, 0), ..., respectively.

Applies to