Table of Contents

Struct CoverageGridView

Namespace
EncDotNet.S100.Pipelines.Coverage
Assembly
EncDotNet.S100.Core.dll

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

data float[]

Row-major backing array; must hold at least rows × cols elements.

rows int

Number of rows.

cols int

Number of columns.

Exceptions

ArgumentNullException

data is null.

ArgumentOutOfRangeException

rows or cols is negative.

ArgumentException

data is shorter than rows × cols.

Properties

Cols

Number of grid columns.

public int Cols { get; }

Property Value

int

this[int, int]

Indexer matching the legacy float[,] shape.

public float this[int row, int col] { get; }

Parameters

row int
col int

Property Value

float

Rows

Number of grid rows.

public int Rows { get; }

Property Value

int

Span

Flat row-major span over the underlying data.

public ReadOnlySpan<float> Span { get; }

Property Value

ReadOnlySpan<float>

Methods

GetLength(int)

Length of the longest axis (mirrors float[,].GetLength).

public int GetLength(int dimension)

Parameters

dimension int

Returns

int