A graph library for Scheme modelled after the successful Boost
Graph Library for C++
1 Copyrights. |
|
|
rgraph-doc-copyright-rgraph |
Form | rgraph-doc-copyright-rgraph |
Description | Rooster Graph.
Copyright (c) 2004, Jonah Nathaniel Beckford
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
Neither the name of the author nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
jonah@usermail.com
|
|
rgraph-doc-copyright-boost |
Form | rgraph-doc-copyright-boost |
Description | Boost Software License - Version 1.0 - August 17th, 2003.
Permission is hereby granted, free of charge, to any person or
organization obtaining a copy of the software and accompanying
documentation covered by this license (the "Software") to use,
reproduce, display, distribute, execute, and transmit the
Software, and to prepare derivative works of the Software, and to
permit third-parties to whom the Software is furnished to do so,
all subject to the following:
The copyright notices in the Software and this entire statement,
including the above license grant, this restriction and the
following disclaimer, must be included in all copies of the
Software, in whole or in part, and all derivative works of the
Software, unless such copies or derivative works are solely in the
form of machine-executable object code generated by a source
language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2000-2001
Jeremy Siek, Indiana University (jsiek@osl.iu.edu)
Lie-Quan Lee, Indiana University (llee@cs.indiana.edu)
Andrew Lumsdaine, Indiana University (lums@osl.iu.edu)
|
|
2 Usage Notes
|
|
|
rgraph-doc-usage-imports |
Form | rgraph-doc-usage-imports |
Description | Imports.
The following imports must be imported by the user *BEFORE*
importing rgraph.
NECESSARY
=========
---------- All Scheme Implementations ----------
Srfi-0 : cond-expand
---------- CHICKEN ----------
Specified in the rgraph.setup
Extras : hash-table
OPTIONAL
========
Srfi-40 : streams. needed when you use the star-suffix versions of
the methods; for example, when using the stream-valued
(Graph-Name-out-edges* ...) instead of the list-valued
(Graph-Name-out-edges ...)
|
|
rgraph-doc-usage-debugging |
Form | rgraph-doc-usage-debugging |
Description | Debugging.
Debugging includes, at minimum, some type-checking of
function arguments.
The feature (Srfi-0) 'rgraph-nodebug takes precedent over 'rgraph-debug.
Chicken - If you are running in CSI, then 'rgraph-debug is implicitly
turned on. You may override by explicitly setting the feature
'rgraph-nodebug.
|
|
3 Adjacency List
|
|
|
Adjacency List |
Form | (define-adjacency-list ...) |
Description | The adjacency_list class implements a generalized adjacency list
graph structure. The template parameters provide many configuration
options so that you can pick a version of the class that best meets
your needs. An adjacency-list is basically a two-dimensional
structure, where each element of the first dimension represents a
vertex, and each of the vertices contains a one-dimensional
structure that is its edge list. [description copied from boost]
|
See also | al | Rooster Graph Adjacency List |
boost | Boost Graph Library |
|
Vector Vertex List |
Form | vl-vector |
Description | Scheme macro specialization to Adjacency List that stores the
vertices in a logarithmetically growing (as you added vertices)
vector.
|
See also | vl-vector | Rooster Graph VL-VECTOR |
boost | Boost Graph Library |
|
Hash Vertex List |
Form | vl-hash |
Description | Scheme macro specialization to Adjacency List that stores the
vertices in a hashtable.
|
See also | vl-hash | Rooster Graph VL-HASH |
boost | Boost Graph Library |
|
Singly-Linked Edge List |
Form | el-slist |
Description | Scheme macro specialization to Adjacency List that stores the edges
in a singly linked list.
|
See also | el-slist | Rooster Graph EL-SLIST |
boost | Boost Graph Library |
|
Hash Edge List |
Form | el-hash |
Description | Scheme macro specialization to Adjacency List that stores the edges
in a hashtable.
|
See also | el-hash | Rooster Graph EL-HASH |
boost | Boost Graph Library |
|
4 Visitors
|
|
|
Visitors |
Form | rgraph-doc-visitors |
Description | Rooster Graph Visitors
|
See also | visitors | Rooster Graph Visitors |
boost | Boost Graph Library |
|
5 Properties
|
|
|
Properties |
Form | rgraph-doc-properties |
Description | Rooster Graph Properties
|
See also | properties | Rooster Graph Properties |
boost | Boost Graph Library |
|
6 Utility
|
|
|
let-rgraph |
Form | (let-rgraph GTYPE (body) ...) |
Description | Create a lexical scope with bindings to the graph methods. The
scope will have the following bindings:
make-graph
add-edge!
remove-edge!
remove-edge2!
out-edges
out-edges*
out-edges+
out-degree
in-edges
in-edges*
in-edge+
in-degree
add-vertex!
remove-vertex!
vertex
vertex-eq?
num-vertices
vertices
vertices*
vertices+
clear!
source
target
edge-at
The + version of the binding (like vertices+) will be the stream
version if it exists, else it will be the list version. These are
useful with the remaining bindings which process the results of the
+ bindings:
for-each+
map+
|
Parameters | GTYPE | The type name of the graph. |
|
GTYPE-fill-graph! |
Form | (GTYPE-fill-graph! graph edges set-vertex-name!) |
Description | Fill graph from a list of edges, where each edge is a pair of the
form '(vertex1 . vertex2). vertex1, vertex2, etc. must be
comparable using eq?. Gets mutated graph. Will fill internal
property 'vertex-name if defined. Will set vertex_descriptor if a
hash vertex list.
|
Parameters | graph | The graph object. |
edges | A list of edges, each a pair of the form '(vertex1 . vertex2) |
set-vertex-name! | Property to set the name of a vertex. May be #f. |
Returns | Mutated, filled graph |
|
7 Algorithms
|
|
|
Depth First Search |
Form | rgraph-doc-dfs |
Description | Depth First Search and Depth First Visit
|
See also | dfs | Depth First Search Algorithms |
boost | Boost Graph Library |
|
Topological Sort |
Form | rgraph-doc-topsort |
Description | Topological sort
|
See also | topsort | Topological Sort |
boost | Boost Graph Library |
|
Fiduccia-Mattheyses bi-partitioning |
Form | rgraph-doc-part-fidmat |
Description | Fiduccia-Mattheyses bi-partitioning
|
See also | topsort | Fiduccia-Mattheyses bi-partitioning |
caltech | Caltech Tutorial |
berkeley | Berkeley Tutorial |
mes | MES Tutorial |
|