Browse thread
[Caml-list] Efficient and canonical set representation?
- Harrison, John R
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Harrison, John R <johnh@i...> |
| Subject: | [Caml-list] Efficient and canonical set representation? |
Does anyone know a representation of finite sets over an orderable polymorphic type that's (1) efficient and (2) canonical? Even better would be a CAML or OCaml implementation. More precisely I'm looking for: 1. Log-time lookup and insertion, and linear-time union, intersection etc. 2. Equal sets are represented by the same object. For example, ordered lists satisfy (2) but only part of (1), while all the variants of balanced trees I can remember that satisfy (1) --- AVL trees etc. --- fail (2). Thanks, John. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners