1Hashtbl.MakeSeeded(3) OCaml library Hashtbl.MakeSeeded(3)
2
3
4
6 Hashtbl.MakeSeeded - Functor building an implementation of the
7 hashtable structure.
8
10 Module Hashtbl.MakeSeeded
11
13 Module MakeSeeded
14 : functor (H : SeededHashedType) -> sig end
15
16
17 Functor building an implementation of the hashtable structure. The
18 functor Hashtbl.MakeSeeded returns a structure containing a type key of
19 keys and a type 'a t of hash tables associating data of type 'a to keys
20 of type key . The operations perform similarly to those of the generic
21 interface, but use the seeded hashing and equality functions specified
22 in the functor argument H instead of generic equality and hashing. The
23 create operation of the result structure supports the ~random optional
24 parameter and returns randomized hash tables if ~random:true is passed
25 or if randomization is globally on (see Hashtbl.randomize ).
26
27
28 Since 4.00.0
29
30
31 Parameters:
32
33 "H"
34
35 Hashtbl.SeededHashedType
36
37
38
39
40
41
42
43 type key
44
45
46
47
48 type 'a t
49
50
51
52
53
54 val create : ?random:bool -> int -> 'a t
55
56
57
58
59 val clear : 'a t -> unit
60
61
62
63
64 val reset : 'a t -> unit
65
66
67
68
69 val copy : 'a t -> 'a t
70
71
72
73
74 val add : 'a t -> key -> 'a -> unit
75
76
77
78
79 val remove : 'a t -> key -> unit
80
81
82
83
84 val find : 'a t -> key -> 'a
85
86
87
88
89 val find_opt : 'a t -> key -> 'a option
90
91 Since 4.05.0
92
93
94
95 val find_all : 'a t -> key -> 'a list
96
97
98
99
100 val replace : 'a t -> key -> 'a -> unit
101
102
103
104
105 val mem : 'a t -> key -> bool
106
107
108
109
110 val iter : (key -> 'a -> unit) -> 'a t -> unit
111
112
113
114
115 val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
116
117 Since 4.03.0
118
119
120
121 val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
122
123
124
125
126 val length : 'a t -> int
127
128
129
130
131 val stats : 'a t -> Hashtbl.statistics
132
133
134
135
136 val to_seq : 'a t -> (key * 'a) Seq.t
137
138 Since 4.07
139
140
141
142 val to_seq_keys : 'a t -> key Seq.t
143
144 Since 4.07
145
146
147
148 val to_seq_values : 'a t -> 'a Seq.t
149
150 Since 4.07
151
152
153
154 val add_seq : 'a t -> (key * 'a) Seq.t -> unit
155
156 Since 4.07
157
158
159
160 val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
161
162 Since 4.07
163
164
165
166 val of_seq : (key * 'a) Seq.t -> 'a t
167
168 Since 4.07
169
170
171
172
173
174OCamldoc 2023-07-20 Hashtbl.MakeSeeded(3)