English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Canonical Set/Map datastructure?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-03-07 (10:19)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Canonical Set/Map datastructure?
Berke Durak wrote:
> However, the idea of combining hash-consing and Patricia trees, however
> elegant, does not suit my problem.  Basically, you are cheating by using
> an auxiliary data structure, the hashtable (which is also O(n^2) 
> worst-case).

You can also implement hash-consing with the Map module (or a 
polymorphic version of it) to avoid the worst case complexity. But yes, 
you need an extra data structure.

-- Alain