Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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