caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eray Ozkural <examachine@gmail.com>
To: Julien Signoles <julien.signoles@gmail.com>
Cc: Michael Ekstrand <michael@elehack.net>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] performance of ocamlgraph and ocaml batteries
Date: Tue, 14 Dec 2010 13:02:44 +0200	[thread overview]
Message-ID: <AANLkTimjeVUewi3s++uofKNEq7852mhfi9bW5+8XaD7q@mail.gmail.com> (raw)
In-Reply-To: <AANLkTingAacccxQtWTtjS=KRLNxXZhFTEFEXi5FDAVTu@mail.gmail.com>

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

On Mon, Dec 13, 2010 at 5:51 PM, Julien Signoles
<julien.signoles@gmail.com>wrote:

> Hello,
>
> 2010/12/13 Eray Ozkural <examachine@gmail.com>
>
> Oww, is the imperative implementation using hash tables or maps then?
>>
>
> Imperative implementations use hash tables (except the ones called Matrix
> which use arrays of bitvectors) while persistent implementations use maps.
>

Yes, I noticed, the incidence matrix is pretty good for dense unlabeled
graphs, that's probably better than the one boost provides.


>
>
>> Shouldn't be too hard to plug your own in ocamlgraph if needed.
>>
>
> OcamlGraph is designed for such an use : each algorithm provided by the
> library is a functor parameterized by the required graph operations
> (iterators over vertices and edges, ...). Thus you can provide your own in
> an easy way.
>
> Hope this helps,
>

Sure it does. I've used ocamlgraph in a number of projects and I'm very glad
with the functor interface. It feels right! One of the big reasons I'm using
ocaml is the higher-order module feature, it's great for writing truly
extensible and re-usable software.

Regarding the above discussion, hash table is actually appropriate for a
very large number of use-cases and I've seen it recommended it in a software
engineering journal. That's true especially if you need to query individual
edges, although many classical graph algorithms work best with an adjacency
list representation, which can be easily implemented as you suggest.

Best,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct

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

      reply	other threads:[~2010-12-14 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13  5:09 Kihong Heo
2010-12-13 14:47 ` [Caml-list] " Michael Ekstrand
2010-12-13 15:02   ` Eray Ozkural
2010-12-13 15:51     ` Julien Signoles
2010-12-14 11:02       ` Eray Ozkural [this message]

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=AANLkTimjeVUewi3s++uofKNEq7852mhfi9bW5+8XaD7q@mail.gmail.com \
    --to=examachine@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=julien.signoles@gmail.com \
    --cc=michael@elehack.net \
    /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).