caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Diego Olivier Fernandez Pons <Diego.FERNANDEZ_PONS@etu.upmc.fr>
To: Yamagata Yoriyuki <yoriyuki@mbg.sphere.ne.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Set/Map with intervals and/or order-related operations
Date: Mon, 26 May 2003 09:11:08 +0200 (DST)	[thread overview]
Message-ID: <Pine.A41.4.44.0305260855010.1015910-100000@ibm1.cicrp.jussieu.fr> (raw)
In-Reply-To: <20030525.192604.07647392.yoriyuki@mbg.sphere.ne.jp>

    Bonjour,

> I'm looking for the Set/Map like data-structures which can efficiently
> add and remove large intervals over integers, and support
> intersections, unions and compliments.  Does anybody make such
> libraries?  Baire contains interval.ml[i] but misses these
> functionalities.  Is it easy to add them to Baire, or are Baire's
> intervals something different than I thought?

Baire's interval Set/Map data structure is based on Martin Erwig's
paper 'Diets for fat sets, Journal of Functional programming Vol 8,
N°6, 627-632, 1998'. It seems to be the data structure you are looking
for (that is an extension to usual sets and maps with a better support
for interval query, insertion, removal, ...)

Erwig's paper is available from his home page, there is also a version
by Olivier Andrieu.

There are interval data structures used in computational geometry
(interval tree, ...) but I don't think this is what you are refering
to, is it ?

Martin Erwig's paper presents the data structure and says that one
could easily add
- a balancing scheme
- the set operations (union, intersection, ...)

I did the first one longtime ago (should clean the data structure and
remove some bugs) but didn't have the courage to face the 23 cases of
interval respective positions needed to implement the 'difference'
operation over sets.  I also tried some generic implementation
(extending the 'partition' operation) but never ended that work.

> Failing that, is there Set/Map with order-related operations?
> Actually I have one but if there is one actively developed, I would
> like to use it.

I dont understand exactly what do you mean by 'order-related
operations'. Anyway, if you have some code, it would be interesting to
release it.

> By the way, I have a library for arbitrary orders on (finite sets of)
> integers.  I think comparison of two integer is O(log n ^ 2)
> time. (n for the size of the finite set.)  Do you think it is worth to
> make public?

Yes. It could be included to one of the 'data structure projects'
being developed in Caml.


        Diego Olivier

-------------------
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


  parent reply	other threads:[~2003-05-26  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-25 10:26 Yamagata Yoriyuki
2003-05-25 10:48 ` Eray Ozkural
2003-05-26  7:59   ` Diego Olivier Fernandez Pons
2003-05-26  7:11 ` Diego Olivier Fernandez Pons [this message]
2003-05-29 13:40 ` Yamagata Yoriyuki
2003-05-30 12:00   ` Re : " Diego Olivier Fernandez Pons

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=Pine.A41.4.44.0305260855010.1015910-100000@ibm1.cicrp.jussieu.fr \
    --to=diego.fernandez_pons@etu.upmc.fr \
    --cc=caml-list@inria.fr \
    --cc=yoriyuki@mbg.sphere.ne.jp \
    /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).