Provided by: ocaml-nox_4.02.3-5ubuntu2_amd64

**NAME**

Weak.Make - Functor building an implementation of the weak hash table structure.

**Module**

Module Weak.Make

**Documentation**

ModuleMake:functor(H:Hashtbl.HashedType)->sigendFunctor building an implementation of the weak hash table structure.Parameters:"H"Hashtbl.HashedTypetypedataThe type of the elements stored in the table.typetThe type of tables that contain elements of typedata. Note that weak hash tables cannot be marshaled usingPervasives.output_valueor the functions of theMarshalmodule.valcreate:int->tcreatencreates a new empty weak hash table, of initial sizen. The table will grow as needed.valclear:t->unitRemove all elements from the table.valmerge:t->data->datamergetxreturns an instance ofxfound intif any, or else addsxtotand returnx.valadd:t->data->unitaddtxaddsxtot. If there is already an instance ofxint, it is unspecified which one will be returned by subsequent calls tofindandmerge.valremove:t->data->unitremovetxremoves fromtone instance ofx. Does nothing if there is no instance ofxint.valfind:t->data->datafindtxreturns an instance ofxfound int. RaiseNot_foundif there is no such element.valfind_all:t->data->datalistfind_alltxreturns a list of all the instances ofxfound int.valmem:t->data->boolmemtxreturnstrueif there is at least one instance ofxint, false otherwise.valiter:(data->unit)->t->unititerftcallsfon each element oft, in some unspecified order. It is not specified what happens ifftries to changetitself.valfold:(data->'a->'a)->t->'a->'afoldftinitcomputes(fd1(...(fdNinit)))whered1...dNare the elements oftin some unspecified order. It is not specified what happens ifftries to changetitself.valcount:t->intCount the number of elements in the table.counttgives the same result asfold(fun_n->n+1)t0but does not delay the deallocation of the dead elements.valstats:t->int*int*int*int*int*intReturn statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.