From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q1A17FoV005532 for ; Fri, 10 Feb 2012 02:07:15 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkECAFlsNE+GoCGihWdsb2JhbABDgw2scgEBAQoLCwUWJ4FyAQEBBQI1QA0gAwECChYYAwIBAgEWJQIbBgIBAaBOoDOLewEFBAMEBAcOBgEDBwEBIAMDAYNeAX+DHQSIRopBgiiFWo0X X-IronPort-AV: E=Sophos;i="4.73,393,1325458800"; d="scan'208";a="143641475" Received: from postman2.riken.jp (HELO postman.riken.jp) ([134.160.33.162]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Feb 2012 02:07:09 +0100 Received: from postman.riken.jp (postman2.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id B9E7E12602E8 for ; Fri, 10 Feb 2012 10:07:05 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 6187A127007D for ; Fri, 10 Feb 2012 10:07:05 +0900 (JST) Message-ID: <4F346DB9.2070303@riken.jp> Date: Fri, 10 Feb 2012 10:07:05 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.26) Gecko/20120131 Thunderbird/3.1.18 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.2.7.55714 X-Validation-by: berenger@riken.jp Subject: [Caml-list] Fwd: interval trees -------- Original Message -------- Subject: interval trees Date: Thu, 09 Feb 2012 17:30:21 +0900 From: Francois Berenger To: 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.