module Slap_vec: sig
.. end
Slap.Vec
provides operations on sized vectors.
type (+'n, 'num, 'prec, +'cnt_or_dsc)
t
('n, 'num, 'prec, 'cnt_or_dsc) vec
is the type of 'n
-dimensional vector
whose elements have OCaml type 'num
, representation kind 'prec
and
memory contiguity flag 'cnt_or_dsc
.
The internal implementation is fortran-style one-dimensional big array.
val cnt : ('n, 'num, 'prec, Slap_misc.cnt) t ->
('n, 'num, 'prec, 'cnt) t
Recover polymorphism of the fourth type parameter.
Creation of vectors
val create : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> ('n, 'num, 'prec, 'cnt) t
create kind n
Returns a fresh n
-dimensional vector (not initialized).
val make : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> 'num -> ('n, 'num, 'prec, 'cnt) t
make kind n a
Returns a fresh n
-dimensional vector initialized with a
.
val init : ('a, 'b) Bigarray.kind ->
'n Slap_size.t -> (int -> 'a) -> ('n, 'a, 'b, 'cnt) t
init kind n f
Returns a fresh vector (f 1, ..., f n)
with n
elements.
Accessors
val kind : ('n, 'num, 'prec, 'cd) t -> ('num, 'prec) Bigarray.kind
Returns the kind of the given big array.
val dim : ('n, 'num, 'prec, 'cd) t -> 'n Slap_size.t
dim x
Returns the dimension of the vector x
.
val get_dyn : ('n, 'num, 'prec, 'cd) t -> int -> 'num
get_dyn x i
Returns the i
-th element of the vector x
.
val set_dyn : ('n, 'num, 'prec, 'cd) t -> int -> 'num -> unit
set_dyn x i a
assigns a
to the i
-th element of the vector x
.
val unsafe_get : ('n, 'num, 'prec, 'cd) t -> int -> 'num
val unsafe_set : ('n, 'num, 'prec, 'cd) t -> int -> 'num -> unit
val replace_dyn : ('n, 'num, 'prec, 'cd) t -> int -> ('num -> 'num) -> unit
replace_dyn v i f
is set_dyn v i (f (get_dyn v i))
.
Iterators
val map : ('y_num, 'y_prec) Bigarray.kind ->
('x_num -> 'y_num) ->
?y:('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t
map kind f ?y (x1, ..., xn)
is (f x1, ..., f xn)
.
Returns the vector y
, which is overwritten.
y
: default = a fresh vector.
val mapi : ('y_num, 'y_prec) Bigarray.kind ->
(int -> 'x_num -> 'y_num) ->
?y:('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t
mapi kind f ?y (x1, ..., xn)
is (f 1 x1, ..., f n xn)
with
the vector's dimension n
.
Returns the vector y
, which is overwritten.
y
: default = a fresh vector.
val fold_left : ('accum -> 'x_num -> 'accum) ->
'accum -> ('n, 'x_num, 'prec, 'cd) t -> 'accum
fold_left f init (x1, x2, ..., xn)
is
f (... (f (f init x1) x2) ...) xn
.
val fold_lefti : (int -> 'accum -> 'num -> 'accum) ->
'accum -> ('n, 'num, 'prec, 'cd) t -> 'accum
fold_lefti f init (x1, x2, ..., xn)
is
f n (... (f 2 (f 1 init x1) x2) ...) xn
with the vector's dimension n
.
val fold_right : ('num -> 'accum -> 'accum) ->
('n, 'num, 'prec, 'cd) t -> 'accum -> 'accum
fold_right f (x1, x2, ..., xn) init
is
f x1 (f x2 (... (f xn init) ...))
.
val fold_righti : (int -> 'num -> 'accum -> 'accum) ->
('n, 'num, 'prec, 'cd) t -> 'accum -> 'accum
fold_righti f (x1, x2, ..., xn) init
is
f 1 x1 (f 2 x2 (... (f n xn init) ...))
with the vector's dimension n
.
val replace_all : ('n, 'num, 'prec, 'cd) t -> ('num -> 'num) -> unit
replace_all x f
modifies the vector x
in place
-- the i
-th element xi
of x
will be set to f xi
.
val replace_alli : ('n, 'num, 'prec, 'cd) t -> (int -> 'num -> 'num) -> unit
replace_alli x f
modifies the vector x
in place
-- the i
-th element xi
of x
will be set to f i xi
.
val iter : ('num -> unit) -> ('n, 'num, 'prec, 'cd) t -> unit
iter f (x1, x2, ..., xn)
is f x1; f x2; ...; f xn
.
val iteri : (int -> 'num -> unit) -> ('n, 'num, 'prec, 'cd) t -> unit
iteri f (x1, x2, ..., xn)
is f 1 x1; f 2 x2; ...; f n xn
.
Iterators on two vectors
val map2 : ('z_num, 'z_prec) Bigarray.kind ->
('x_num -> 'y_num -> 'z_num) ->
?z:('n, 'z_num, 'z_prec, 'z_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t
map2 kind f ?z (x1, x2, ..., xn) (y1, y2, ..., yn)
is
(f x1 y1, f x2 y2, ..., f xn yn)
.
Returns the vector z
, which is overwritten.
z
: default = a fresh vector.
val mapi2 : ('z_num, 'z_prec) Bigarray.kind ->
(int -> 'x_num -> 'y_num -> 'z_num) ->
?z:('n, 'z_num, 'z_prec, 'z_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t
mapi2 kind f ?z (x1, x2, ..., xn) (y1, y2, ..., yn)
is
(f 1 x1 y1, f 2 x2 y2, ..., f n xn yn)
with the vectors' dimension n
.
Returns the vector z
, which is overwritten.
z
: default = a fresh vector.
val fold_left2 : ('accum -> 'x_num -> 'y_num -> 'accum) ->
'accum ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> 'accum
fold_left2 f init (x1, x2, ..., xn) (y1, y2, ..., yn)
is
f (... (f (f init x1 y1) x2 y2) ...) xn yn
.
val fold_lefti2 : (int -> 'accum -> 'x_num -> 'y_num -> 'accum) ->
'accum ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> 'accum
fold_lefti2 f init (x1, x2, ..., xn) (y1, y2, ..., yn)
is
f n (... (f 2 (f 1 init x1 y1) x2 y2) ...) xn yn
with the vectors'
dimension n
.
val fold_right2 : ('x_num -> 'y_num -> 'accum -> 'accum) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> 'accum -> 'accum
fold_righti2 f (x1, x2, ..., xn) (y1, y2, ..., yn) init
is
f x1 y1 (f x2 y2 (... (f xn yn init) ...))
.
val fold_righti2 : (int -> 'x_num -> 'y_num -> 'accum -> 'accum) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> 'accum -> 'accum
fold_righti2 f (x1, x2, ..., xn) (y1, y2, ..., yn) init
is
f 1 x1 y1 (f 2 x2 y2 (... (f n xn yn init) ...))
with the vectors'
dimension n
.
val iter2 : ('x_num -> 'y_num -> unit) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> unit
iter2 f (x1, x2, ..., xn) (y1, y2, ..., yn)
is
f x1 y1; f x2 y2; ...; f xn yn
.
val iteri2 : (int -> 'x_num -> 'y_num -> unit) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> unit
iteri2 f (x1, x2, ..., xn) (y1, y2, ..., yn)
is
f 1 x1 y1; f 2 x2 y2; ...; f n xn yn
.
Iterators on three vectors
val map3 : ('w_num, 'w_prec) Bigarray.kind ->
('x_num -> 'y_num -> 'z_num -> 'w_num) ->
?w:('n, 'w_num, 'w_prec, 'w_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t ->
('n, 'w_num, 'w_prec, 'w_cd) t
map3 kind f ?w (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is
(f x1 y1 z1, f x2 y2 z2, ..., f xn yn zn)
.
Returns the vector w
, which is overwritten.
w
: default = a fresh vector.
val mapi3 : ('w_num, 'w_prec) Bigarray.kind ->
(int -> 'x_num -> 'y_num -> 'z_num -> 'w_num) ->
?w:('n, 'w_num, 'w_prec, 'w_cd) t ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t ->
('n, 'w_num, 'w_prec, 'w_cd) t
mapi3 kind f ?w (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is
(f 1 x1 y1 z1, f 2 x2 y2 z2, ..., f n xn yn zn)
with the vectors'
dimension n
.
Returns the vector w
, which is overwritten.
w
: default = a fresh vector.
val fold_left3 : ('accum -> 'x_num -> 'y_num -> 'z_num -> 'accum) ->
'accum ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> 'accum
fold_left3 f init (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is f (... (f (f init x1 y1 z1) x2 y2 z2) ...) xn yn zn
.
val fold_lefti3 : (int -> 'accum -> 'x_num -> 'y_num -> 'z_num -> 'accum) ->
'accum ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> 'accum
fold_lefti3 f init (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is f n (... (f 2 (f 1 init x1 y1 z1) x2 y2 z2) ...) xn yn zn
with the
vectors' dimension n
.
val fold_right3 : ('x_num -> 'y_num -> 'z_num -> 'accum -> 'accum) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> 'accum -> 'accum
fold_right3 f (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn) init
is f x1 y1 z1 (f x2 y2 z2 (... (f xn yn zn init) ...))
.
val fold_righti3 : (int -> 'x_num -> 'y_num -> 'z_num -> 'accum -> 'accum) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> 'accum -> 'accum
fold_righti3 f (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn) init
is f 1 x1 y1 z1 (f 2 x2 y2 z2 (... (f n xn yn zn init) ...))
with the vectors' dimension n
.
val iter3 : ('x_num -> 'y_num -> 'z_num -> unit) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> unit
iter3 f (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is
f x1 y1 z1; f x2 y2 z2; ...; f xn yn zn
.
val iteri3 : (int -> 'x_num -> 'y_num -> 'z_num -> unit) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t ->
('n, 'z_num, 'z_prec, 'z_cd) t -> unit
iteri3 f (x1, x2, ..., xn) (y1, y2, ..., yn) (z1, z2, ..., zn)
is
f 1 x1 y1 z1; f 2 x2 y2 z2; ...; f n xn yn zn
.
Scanning
val for_all : ('num -> bool) -> ('n, 'num, 'prec, 'cd) t -> bool
for_all p (x1, x2, ..., xn)
is (p x1) && (p x2) && ... && (p xn)
.
Returns true
if and only if all elements of the given vector satisfy
the predicate p
.
val exists : ('num -> bool) -> ('n, 'num, 'prec, 'cd) t -> bool
exists p (x1, x2, ..., xn)
is (p x1) || (p x2) || ... || (p xn)
.
Returns true
if and only if at least one element of the given vector
satisfies the predicate p
.
val for_all2 : ('x_num -> 'y_num -> bool) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> bool
for_all2 p (x1, x2, ..., xn) (y1, y2, ..., yn)
is
(p x1 y1) && (p x2 y2) && ... && (p xn yn)
.
Returns true
if and only if all elements of the given two vectors
satisfy the predicate p
.
val exists2 : ('x_num -> 'y_num -> bool) ->
('n, 'x_num, 'x_prec, 'x_cd) t ->
('n, 'y_num, 'y_prec, 'y_cd) t -> bool
exists2 p (x1, x2, ..., xn) (y1, y2, ..., yn)
is
(p x1 y1) || (p x2 y2) || ... || (p xn yn)
.
Returns true
if and only if at least one pair of elements of the given two
vectors satisfies the predicate p
.
val mem : ?equal:('num -> 'num -> bool) ->
'num -> ('n, 'num, 'prec, 'cd) t -> bool
mem ?equal a v
Returns true
if and only if a
is equal to an element of v
.
equal
: default = (=)
(polymorphic compare)
Basic operations
val cons : ?y:('n Slap_size.s, 'num, 'prec, 'y_cd) t ->
'num ->
('n, 'num, 'prec, 'x_cd) t ->
('n Slap_size.s, 'num, 'prec, 'y_cd) t
cons ?y e x
adds element e
at the beginning of vector x
, and copies
it into y
.
Since 4.0.0
Returns the vector y
, which is overwritten.
y
: default = a fresh vector.
val hd : ('n Slap_size.s, 'num, 'prec, 'x_cd) t -> 'num
Since 4.0.0
Returns the first element of a given vector. (typesafe)
val hd_dyn : ('n, 'num, 'prec, 'x_cd) t -> 'num
Since 4.0.0
Returns the first element of a given vector.
val last : ('n Slap_size.s, 'num, 'prec, 'x_cd) t -> 'num
Since 4.0.0
Returns the last element of a given vector. (typesafe)
val last_dyn : ('n, 'num, 'prec, 'x_cd) t -> 'num
Since 4.0.0
Returns the last element of a given vector.
val tl : ?y:('n, 'num, 'prec, 'y_cd) t ->
('n Slap_size.s, 'num, 'prec, 'x_cd) t ->
('n, 'num, 'prec, 'x_cd) t
Since 4.0.0
Returns a given vector without the first element. (typesafe)
val tl_dyn : ?y:('n Slap_size.p, 'num, 'prec, 'y_cd) t ->
('n, 'num, 'prec, 'x_cd) t ->
('n Slap_size.p, 'num, 'prec, 'x_cd) t
Since 4.0.0
Returns a given vector without the first element.
val inits : ?y:('n, 'num, 'prec, 'y_cd) t ->
('n Slap_size.s, 'num, 'prec, 'x_cd) t ->
('n, 'num, 'prec, 'x_cd) t
Since 4.0.0
Returns a given vector without the first element. (typesafe)
This is the same as init in Haskell.
val inits_dyn : ?y:('n Slap_size.p, 'num, 'prec, 'y_cd) t ->
('n, 'num, 'prec, 'x_cd) t ->
('n Slap_size.p, 'num, 'prec, 'x_cd) t
Since 4.0.0
Returns a given vector without the first element.
This is the same as init in Haskell.
val copy : ?y:('n, 'num, 'prec, 'y_cd) t ->
('n, 'num, 'prec, 'x_cd) t -> ('n, 'num, 'prec, 'y_cd) t
copy ?y x
copies the vector x
to the vector y
.
Returns the vector y
, which is overwritten.
y
: default = a fresh vector.
val fill : ('n, 'num, 'prec, 'cd) t -> 'num -> unit
Fill the given vector with the given value.
val append : ('m, 'num, 'prec, 'x_cd) t ->
('n, 'num, 'prec, 'y_cd) t ->
(('m, 'n) Slap_size.add, 'num, 'prec, 'cnt) t
Concatenate two vectors.
val shared_rev : ('n, 'num, 'prec, 'cd) t -> ('n, 'num, 'prec, 'cd) t
shared_rev (x1, x2, ..., xn)
Returns reversed vector (xn, ..., x2, x1)
. The data are shared.
val rev : ('n, 'num, 'prec, 'cd) t -> ('n, 'num, 'prec, 'cd) t
rev (x1, x2, ..., xn)
Returns reversed vector (xn, ..., x2, x1)
. The data are NOT shared.
Conversion
val to_array : ('n, 'num, 'prec, 'cd) t -> 'num array
to_array x
Returns the array of all the elements of the vector x
.
val of_array_dyn : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> 'num array -> ('n, 'num, 'prec, 'cnt) t
of_array_dyn kind n [|a1; ...; an|]
Raises Invalid_argument
the length of the given array is not equal to n
.
Returns a fresh vector (a1, ..., an)
.
val unsafe_of_array : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> 'num array -> ('n, 'num, 'prec, 'cnt) t
Like of_array_dyn
, but size checking is not always performed.
Since 1.0.0
val to_list : ('n, 'num, 'prec, 'cd) t -> 'num list
to_list x
Returns the list of all the elements of the vector x
.
val of_list_dyn : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> 'num list -> ('n, 'num, 'prec, 'cnt) t
of_list_dyn kind n [a1; ...; an]
Raises Invalid_argument
the length of the given list is not equal to n
.
Returns a fresh vector (a1, ..., an)
.
val unsafe_of_list : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t -> 'num list -> ('n, 'num, 'prec, 'cnt) t
Like of_list_dyn
, but size checking is not always performed.
Since 1.0.0
val to_bigarray : ('n, 'num, 'prec, 'cd) t ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t
to_bigarray x
Returns the big array of all the elements of the vector x
.
val of_bigarray_dyn : ?share:bool ->
'n Slap_size.t ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t ->
('n, 'num, 'prec, 'cnt) t
of_bigarray_dyn ?share n ba
Raises Invalid_argument
the length of the given big array is not equal to
n
.
Returns a fresh vector of all the elements of big array ba
.
share
: true
if data are shared. (default = false
)
val unsafe_of_bigarray : ?share:bool ->
'n Slap_size.t ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t ->
('n, 'num, 'prec, 'cnt) t
Like unsafe_of_bigarray
, but size checking is not always performed.
Since 1.0.0
type ('num, 'prec, 'cnt_or_dsc)
dyn =
| |
VEC : ('n, 'num0, 'prec0, 'cnt_or_dsc0) t -> ('num0, 'prec0, 'cnt_or_dsc0) dyn |
The type of packages of existential quantified sized type:
('num, 'prec, 'cnt_or_dsc) dyn
=
exists n. (n, 'num, 'prec, 'cnt_or_dsc) Vec.t
.
Since 4.0.0
val of_array_c : ('num, 'prec) Bigarray.kind -> 'num array -> ('num, 'prec, 'cnt) dyn
let VEC n = of_array_c kind [|a1; ...; an|]
Since 4.0.0
Returns a constructor VEC
that has a vector (a1, ..., an)
that has the
existential quantified sized type
exists n. (n, 'num, 'prec, 'cnt_or_dsc) Vec.t
.
"c" of of_array_c
means a "c"onstructor of GADT. This function is
available in OCaml 4.00 or above.
val of_list_c : ('num, 'prec) Bigarray.kind -> 'num list -> ('num, 'prec, 'cnt) dyn
let VEC n = of_list_c kind [a1; ...; an]
Since 4.0.0
Returns a constructor VEC
that has a vector (a1, ..., an)
that has the
existential quantified sized type
exists n. (n, 'num, 'prec, 'cnt_or_dsc) Vec.t
.
"c" of of_list_c
means a "c"onstructor of GADT. This function is available
in OCaml 4.00 or above.
val of_bigarray_c : ?share:bool ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t ->
('num, 'prec, 'cnt) dyn
let VEC n = of_bigarray_c ?share ba
Since 4.0.0
Returns a constructor VEC
that has a vector (of all the elements of big
array ba
) that has the existential quantified sized type
exists n. (n, 'num, 'prec, 'cnt_or_dsc) Vec.t
.
"c" of of_bigarray_c
means a "c"onstructor of GADT. This function is
available in OCaml 4.00 or above.
share
: true
if data are shared. (default = false
)
Subvectors
val subcntvec_dyn : 'm Slap_size.t ->
?ofsx:int ->
('n, 'num, 'prec, Slap_misc.cnt) t ->
('m, 'num, 'prec, 'cnt) t
subcntvec_dyn m ?ofsx x
Raises Invalid_argument
m
and ofsx
do not designate a valid subvector of
x
.
Returns a subvector of the contiguous vector x
.
The i
-th element of it refers (ofsx+i-1)
-th element of x
.
The data are shared.
ofsx
: default = 1
val subdscvec_dyn : 'm Slap_size.t ->
?ofsx:int ->
?incx:int ->
('n, 'num, 'prec, 'cd) t ->
('m, 'num, 'prec, Slap_misc.dsc) t
subdscvec_dyn m ?ofsx ?incx x
Raises Invalid_argument
m
, ofsx
and incx
do not designate
a valid subvector of x
.
Returns a subvector of the vector x
.
The i
-th element of it refers (ofsx+(i-1)*incx)
-th element of x
.
The data are shared.
val subvec_dyn : 'm Slap_size.t ->
?ofsx:int ->
?incx:int ->
('n, 'num, 'prec, 'cd) t ->
('m, 'num, 'prec, Slap_misc.dsc) t
An alias of subdscvec_dyn
.
Internal functions
val check_cnt : ('n, 'num, 'prec, Slap_misc.cnt) t -> bool
val opt_work : ('n, 'num, 'prec, Slap_misc.cnt) t option ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t option
val opt_cnt_vec : 'n Slap_size.t ->
('n, 'num, 'prec, Slap_misc.cnt) t option ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t option
val opt_cnt_vec_alloc : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t ->
('n, 'num, 'prec, Slap_misc.cnt) t option ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t
val opt_vec : 'n Slap_size.t ->
('n, 'num, 'prec, 'cd) t option ->
int option * ('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t option
val opt_vec_alloc : ('num, 'prec) Bigarray.kind ->
'n Slap_size.t ->
('n, 'num, 'prec, 'cd) t option ->
int * ('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t
val __expose : ('n, 'num, 'prec, 'cnt_or_dsc) t ->
'n Slap_size.t * int *
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t
val __unexpose : 'n Slap_size.t ->
int ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t ->
('n, 'num, 'prec, 'cnt_or_dsc) t
val __unexpose_with_ofs : 'n Slap_size.t ->
int ->
int ->
('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t ->
('n, 'num, 'prec, 'cnt_or_dsc) t
val __alloc_work : loc:string ->
min_lwork:'a Slap_size.t ->
opt_lwork:'b Slap_size.t ->
('num, 'prec) Bigarray.kind ->
('k, 'num, 'prec, Slap_misc.cnt) t option ->
int * ('num, 'prec, Bigarray.fortran_layout) Bigarray.Array1.t