package modelkit

  1. Overview
  2. Docs

Module Modelkit.VectorSource

Immutable one-dimensional float64 data.

Values use C-layout Bigarray storage. Admission from and export to a Bigarray copy the buffer so mutation outside ModelKit cannot change an admitted value.

type t
val create : length:int -> float -> (t, Data_error.t) result
val init : length:int -> (int -> float) -> (t, Data_error.t) result
val of_array : float array -> t
val of_bigarray : bigarray -> t
val length : t -> int
val get : t -> int -> float

get vector index returns the value at index.

Raises Invalid_argument if index is outside the vector.

val to_array : t -> float array
val to_bigarray : t -> bigarray