Library
Module
Module type
Parameter
Class
Class type
Index maps are generic wrappers around indexable data sources.
val make_ro : ('i -> 'e) -> ('i, 'e) ro
val make_wo : ('i -> 'e -> 'u) -> ('i, 'e, 'u) wo
val make_rw : ('i -> 'e) -> ('i -> 'e -> 'u) -> ('i, 'e, 'u) rw
make_*
will create a t
value using the given get and/or set function(s).
read imap i
returns the element indexed by i
from imap
.
map_* imap
returns a new t
based on imap
with each element transformed by the given function(s).
mapi imap f
returns a new t
based on imap
. The index is transformed by f
.
to_wo imap
returns a write-only version of imap
val of_array : 'e array -> (int, 'e, unit) rw
val of_array1 : ('e, _, _) Bigarray.Array1.t -> (int, 'e, unit) rw
val of_array2 : ('e, _, _) Bigarray.Array2.t -> (int * int, 'e, unit) rw
val of_array3 : ('e, _, _) Bigarray.Array3.t -> (int * int * int, 'e, unit) rw
val of_genarray : ('e, _, _) Bigarray.Genarray.t -> (int array, 'e, unit) rw
Create a t
from a bigarray
to_(row|column)_major imap
converts imap
to use matrix-like indexing. Both functions return values with (i, j)
indexes.
module Tuple2 : sig ... end
module Tuple3 : sig ... end