Struct CoverageGridView
A read-only 2-D view over a row-major flat float grid. Allows
consumers to iterate sampled coverage data with familiar [row,
col] indexing without paying the LOH cost of allocating a
float[,] per sample (PR-F).
public readonly struct CoverageGridView
- Inherited Members
Constructors
CoverageGridView(float[], int, int)
Creates a view over data without copying it.
public CoverageGridView(float[] data, int rows, int cols)
Parameters
datafloat[]Row-major backing array; must hold at least
rows×colselements.rowsintNumber of rows.
colsintNumber of columns.
Exceptions
- ArgumentNullException
datais null.- ArgumentOutOfRangeException
rowsorcolsis negative.- ArgumentException
datais shorter thanrows×cols.
Properties
Cols
Number of grid columns.
public int Cols { get; }
Property Value
this[int, int]
Indexer matching the legacy float[,] shape.
public float this[int row, int col] { get; }
Parameters
Property Value
Rows
Number of grid rows.
public int Rows { get; }
Property Value
Span
Flat row-major span over the underlying data.
public ReadOnlySpan<float> Span { get; }
Property Value
Methods
GetLength(int)
Length of the longest axis (mirrors float[,].GetLength).
public int GetLength(int dimension)
Parameters
dimensionint