caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Mattias Waldau" <mattias.waldau@tacton.com>
To: <caml-list@inria.fr>
Subject: [Caml-list] Looking for Graph Operations-library
Date: Wed, 26 Sep 2001 18:44:45 +0200	[thread overview]
Message-ID: <AAEBJHFJOIPMMIILCEPBMEKIDCAA.mattias.waldau@tacton.com> (raw)
In-Reply-To: <93.10ca38c3.28e32ce0@aol.com>

I am converting some code from SICStus Prolog, and need a directed graph
library for Ocaml. Any pointers?

I found Markus Mottl's POMAP, and I can probably redesign in order to use
that instead.

/mattias



>From the SICStus manual:

Unweighted Graph Operations

Directed and undirected graphs are fundamental data structures representing
arbitrary relationships between data objects. This package provides a Prolog
implementation of directed graphs, undirected graphs being a special case of
directed graphs.

An unweighted directed graph (ugraph) is represented as a list of
(vertex-neighbors) pairs, where the pairs are in standard order (as produced
by keysort with unique keys) and the neighbors of each vertex are also in
standard order (as produced by sort), every neighbor appears as a vertex
even if it has no neighbors itself, and no vertex is a neighbor to itself.

An undirected graph is represented as a directed graph where for each edge
(U,V) there is a symmetric edge (V,U).


Some operations:
================

transitive_closure(+Graph, -Closure)
Computes Closure as the transitive closure of Graph in O(N^3) time.

symmetric_closure(+Graph, -Closure)
Computes Closure as the symmetric closure of Graph, i.e. for each edge (u,v)
in Graph, add its symmetric edge (v,u). Takes O(N^2) time. This is useful
for making a directed graph undirected.

top_sort(+Graph, -Sorted)
Finds a topological ordering of a Graph and returns the ordering as a list
of Sorted vertices. Fails iff no ordering exists, i.e. iff the graph
contains cycles. Takes O(N^2) time.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-09-26 20:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-26 13:06 [Caml-list] Initial port of ocaml for mingw (long) CaptnJamesKirk
2001-09-26 16:44 ` Mattias Waldau [this message]
2001-09-26 16:47 ` [Caml-list] Looking for Graph Operations-library Mattias Waldau
2001-09-26 17:08   ` Markus Mottl
2001-09-26 17:13   ` Brian Rogoff
2001-09-26 18:04     ` Mattias Waldau
2001-09-26 18:29       ` Brian Rogoff
2001-09-26 19:23       ` Markus Mottl
2001-09-27  6:16   ` Jean-Christophe Filliatre
2001-10-01 10:00   ` Francois Pottier
2001-09-26 21:50 Chris Tilt

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=AAEBJHFJOIPMMIILCEPBMEKIDCAA.mattias.waldau@tacton.com \
    --to=mattias.waldau@tacton.com \
    --cc=caml-list@inria.fr \
    /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).