forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbelt_HashMapInt.mli
50 lines (31 loc) · 1.08 KB
/
belt_HashMapInt.mli
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
48
49
# 4 "others/hashmap.cppo.mli"
type key = int
# 10 "others/hashmap.cppo.mli"
type 'b t
val make: hintSize:int -> 'b t
val clear: 'b t -> unit
val isEmpty: _ t -> bool
val set: 'a t -> key -> 'a -> unit
(**
`setDone tbl k v` if `k` does not exist,
add the binding `k,v`, otherwise, update the old value with the new
`v`
*)
val copy: 'a t -> 'a t
val get: 'a t -> key -> 'a option
val has: 'b t -> key -> bool
val remove: 'a t -> key -> unit
val forEachU: 'b t -> (key -> 'b -> unit [@bs]) -> unit
val forEach: 'b t -> (key -> 'b -> unit) -> unit
val reduceU: 'b t -> 'c -> ('c -> key -> 'b -> 'c [@bs]) -> 'c
val reduce: 'b t -> 'c -> ('c -> key -> 'b -> 'c) -> 'c
val keepMapInPlaceU: 'a t -> (key -> 'a -> 'a option [@bs]) -> unit
val keepMapInPlace: 'a t -> (key -> 'a -> 'a option) -> unit
val size: _ t -> int
val toArray: 'a t -> (key * 'a) array
val keysToArray: 'a t -> key array
val valuesToArray: 'a t -> 'a array
val fromArray: (key * 'a) array -> 'a t
val mergeMany: 'a t -> (key * 'a) array -> unit
val getBucketHistogram: _ t -> int array
val logStats: _ t -> unit