[ccan] [PATCH 4/4] agar: Re-entrant Abstract Graph Algorithms

David Gibson david at gibson.dropbear.id.au
Fri Jul 11 23:31:22 EST 2014


On Fri, Jul 11, 2014 at 12:18:04PM +0200, Gianluca Della Vedova wrote:
> I have two newbie questions:
> 1. what are the pros of the aga(r) module vs igraph (http://igraph.org/c/)?

So, there are an awful lot of common problems which can be regarded as
instances of a BFS, DFS or Dijkstra's, if you think in terms of the
right graph.  But, usually that graph is never explicitly constructed
in your program - it's an implicit set of possible states and
transitions which can be derived from the data model you do have.

Although it's certainly possible to explicitly construct a graph data
structure from whatever you have internally, using igraph or even the
existing CCAN dgraph module, it's often clumsy and inconvenient to do
so.

The idea of the aga(r) modules is that you need minimal graph related
data structures beyond what you already have in  your code.  The graph
structure is derived on the fly via your callbacks and used to drive
the graph algorithms.

In short, aga is suppoed to make it easy to use simple graph
algorithms on real world problems (I don't, rather than to be a tool
to explore graph theory itself.

Disclaimer: I've looked at the igraph website once or twice, but
that's the extent of my knowledge.

> 2. More generally, what is the scope of ccan? In the website it seems that
> ccan is modeled after CPAN, but the latter is mainly central hosting site,
> while ccan seems to organize coherently the development of the
> modules.

That sounds like a question for Rusty, if he can tear himself away
from re-inventing the future of currency.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20140711/d5475258/attachment.sig>


More information about the ccan mailing list