1Ephemeron.Kn.MakeSeeded(3) OCaml library Ephemeron.Kn.MakeSeeded(3)
2
3
4
6 Ephemeron.Kn.MakeSeeded - Functor building an implementation of a weak
7 hash table.
8
10 Module Ephemeron.Kn.MakeSeeded
11
13 Module MakeSeeded
14 : functor (H : Hashtbl.SeededHashedType) -> sig end
15
16
17 Functor building an implementation of a weak hash table. The seed is
18 similar to the one of Hashtbl.MakeSeeded .
19
20
21 Parameters:
22
23 "H"
24
25 Stdlib.Hashtbl.SeededHashedType
26
27
28
29
30
31
32
33 type key
34
35
36
37
38 type 'a t
39
40
41
42
43
44 val create : ?random:bool -> int -> 'a t
45
46
47
48
49 val clear : 'a t -> unit
50
51
52
53
54 val reset : 'a t -> unit
55
56
57
58
59 val copy : 'a t -> 'a t
60
61
62
63
64 val add : 'a t -> key -> 'a -> unit
65
66
67
68
69 val remove : 'a t -> key -> unit
70
71
72
73
74 val find : 'a t -> key -> 'a
75
76
77
78
79 val find_opt : 'a t -> key -> 'a option
80
81
82
83
84 val find_all : 'a t -> key -> 'a list
85
86
87
88
89 val replace : 'a t -> key -> 'a -> unit
90
91
92
93
94 val mem : 'a t -> key -> bool
95
96
97
98
99 val iter : (key -> 'a -> unit) -> 'a t -> unit
100
101
102
103
104 val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
105
106
107
108
109 val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
110
111
112
113
114 val length : 'a t -> int
115
116
117
118
119 val stats : 'a t -> Hashtbl.statistics
120
121
122
123
124 val to_seq : 'a t -> (key * 'a) Seq.t
125
126
127
128
129 val to_seq_keys : 'a t -> key Seq.t
130
131
132
133
134 val to_seq_values : 'a t -> 'a Seq.t
135
136
137
138
139 val add_seq : 'a t -> (key * 'a) Seq.t -> unit
140
141
142
143
144 val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
145
146
147
148
149 val of_seq : (key * 'a) Seq.t -> 'a t
150
151
152
153
154 val clean : 'a t -> unit
155
156 remove all dead bindings. Done automatically during automatic resizing.
157
158
159
160 val stats_alive : 'a t -> Hashtbl.statistics
161
162 same as Hashtbl.SeededS.stats but only count the alive bindings
163
164
165
166
167
168OCamldoc 2022-07-22 Ephemeron.Kn.MakeSeeded(3)