Skip to main content

Module numeric_array_view

Module numeric_array_view 

Source
Expand description

§NumericArrayView Module - Windowed View over a NumericArray

NumericArrayV is a read-only, windowed view over a NumericArray. It groups all integer and float variants and exposes a zero-copy slice [offset .. offset + len) for fast, indexable access.

§Role

  • Lets APIs accept either a full NumericArray or a pre-sliced view.
  • Avoids deep copies while enabling per-window operations and previews.
  • Can cache per-window null counts to speed up repeated scans.

§Behaviour

  • Works across numeric variants (ints + floats) behind NumericArray.
  • Provides convenience accessors like get_f64 that upcast to f64 for uniform downstream handling.
  • Slicing returns another borrowed view; data buffers are not cloned.

§Threading

  • Thread-safe for sharing across threads (uses OnceLock for null count caching).
  • Safe to share via Arc for parallel processing.

§Interop

§Invariants

  • offset + len <= array.len()
  • len is the logical row count of this view.

Structs§

NumericArrayV
NumericArrayView