Module array_view

Module array_view 

Source
Expand description

§ArrayView Module - Windowed View over an Array

ArrayV is a logical, read-only, zero-copy view into a contiguous window [offset .. offset + len) of any Array variant.

§Purpose

  • Provides indexable, bounds-checked access to a subrange of an array without copying buffers.
  • Caches null counts per view for efficient repeated queries.
  • Acts as a unifying abstraction for windowed operations across all array types.

§Behaviour

  • All indices are relative to the view’s start.
  • Internally retains an Arc reference to the parent array’s buffers.
  • Windowing and slicing are O(1) operations (pointer + metadata updates only).
  • Cached null counts are stored in a Cell for fast repeated access.

§Threading

  • Not thread-safe due to Cell.
  • For parallelism, create per-thread clones with slice.

§Interop

§Invariants

  • offset + len <= array.len()
  • len reflects the logical number of elements in the view.

Structs§

ArrayV
ArrayView