-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathvector.ml
More file actions
47 lines (28 loc) · 1011 Bytes
/
vector.ml
File metadata and controls
47 lines (28 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(** High-level abstraction of a vector. *)
module type Vector =
sig
type num
type t [@@deriving eq, ord, hash]
val pretty: unit -> t -> GoblintCil.Pretty.doc
val copy: t -> t
val of_list: num list -> t
val of_array: num array -> t
val of_sparse_list: int -> (int * num) list -> t
val to_list: t -> num list
val to_array: t -> num array
val to_sparse_list: t -> (int * num) list
val length: t -> int
val compare_length_with: t -> int -> int
val zero_vec: int -> t
val is_const_vec: t -> bool
val nth: t -> int -> num
val set_nth: t -> int -> num -> t
val remove_nth: t -> int -> t
val keep_vals: t -> int -> t
val map2i: (int -> num -> num -> num) -> t -> t -> t
val rev: t -> t
end
(*let timing_wrap = Timing.wrap*)
(* Disable timing of the vector and matrix implementations and AffineEqualityDomain as well as SharedFunctions.
This is cleaner than a timing functor because the timed functions also call each other. *)
let timing_wrap _ f x = f x