From: Vincent Aravantinos <vincent.aravantinos@yahoo.fr>
To: "Orlin Grigorov" <ogrigorov@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Data structure for a directed bipartite graph
Date: Wed, 10 Oct 2007 20:34:25 +0200 [thread overview]
Message-ID: <4EC8DB3A-AE8B-4141-A87A-1BA4289A6313@yahoo.fr> (raw)
In-Reply-To: <b17e12b30710100952t7669e0e9pcdf73d9b4b4bbee6@mail.gmail.com>
Le 10 oct. 07 à 18:52, Orlin Grigorov a écrit :
> A bipartite graph is a graph, which has two kinds of nodes, and
> every node is connected only to nodes from the other kind. In
> other words, if the two types of nodes are A and B, then there can
> be an edge between nodes of type A to nodes of type B (resp. edge
> from B to A), but never an edge between A and A, or B and B.
>
> So, I was thinking about a data structure in OCaml, in which I want
> to store such graph, and also to allow me easy access to elements,
> as well as adding new nodes and edges (therefore, the structure
> would be imperative, that is, will have a state).
>
> So, how about this:
>
> 1) an array, which holds all the nodes and the information about
> them (e.g. type of the node, other info contained in it)
>
> 2) a two dimensional array, indicating existence of an edge between
> each two nodes.
>
> Maybe it's worth mentioning that the number of nodes for my
> particular purposes will never be more than 200, so I don't think
> the matrix will take up too much memory?!
>
> Thank you in advance. I am in the process of producing my
> Master's thesis in Canada, and I am just starting to make an
> implementation in OCaml, which, even though newly discovered
> language by me, for a very short time became my favorite!
Do you know this:
http://www.lri.fr/~filliatr/ocamlgraph/
?
V.
next prev parent reply other threads:[~2007-10-10 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 16:52 Orlin Grigorov
2007-10-10 18:34 ` Vincent Aravantinos [this message]
2007-10-10 19:36 ` [Caml-list] " Jean-Christophe Filliatre
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=4EC8DB3A-AE8B-4141-A87A-1BA4289A6313@yahoo.fr \
--to=vincent.aravantinos@yahoo.fr \
--cc=caml-list@yquem.inria.fr \
--cc=ogrigorov@gmail.com \
/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