1MoreLabels.Hashtbl(3) OCaml library MoreLabels.Hashtbl(3)
2
3
4
6 MoreLabels.Hashtbl - no description
7
9 Module MoreLabels.Hashtbl
10
12 Module Hashtbl
13 : sig end
14
15
16
17
18
19
20
21 type ('a, 'b) t = ('a, 'b) Hashtbl.t
22
23
24
25
26
27 val create : ?random:bool -> int -> ('a, 'b) t
28
29
30
31
32 val clear : ('a, 'b) t -> unit
33
34
35
36
37 val reset : ('a, 'b) t -> unit
38
39
40
41
42 val copy : ('a, 'b) t -> ('a, 'b) t
43
44
45
46
47 val add : ('a, 'b) t -> key:'a -> data:'b -> unit
48
49
50
51
52 val find : ('a, 'b) t -> 'a -> 'b
53
54
55
56
57 val find_opt : ('a, 'b) t -> 'a -> 'b option
58
59
60
61
62 val find_all : ('a, 'b) t -> 'a -> 'b list
63
64
65
66
67 val mem : ('a, 'b) t -> 'a -> bool
68
69
70
71
72 val remove : ('a, 'b) t -> 'a -> unit
73
74
75
76
77 val replace : ('a, 'b) t -> key:'a -> data:'b -> unit
78
79
80
81
82 val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit
83
84
85
86
87 val filter_map_inplace : f:(key:'a -> data:'b -> 'b option) -> ('a, 'b)
88 t -> unit
89
90
91
92
93 val fold : f:(key:'a -> data:'b -> 'c -> 'c) -> ('a, 'b) t -> init:'c
94 -> 'c
95
96
97
98
99 val length : ('a, 'b) t -> int
100
101
102
103
104 val randomize : unit -> unit
105
106
107
108
109 val is_randomized : unit -> bool
110
111
112
113 type statistics = Hashtbl.statistics
114
115
116
117
118
119 val stats : ('a, 'b) t -> statistics
120
121
122
123
124 val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t
125
126
127
128
129 val to_seq_keys : ('a, 'b) t -> 'a Seq.t
130
131
132
133
134 val to_seq_values : ('a, 'b) t -> 'b Seq.t
135
136
137
138
139 val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
140
141
142
143
144 val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
145
146
147
148
149 val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t
150
151
152
153 module type HashedType = Hashtbl.HashedType
154
155
156
157
158 module type SeededHashedType = Hashtbl.SeededHashedType
159
160
161
162
163 module type S = sig end
164
165
166
167
168 module type SeededS = sig end
169
170
171
172
173 module Make : functor (H : HashedType) -> sig end
174
175
176
177
178 module MakeSeeded : functor (H : SeededHashedType) -> sig end
179
180
181
182
183
184 val hash : 'a -> int
185
186
187
188
189 val seeded_hash : int -> 'a -> int
190
191
192
193
194 val hash_param : int -> int -> 'a -> int
195
196
197
198
199 val seeded_hash_param : int -> int -> int -> 'a -> int
200
201
202
203
204
205
206OCamldoc 2020-09-01 MoreLabels.Hashtbl(3)