package batteries
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=e4b70d1a716f0aaba36f419f618d0a2e
sha512=a31f1f8cf2c7c3c6c757f3bfae98ff61bb32bab6a1f1e215937df42bcfa447aad41a37edb28d7bcecb88b3838ed8bd57142bcf8e2d28e09bb538055fd8a3b72d
doc/batteries.unthreaded/BatBigarray/Array0/index.html
Module BatBigarray.Array0
Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.
type ('a, 'b, 'c) t = ('a, 'b, 'c) Bigarray.Array0.tThe type of zero-dimensional big arrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.
Array0.create kind layout returns a new bigarray of zero dimension. kind and layout determine the array element kind and the array layout as described for Genarray.create.
Array0.change_layout a layout returns a big array with the specified layout, sharing the data with a. No copying of elements is involved: the new array and the original array share the same storage space.
val size_in_bytes : ('a, 'b, 'c) t -> intsize_in_bytes a is a's kind_size_in_bytes.
val get : ('a, 'b, 'c) t -> 'aArray0.get a returns the only element in a.
val set : ('a, 'b, 'c) t -> 'a -> unitArray0.set a x v stores the value v in a.
Copy the first big array to the second big array. See Genarray.blit for more details.
val fill : ('a, 'b, 'c) t -> 'a -> unitFill the given big array with the given value. See Genarray.fill for more details.