From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q1F1SleD014968 for ; Wed, 15 Feb 2012 02:28:48 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYBAIcJO0+GoCGhmWdsb2JhbABDgw2taQEBAQEBCAsLBxQngXIBAQUyAQVAARALGAkWDwkDAgECAUUTAQcBAYgBuR+LZgUVIQoDBgUHBgMDBQkPBgMCg3UIJQkIAggDF4MdBIhIjGqFWo0Z X-IronPort-AV: E=Sophos;i="4.73,420,1325458800"; d="scan'208";a="131375630" Received: from postman1.riken.jp (HELO postman.riken.jp) ([134.160.33.161]) by mail4-smtp-sop.national.inria.fr with ESMTP; 15 Feb 2012 02:28:41 +0100 Received: from postman.riken.jp (postman1.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 3C98D2588001; Wed, 15 Feb 2012 10:28:38 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 2417232A008B; Wed, 15 Feb 2012 10:28:38 +0900 (JST) Message-ID: <4F3B0A46.3070105@riken.jp> Date: Wed, 15 Feb 2012 10:28:38 +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 CC: biocaml@googlegroups.com References: <4F346DB9.2070303@riken.jp> <20120210182914.GA17498@annexia.org> <87wr7tb77z.fsf@frosties.localnet> <4F36AA45.1070502@colba.net> <4F38D455.1040204@irisa.fr> In-Reply-To: <4F38D455.1040204@irisa.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Version: 5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.2.14.235116 Subject: Re: [Caml-list] Fwd: interval trees Hello, I did a naive implementation of interval trees for float intervals. It is available here: https://github.com/HappyCrow/interval-tree I wonder if it is possible to construct the trees in a tail recursive fashion. Maybe I knew how to do this when I was still at university. Regards, Francois. On 02/13/2012 06:13 PM, Sebastien Ferre wrote: > > > On 02/11/2012 06:49 PM, Eliot Handelman wrote: >> On 11/02/2012 12:38 PM, Goswin von Brederlow wrote: >>> >>> Anyone have something like this but for non-overlapping intervals and >>> allowing interval insertion and removal with merging and spliting of the >>> internaly used intervals? >> >> Cis from Sébastien Ferré? >> >> http://www.irisa.fr/LIS/ferre/software.en.html > > The Cis library (Cis for Compact Integer Sets) is > designed for representing sets of integers, but it > could easily be adapted to the insertion and > removal of intervals since it already handles > the merging and spliting og intervals. > > Sébastien