caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Veber <philippe.veber@gmail.com>
To: Francois Berenger <berenger@riken.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Fwd: interval trees
Date: Sat, 11 Feb 2012 11:54:39 +0100	[thread overview]
Message-ID: <CAOOOohQKzt4P5C4EU0oTEjZDWDtNPHVVZrob6gAE6Uemy3dr5g@mail.gmail.com> (raw)
In-Reply-To: <4F346DB9.2070303@riken.jp>

[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]

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 <berenger@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-discuss@lists.forge.ocamlcore.org>
> CC: biocaml@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>
>
>

[-- Attachment #2: Type: text/html, Size: 2244 bytes --]

  parent reply	other threads:[~2012-02-11 10:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  1:07 Francois Berenger
2012-02-10 18:29 ` Richard W.M. Jones
2012-02-11 17:38   ` Goswin von Brederlow
2012-02-11 17:49     ` Eliot Handelman
2012-02-13  9:13       ` Sebastien Ferre
2012-02-15  1:28         ` Francois Berenger
2012-02-15 15:21           ` Goswin von Brederlow
2012-02-15 17:22             ` Edgar Friendly
2012-02-16  2:48               ` Francois Berenger
2012-02-16  2:32             ` Francois Berenger
2012-02-16  2:42               ` Francois Berenger
2012-02-16  8:34                 ` Goswin von Brederlow
2012-02-16 12:20                   ` John Carr
2012-02-16 10:21                 ` Gabriel Scherer
2012-02-17  0:59                   ` Francois Berenger
2012-02-17  8:11                     ` Christophe Raffalli
2012-02-11 20:49     ` Edgar Friendly
2012-02-11 23:54       ` Philippe Veber
2012-02-11 10:54 ` Philippe Veber [this message]
2012-02-11 17:33   ` Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOOOohQKzt4P5C4EU0oTEjZDWDtNPHVVZrob6gAE6Uemy3dr5g@mail.gmail.com \
    --to=philippe.veber@gmail.com \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).