[ccan] [PATCH 0/6] aga: Abstract Graph Algorithms

David Gibson david at gibson.dropbear.id.au
Wed May 27 21:21:22 AEST 2015


I've posted patches for this new module before, but it's been
substantially reworked throughout.

The Abstract Graph Algorithms module aims to implement several
standard graph algorithms on "abstract graphs" that is graphs that are
defined by user supplied callbacks, rather than by a specific concrete
representation.  Graph nodes can even be constructed on the fly as
they're discovered.  This is useful for the pretty common case where a
graph structure is implicit in other data you're working with.

For now only two very simple algorithms are implemented: depth first
and breadth first search.  I hope to add Dijkstra's algorithm and
Bellman-Ford at least, but I've run into some yak shaving
complications on the way.  With any luck I'll get there in the not too
distant future - with 2 or 3 helper ccan modules along the way.

David Gibson (6):
  aga: Abstract Graph Algorithms
  aga: Simple test graphs
  aga: Depth first search
  aga: Breadth first search
  aga: Testcase for attempt to run concurrent algorithms
  aga: Add lazytrie testcase

 ccan/aga/LICENSE                     |    1 +
 ccan/aga/_info                       |   41 ++
 ccan/aga/aga.c                       |   91 ++++
 ccan/aga/aga.h                       |  213 ++++++++
 ccan/aga/bfs.c                       |  102 ++++
 ccan/aga/dfs.c                       |   95 ++++
 ccan/aga/private.h                   |   10 +
 ccan/aga/test/api-adjacency.c        |   89 +++
 ccan/aga/test/api-bfs.c              |   85 +++
 ccan/aga/test/api-concurrent.c       |   52 ++
 ccan/aga/test/api-dfs.c              |   85 +++
 ccan/aga/test/api-lazytrie-words.txt | 1000 ++++++++++++++++++++++++++++++++++
 ccan/aga/test/api-lazytrie.c         |  211 +++++++
 ccan/aga/test/chain.c                |   29 +
 ccan/aga/test/error-graph.c          |   56 ++
 ccan/aga/test/full.c                 |   52 ++
 ccan/aga/test/grid.c                 |   84 +++
 ccan/aga/test/parallel.c             |   62 +++
 ccan/aga/test/simple-graph.c         |   15 +
 ccan/aga/test/simple-graph.h         |  180 ++++++
 ccan/aga/test/trivial.c              |   39 ++
 21 files changed, 2592 insertions(+)
 create mode 120000 ccan/aga/LICENSE
 create mode 100644 ccan/aga/_info
 create mode 100644 ccan/aga/aga.c
 create mode 100644 ccan/aga/aga.h
 create mode 100644 ccan/aga/bfs.c
 create mode 100644 ccan/aga/dfs.c
 create mode 100644 ccan/aga/private.h
 create mode 100644 ccan/aga/test/api-adjacency.c
 create mode 100644 ccan/aga/test/api-bfs.c
 create mode 100644 ccan/aga/test/api-concurrent.c
 create mode 100644 ccan/aga/test/api-dfs.c
 create mode 100644 ccan/aga/test/api-lazytrie-words.txt
 create mode 100644 ccan/aga/test/api-lazytrie.c
 create mode 100644 ccan/aga/test/chain.c
 create mode 100644 ccan/aga/test/error-graph.c
 create mode 100644 ccan/aga/test/full.c
 create mode 100644 ccan/aga/test/grid.c
 create mode 100644 ccan/aga/test/parallel.c
 create mode 100644 ccan/aga/test/simple-graph.c
 create mode 100644 ccan/aga/test/simple-graph.h
 create mode 100644 ccan/aga/test/trivial.c

-- 
2.1.0



More information about the ccan mailing list