1
- type ('a, 'id) t0
2
1
3
- type ('a, 'id) t =
4
- (('a , 'id ) Bs_Hash .t ,
5
- ('a , 'id ) t0 ) Bs_Bag .bag
2
+
3
+ type ('a, 'id) t
6
4
7
5
(* * The type of hash tables from type ['a] to type ['b]. *)
8
6
9
- val create0 : int -> ('a , 'id ) t0
10
- val create : ('a ,'id) Bs_Hash .t -> int -> ('a , 'id ) t
11
7
8
+ val create : ('a ,'id) Bs_Hash .t -> int -> ('a , 'id ) t
9
+ val clear : ('a , 'id ) t -> unit
10
+
11
+ val add : ('a , 'id ) t -> 'a -> unit
12
+ val has : ('a , 'id ) t -> 'a -> bool
13
+ val remove : ('a , 'id ) t -> 'a -> unit
14
+
15
+ val forEach : ('a , 'id ) t -> ('a -> unit [@ bs]) -> unit
16
+ (* * Order unspecified. *)
17
+
18
+
19
+ val reduce : ('a , 'id ) t -> 'c -> ('c -> 'a -> 'c [@ bs]) -> 'c
20
+ (* * Order unspecified. *)
21
+
22
+ val size : ('a , 'id ) t -> int
12
23
13
- val clear0 : ('a , 'id ) t0 -> unit
14
- val clear : ('a , 'id ) t -> unit
15
- (* * Empty a hash table. Use [reset] instead of [clear] to shrink the
16
- size of the bucket table to its initial size. *)
17
24
18
- val reset0 : ('a , 'id ) t0 -> unit
19
- val reset : ('a , 'id ) t -> unit
20
- (* * Empty a hash table and shrink the size of the bucket table
21
- to its initial size.
22
- @since 4.00.0 *)
23
25
26
+ val logStats : _ t -> unit
27
+
28
+
29
+ val toArray : ('a ,'id) t -> 'a array
30
+
31
+ val ofArray :
32
+ 'a array ->
33
+ dict :('a ,'id ) Bs_Hash .t ->
34
+ ('a ,'id) t
35
+
36
+
37
+ val mergeArrayDone : ('a ,'id) t -> 'a array -> unit
38
+ val mergeArray : ('a ,'id) t -> 'a array -> ('a , 'id )t
39
+
40
+ (* ***************************************************************************)
41
+ type ('a, 'id) t0
24
42
43
+ val getData : ('k , 'id ) t -> ('k , 'id ) t0
44
+ val getDict : ('k , 'id ) t -> ('k , 'id ) Bs_Hash .t
45
+ val packDictData : dict :('k , 'id ) Bs_Hash .t -> data :('k , 'id ) t0 -> ('k , 'id ) t
25
46
47
+ val clear0 : ('a , 'id ) t0 -> unit
48
+ val create0 : int -> ('a , 'id ) t0
49
+ val reset0 : ('a , 'id ) t0 -> unit
26
50
val add0 :
27
51
hash :('a ,'id ) Bs_Hash .hash ->
28
52
eq :('a ,'id ) Bs_Hash .eq ->
29
53
('a ,'id) t0 -> 'a -> unit
30
- val add : ('a , 'id ) t -> 'a -> unit
31
-
32
54
val mem0 :
33
55
hash :('a ,'id ) Bs_Hash .hash ->
34
56
eq :('a ,'id ) Bs_Hash .eq ->
35
57
('a , 'id ) t0 -> 'a -> bool
36
- val mem :
37
- ('a , 'id ) t -> 'a -> bool
38
-
39
-
40
58
val remove0 :
41
59
hash :('a ,'id ) Bs_Hash .hash ->
42
60
eq :('a ,'id ) Bs_Hash .eq ->
43
61
('a , 'id ) t0 -> 'a -> unit
44
- val remove :
45
- ('a , 'id ) t -> 'a -> unit
46
-
47
-
48
-
49
62
val iter0 : ('a , 'id ) t0 -> ('a -> unit [@ bs]) -> unit
50
- val iter : ('a , 'id ) t -> ('a -> unit [@ bs]) -> unit
51
- (* *
52
- If the hash table was created in non-randomized mode, the order
53
- in which the bindings are enumerated is reproducible between
54
- successive runs of the program, and even between minor versions
55
- of OCaml. For randomized hash tables, the order of enumeration
56
- is entirely random. *)
57
-
58
- val fold0 : ('a , 'id ) t0 -> 'c -> ('a -> 'c -> 'c [@ bs]) -> 'c
59
- val fold : ('a , 'id ) t -> 'c -> ('a -> 'c -> 'c [@ bs]) -> 'c
60
- (* *
61
- If the hash table was created in non-randomized mode, the order
62
- in which the bindings are enumerated is reproducible between
63
- successive runs of the program, and even between minor versions
64
- of OCaml. For randomized hash tables, the order of enumeration
65
- is entirely random. *)
66
-
67
-
63
+ val fold0 : ('a , 'id ) t0 -> 'c -> ('c -> 'a -> 'c [@ bs]) -> 'c
68
64
val length0 : ('a , 'id ) t0 -> int
69
- val length : ('a , 'id ) t -> int
70
-
71
65
val logStats0 : ('a , 'id ) t0 -> unit
72
- val logStats : _ t -> unit
73
- (* * [Hashtbl.stats tbl] returns statistics about the table [tbl]:
74
- number of buckets, size of the biggest bucket, distribution of
75
- buckets by size.
76
- @since 4.00.0 *)
77
-
78
66
val toArray0 : ('a ,'id) t0 -> 'a array
79
- val toArray : ('a ,'id) t -> 'a array
80
-
81
67
val ofArray0 :
82
68
hash :('a ,'id ) Bs_Hash .hash ->
83
69
eq :('a ,'id ) Bs_Hash .eq ->
84
70
'a array ->
85
71
('a , 'id ) t0
86
72
87
- val ofArray :
88
- dict :('a ,'id ) Bs_Hash .t ->
89
- 'a array ->
90
- ('a ,'id) t
91
-
92
73
val addArray0 :
93
74
hash :('a ,'id ) Bs_Hash .hash ->
94
75
eq :('a ,'id ) Bs_Hash .eq ->
95
76
('a ,'id) t0 -> 'a array -> unit
96
-
97
- val addArray :
98
- ('a ,'id) t -> 'a array -> unit
0 commit comments