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 length : 'a t -> int
100
101
102
103
104 val stats : 'a t -> Hashtbl.statistics
105
106
107
108
109 val add_seq : 'a t -> (key * 'a) Seq.t -> unit
110
111
112
113
114 val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
115
116
117
118
119 val of_seq : (key * 'a) Seq.t -> 'a t
120
121
122
123
124 val clean : 'a t -> unit
125
126 remove all dead bindings. Done automatically during automatic resizing.
127
128
129
130 val stats_alive : 'a t -> Hashtbl.statistics
131
132 same as Hashtbl.SeededS.stats but only count the alive bindings
133
134
135
136
137
138OCamldoc 2023-07-20 Ephemeron.Kn.MakeSeeded(3)