package modelkit

  1. Overview
  2. Docs

Module Modelkit.Row_view

An immutable ordered selection of rows from an aligned source.

Construction copies and validates the indices. Order and duplicates are preserved to support deterministic resampling.

type t
val create : source_size:int -> int array -> (t, Data_error.t) result
val all : source_size:int -> (t, Data_error.t) result
val source_size : t -> int
val length : t -> int
val get : t -> int -> int

get view position returns the source row at position.

Raises Invalid_argument if position is outside the view.

val indices : t -> int array