Hi François, The Biocaml_intervalTree module is merely a specialization of Set in the standard library. It should be fairly easy to functorize it over a type with a total order relation. I think you might even sed -e 's/int/float/g' the current implementation (with a couple of additional and minor modifications).
ph. 2012/2/10 Francois Berenger <beren...@riken.jp> > -------- Original Message -------- > Subject: interval trees > Date: Thu, 09 Feb 2012 17:30:21 +0900 > From: Francois Berenger > To: > batteries-discuss@lists.forge.**ocamlcore.org<batteries-disc...@lists.forge.ocamlcore.org> > CC: bioc...@googlegroups.com > > Hello, > > I need to use an interval tree. > > Biocaml has one, batteries have imap/iset, nice! > > However, I have intervals of reals, not integers. :( > > I want to build the tree (once), then query it with a real number > (many times) like in: which intervals contain the query real number? > > Should I convert my floats to ints (by sorting them then ranking) before > inserting them into some existing interval tree for integers? > I am not so concerned about the pre-processing time. > > Should I write from scratch? > > Thanks for any suggestion, > F. > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/**wws/info/caml-list<https://sympa-roc.inria.fr/wws/info/caml-list> > Beginner's list: > http://groups.yahoo.com/group/**ocaml_beginners<http://groups.yahoo.com/group/ocaml_beginners> > Bug reports: > http://caml.inria.fr/bin/caml-**bugs<http://caml.inria.fr/bin/caml-bugs> > > -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs