package bimage
Library
Module
Module type
Parameter
Class
Class type
The Data module defines several operations on one dimensional image data
type ('a, 'b) t = ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
Data type
Converts an array to a Data.t
of the given kind
val to_array : ('a, 'b) t -> 'a array
Converts a Data.t
to an array
val length : ('a, 'b) t -> int
Returns the number of elements in a Data.t
val fold : ('a -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
Reduce over a single Data.t
val fill : ('a, 'b) t -> 'a -> unit
fill d x
sets each value of d
to x
val map_inplace : ('a -> 'a) -> ('a, 'b) t -> unit
map_inplace f data
runs f
over each value of data
map2_inplace f data1 data2
runs f
over each value of data1
and data2
slice ~offs ~length data
extracts a section of data
of length
values starting at index offs
copy_to ~dest src
copies each value from src
to dest
Convert between Data.t
types with an existing destination image
of_float ~dest k data
converts a Data.t
from float to k
, storing the results in dest
if provided.
to_float ~dest data
converts a Data.t
to float values, storing the results in dest
if provided.
val hash : ('a, 'b) t -> int
Default hash function