module Ba: sig
.. end
A few bigarray helpers.
Creation
val create : ('a, 'b) Bigarray.kind -> int -> ('a, 'b) Lit.bigarray
create k count
is a bigarray of kind k
with count
scalars.
Getting
val get_v2 : (float, 'b) Lit.bigarray -> int -> Gg.v2
get_v2 b i
is the i
th to i+1
th scalars of b
as a vector.
val get_v3 : (float, 'b) Lit.bigarray -> int -> Gg.v3
get_v3 b i
is the i
th to i+2
th scalars of b
as a vector.
val get_v4 : (float, 'b) Lit.bigarray -> int -> Gg.v4
get_v4 b i
is the i
th to i+3
th scalars of b
as a vector.
val get_2d : ('a, 'b) Lit.bigarray -> int -> 'a * 'a
get_v2 b i
is the i
th to i+1
th scalars of b
.
val get_3d : ('a, 'b) Lit.bigarray -> int -> 'a * 'a * 'a
get_v3 b i
is the i
th to i+2
th scalars of b
.
val get_4d : ('a, 'b) Lit.bigarray -> int -> 'a * 'a * 'a * 'a
get_v4 b i
is the i
th to i+3
th scalars of b
.
int32 Bigarray
val geti_2d : (int32, 'b) Lit.bigarray -> int -> int * int
get_v2 b i
is the i
th to i+1
th scalars of b
.
val geti_3d : (int32, 'b) Lit.bigarray -> int -> int * int * int
get_v3 b i
is the i
th to i+2
th scalars of b
.
Setting
val set_v2 : (float, 'b) Lit.bigarray -> int -> Gg.v2 -> int
set_v2 b i v
is (i + 2)
and sets the i
th to i+1
th scalars of b
with v
.
val set_v3 : (float, 'b) Lit.bigarray -> int -> Gg.v3 -> int
set_v3 b i v
is (i + 3)
and sets the i
th to i+2
th scalars of b
with v
.
val set_v4 : (float, 'b) Lit.bigarray -> int -> Gg.v4 -> int
set_v4 b i v
is (i + 4)
and sets the i
th to i+3
th scalars of b
with v
.
val set_2d : ('a, 'b) Lit.bigarray -> int -> 'a -> 'a -> int
set_2d b i s1 s2
is (i + 2)
and sets the i
th to i+1
th scalar
of b
to s1
, s2
.
val set_3d : ('a, 'b) Lit.bigarray -> int -> 'a -> 'a -> 'a -> int
set_3d b i s1 s2 s3
is (i + 3)
and sets the i
th to i+2
th scalar
of b
to s1
, s2
, s3
.
val set_4d : ('a, 'b) Lit.bigarray -> int -> 'a -> 'a -> 'a -> 'a -> int
set_4d b i s1 s2 s3 s4
is (i + 4)
and sets the i
th to i+3
th
scalar of b
to s1
, s2
, s3
, s4
.
int32 Bigarray
val seti_2d : (int32, 'b) Lit.bigarray -> int -> int -> int -> int
set_2d b i s1 s2
is (i + 2)
and sets the i
th to i+1
th scalar
of b
to s1
, s2
.
val seti_3d : (int32, 'b) Lit.bigarray -> int -> int -> int -> int -> int
set_3d b i s1 s2 s3
is (i + 3)
and sets the i
th to i+2
th scalar
of b
to s1
, s2
, s3
.