Merge pull request #4 from boostorg/develop
Updating development branch that I'm merging to.
16
.clang-format
Normal file
@@ -0,0 +1,16 @@
|
||||
BasedOnStyle: WebKit
|
||||
Standard: Cpp11
|
||||
AlignAfterOpenBracket: false
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
BreakBeforeBraces: Allman
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 80
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 0
|
||||
IndentCaseLabels: false
|
||||
SortIncludes: false
|
||||
AlignTrailingComments: false
|
||||
|
||||
SpacesInAngles: true
|
||||
|
||||
65
.travis.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
# Use, modification, and distribution are
|
||||
# subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
# Mael Valais, 2016
|
||||
# This travis file has been inspired from boostorg/geometry/circle.yml.
|
||||
#
|
||||
# This file is intended to make use of travis-ci, a continuous integration
|
||||
# service. The purpose is to build and run the tests on the graph module
|
||||
# on every push, and be able to know if those commits are "clean" or if
|
||||
# they break the build.
|
||||
#
|
||||
|
||||
# I think that we shouldn't restrict on branches: PRs must also be tested
|
||||
# So for now, I disabled the "only on branches" feature
|
||||
#branches:
|
||||
# only:
|
||||
# - master
|
||||
# - develop
|
||||
# - test
|
||||
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
|
||||
env:
|
||||
global:
|
||||
- BOOST_BRANCH=$([[ "$TRAVIS_BRANCH" = "master" ]] && echo master || echo develop)
|
||||
- BOOST=boost-local # must be different from graph/boost dir name
|
||||
addons:
|
||||
apt:
|
||||
sources: ubuntu-toolchain-r-test
|
||||
packages: g++-4.8
|
||||
|
||||
before_install:
|
||||
# Clone boost repository
|
||||
- cd
|
||||
- mkdir $BOOST && cd $BOOST
|
||||
- git init .
|
||||
- git remote add --no-tags -t $BOOST_BRANCH origin https://github.com/boostorg/boost.git
|
||||
- git fetch --depth=1
|
||||
- git checkout $BOOST_BRANCH
|
||||
- git submodule update --init --merge
|
||||
- git remote set-branches --add origin $BOOST_BRANCH
|
||||
- git pull --recurse-submodules
|
||||
- git submodule update --init
|
||||
- git checkout $BOOST_BRANCH
|
||||
- git submodule foreach "git reset --quiet --hard; git clean -fxd"
|
||||
- git reset --hard; git clean -fxd
|
||||
- git status
|
||||
|
||||
# replace the content of the library with the currently tested repo
|
||||
- cd && pwd && ls
|
||||
- rm -rf $BOOST/libs/graph
|
||||
- cd $TRAVIS_BUILD_DIR && cd ..
|
||||
- mv graph $HOME/$BOOST/libs/
|
||||
|
||||
# build b2 and create headers
|
||||
- cd && cd $BOOST
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
# This part is meant for unit tests
|
||||
script:
|
||||
- cd $HOME/$BOOST/libs/graph/test
|
||||
- ../../../b2 toolset=gcc-4.8 cxxflags=-std=c++11
|
||||
44
README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
Boost Graph Library
|
||||
===================
|
||||
|
||||
A generic interface for traversing graphs, using C++ templates.
|
||||
|
||||
The full documentation is available on [boost.org](http://www.boost.org/doc/libs/release/libs/graph/doc/index.html).
|
||||
|
||||
## Support, bugs and feature requests ##
|
||||
|
||||
Bugs and feature requests can be reported through the [Trac issue tracker](https://svn.boost.org/trac/boost/query?component=graph&desc=1&order=id)
|
||||
(see [open issues](https://svn.boost.org/trac/boost/query?status=!closed&component=graph&desc=1&order=id) and
|
||||
[closed issues](https://svn.boost.org/trac/boost/query?status=closed&component=graph&col=id&col=summary&col=status&col=owner&col=type&col=milestone&col=version&desc=1&order=id)). [Here](http://lists.boost.org/Archives/boost/2015/04/221780.php) is why Trac is still in use.
|
||||
|
||||
You can submit your changes through a [pull request](https://github.com/boostorg/graph/pulls). One of the maintainers will take a look (remember that it can take some time).
|
||||
|
||||
There is no mailing-list specific to Boost Graph, although you can use the general-purpose Boost [mailing-list](http://lists.boost.org/mailman/listinfo.cgi/boost-users) using the tag [graph].
|
||||
|
||||
|
||||
## Development ##
|
||||
|
||||
Clone the whole boost project, which includes the individual Boost projects as submodules ([see boost+git doc](https://github.com/boostorg/boost/wiki/Getting-Started)):
|
||||
|
||||
git clone https://github.com/boostorg/boost
|
||||
cd boost
|
||||
git submodule update --init
|
||||
|
||||
The Boost Graph Library is located in `libs/graph/`.
|
||||
|
||||
Boost Graph Library is mostly made of headers but also contains some compiled components. Here are the build commands:
|
||||
|
||||
./bootstrap.sh <- compile b2
|
||||
./b2 headers <- just installs headers
|
||||
./b2 <- build compiled components
|
||||
|
||||
**Note:** The Boost Graph Library cannot currently be built outside of Boost itself.
|
||||
|
||||
### Running tests ###
|
||||
First, make sure you are in `libs/graph/test`.
|
||||
You can either run all the 300+ tests listed in `Jamfile.v2` or run a single test:
|
||||
|
||||
../../../b2 <- run all tests
|
||||
../../../b2 cycle_canceling_test <- single test
|
||||
|
||||
You can also check the [regression tests reports](http://beta.boost.org/development/tests/develop/developer/graph.html).
|
||||
@@ -112,7 +112,6 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
|
||||
typedef typename boost::graph_traits<G>::adjacency_iterator
|
||||
adjacency_iterator;
|
||||
void constraints() {
|
||||
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> ));
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<adjacency_iterator> ));
|
||||
|
||||
p = adjacent_vertices(v, g);
|
||||
|
||||
@@ -149,16 +149,21 @@ undirected graphs).
|
||||
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<in_edge_iterator> ));
|
||||
|
||||
p = in_edges(v, g);
|
||||
n = in_degree(v, g);
|
||||
n = degree(v, g);
|
||||
e = *p.first;
|
||||
const_constraints(g);
|
||||
}
|
||||
void const_constraints(const G& g) {
|
||||
p = in_edges(v, g);
|
||||
n = in_degree(v, g);
|
||||
n = degree(v, g);
|
||||
e = *p.first;
|
||||
}
|
||||
std::pair<in_edge_iterator, in_edge_iterator> p;
|
||||
typename boost::graph_traits<G>::vertex_descriptor v;
|
||||
typename boost::graph_traits<G>::edge_descriptor e;
|
||||
typename boost::graph_traits<G>::degree_size_type n;
|
||||
G g;
|
||||
};
|
||||
</PRE>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<HTML>
|
||||
<!--
|
||||
Copyright (c) Jeremy Siek 2000
|
||||
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -459,7 +459,7 @@ and<br>
|
||||
<br><br>
|
||||
This describes whether the graph class allows the insertion of
|
||||
parallel edges (edges with the same source and target). The two tags
|
||||
are <TT>allow_parallel_edge-_tag</TT> and
|
||||
are <TT>allow_parallel_edge_tag</TT> and
|
||||
<TT>disallow_parallel_edge_tag</TT>. The
|
||||
<TT>setS</TT> and <TT>hash_setS</TT> variants disallow
|
||||
parallel edges while the others allow parallel edges.
|
||||
@@ -474,9 +474,9 @@ The type used for dealing with the number of vertices in the graph.
|
||||
|
||||
<hr>
|
||||
|
||||
<tt>graph_traits<adjacency_list>::edge_size_type</tt><br>
|
||||
<tt>graph_traits<adjacency_list>::edges_size_type</tt><br>
|
||||
and<br>
|
||||
<tt>adjacency_list_traits<OutEdgeList, VertexList, Directed_list, EdgeList>::edge_size_type</tt><br>
|
||||
<tt>adjacency_list_traits<OutEdgeList, VertexList, Directed_list, EdgeList>::edges_size_type</tt><br>
|
||||
<br><br>
|
||||
The type used for dealing with the number of edges in the graph.
|
||||
|
||||
@@ -836,7 +836,7 @@ add_edge(vertex_descriptor u, vertex_descriptor v,
|
||||
</pre>
|
||||
Adds edge <i>(u,v)</i> to the graph and attaches <TT>p</TT> as the
|
||||
value of the edge's internal property storage. Also see the previous
|
||||
<TT>add_edge()</TT> member function for more details.
|
||||
<TT>add_edge()</TT> non-member function for more details.
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ IN: <tt>VertexIndexMap vertex_index</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
@@ -266,7 +266,7 @@ IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
</blockquote>
|
||||
|
||||
@@ -121,7 +121,7 @@ records which component each edge in the graph belongs to by
|
||||
recording the component number in the component property map. The
|
||||
<tt>ComponentMap</tt> type must be a model of <a
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type shouch be an integer type, preferably the same
|
||||
Map</a>. The value type should be an integer type, preferably the same
|
||||
as the <tt>edges_size_type</tt> of the graph. The key type must be
|
||||
the graph's edge descriptor type.<br>
|
||||
<b>Default</b>: <tt>dummy_property_map</tt>.<br>
|
||||
|
||||
@@ -109,7 +109,7 @@ noticeably increase the performance.</P>
|
||||
<B>Algorithm description:</B><BR>The Boykov-Kolmogorov max-flow (or often
|
||||
BK max-flow) algorithm is a variety of the augmenting-path algorithm. Standard
|
||||
augmenting path algorithms find shortest paths from source to sink vertex and
|
||||
augment them by substracting the bottleneck capacity found on that path from the
|
||||
augment them by subtracting the bottleneck capacity found on that path from the
|
||||
residual capacities of each edge and adding it to the total flow. Additionally
|
||||
the minimum capacity is added to the residual capacity of the reverse edges. If
|
||||
no more paths in the residual-edge tree are found, the algorithm terminates.
|
||||
@@ -137,7 +137,7 @@ a path from source to sink is found.</P>
|
||||
<P><I>augment-phase</I>: This phase augments the path that was found
|
||||
in the grow phase. First it finds the bottleneck capacity of the
|
||||
found path, and then it updates the residual-capacity of the edges
|
||||
from this path by substracting the bottleneck capacity from the
|
||||
from this path by subtracting the bottleneck capacity from the
|
||||
residual capacity. Furthermore the residual capacity of the reverse
|
||||
edges are updated by adding the bottleneck capacity. This phase can
|
||||
destroy the built up search trees, as it creates at least one
|
||||
|
||||
@@ -223,7 +223,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.<br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
@@ -305,7 +305,7 @@ The example in <a
|
||||
href="../example/bfs-example.cpp"><TT>example/bfs-example.cpp</TT></a>
|
||||
demonstrates using the BGL Breadth-first search algorithm on the graph
|
||||
from <A HREF="./graph_theory_review.html#fig:bfs-example">Figure
|
||||
5</A>. The file
|
||||
6</A>. The file
|
||||
<a href="../example/bfs-example2.cpp"><TT>example/bfs-example2.cpp</TT></a>
|
||||
contains the same example, except that the <tt>adacency_list</tt>
|
||||
class used has <tt>VertexList</tt> and <tt>EdgeList</tt> set
|
||||
|
||||
0
doc/cochet-terrasson98numerical.pdf
Executable file → Normal file
@@ -538,7 +538,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
|
||||
vertices for the edges, and must fall within the range <code>[0,
|
||||
numverts)</code>. The edges in <code>[edge_begin,
|
||||
edge_end)</code> must be sorted so that all edges originating
|
||||
from vertex <i>i</i> preceed any edges originating from all
|
||||
from vertex <i>i</i> precede any edges originating from all
|
||||
vertices <i>j</i> where <i>j > i</i>.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ records which component each vertex in the graph belongs to by
|
||||
recording the component number in the component property map. The
|
||||
<tt>ComponentMap</tt> type must be a model of <a
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type shouch be an integer type, preferably the same
|
||||
Map</a>. The value type should be an integer type, preferably the same
|
||||
as the <tt>vertices_size_type</tt> of the graph. The key type must be
|
||||
the graph's vertex descriptor type.<br>
|
||||
|
||||
@@ -117,7 +117,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.<br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
@@ -80,7 +80,7 @@ integers in the half-open range <tt>[0,num_vertices(G))</tt>.<br>
|
||||
<b>Default:</b> <tt>get(vertex_index, G)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.<br>
|
||||
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
0
doc/dasdan-dac99.pdf
Executable file → Normal file
@@ -239,7 +239,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
@@ -419,7 +419,7 @@ The time complexity is <i>O(V log V + E)</i>.
|
||||
is invoked on vertex <i>v</i> when the edge
|
||||
<i>(u,v)</i> is examined and <i>v</i> is WHITE. Since
|
||||
a vertex is colored GRAY when it is discovered,
|
||||
each reacable vertex is discovered exactly once. This
|
||||
each reachable vertex is discovered exactly once. This
|
||||
is also when the vertex is inserted into the priority queue.
|
||||
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
|
||||
is invoked if the edge is not relaxed (see above).
|
||||
@@ -435,7 +435,7 @@ See <a href="../example/dijkstra-example.cpp">
|
||||
<TT>example/dijkstra-example.cpp</TT></a> for an example of using Dijkstra's
|
||||
algorithm.
|
||||
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths_no_color_map.html">dijkstra_shortest_paths_no_color_map</a> for a version of dijkstra's shortest path that does not use a color map.
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths_no_color_map.html">dijkstra_shortest_paths_no_color_map</a> for a version of Dijkstra's shortest path that does not use a color map.
|
||||
|
||||
<H3>Notes</H3>
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ IN: <tt>index_map(VertexIndexMap index_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, graph)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
</blockquote>
|
||||
@@ -358,7 +358,7 @@ The time complexity is <i>O(V log V + E)</i>.
|
||||
See <a href="../example/dijkstra-no-color-map-example.cpp">
|
||||
<TT>example/dijkstra-no-color-map-example.cpp</TT></a> for an example of using Dijkstra's algorithm.
|
||||
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a> for a version of dijkstra's shortest path that uses a color map.
|
||||
<H3>See also</H3> <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a> for a version of Dijkstra's shortest path that uses a color map.
|
||||
|
||||
<H3>Notes</H3>
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
-->
|
||||
|
||||
|
||||
<Head>
|
||||
|
||||
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Edge Coloring</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</pre>
|
||||
|
||||
<p>Computes an edge coloring for the vertices in the graph, using
|
||||
an algorithm proposed by Mista et al. []. Given edges ordered
|
||||
an algorithm proposed by Misra et al. []. Given edges ordered
|
||||
e<sub>1</sub>, e<sub>2</sub>, ..., e<sub>n</sub> it assignes a
|
||||
colors c<sub>1</sub>, c<sub>2</sub>, ..., c<sub>n</sub> in a way
|
||||
that no vertex connects with 2 edges of the same color. Furthermore
|
||||
@@ -95,4 +95,4 @@ Maciej Piechotka (<A HREF="mailto:uzytkownik2@gmail.com">uzytkownik2@gmail.com</
|
||||
</TD></TR></TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -195,7 +195,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
0
doc/figs/cr.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
0
doc/figs/dominator-tree1.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
doc/figs/dominator-tree2.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
0
doc/figs/maximal-match.png
Executable file → Normal file
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
0
doc/figs/maximum-match.png
Executable file → Normal file
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
0
doc/figs/mcr.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
0
doc/figs/very_complex_graph.gif
Executable file → Normal file
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
@@ -257,7 +257,7 @@ The type used for dealing with the number of vertices in the graph.
|
||||
|
||||
<hr>
|
||||
|
||||
<tt>graph_traits<filtered_graph>::edge_size_type</tt>
|
||||
<tt>graph_traits<filtered_graph>::edges_size_type</tt>
|
||||
<br><br>
|
||||
The type used for dealing with the number of edges in the graph.
|
||||
|
||||
|
||||
@@ -198,7 +198,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
<b>Python:</b> Unsupported parameter.
|
||||
|
||||
@@ -174,7 +174,7 @@ the graph can be visited.</TD>
|
||||
<TR><TD ALIGN="LEFT">
|
||||
<TT>boost::graph_traits<G>::degree_size_type</TT> </TD>
|
||||
<TD ALIGN="LEFT" VALIGN="TOP"> The integer type for
|
||||
vertex degee. </TD>
|
||||
vertex degree. </TD>
|
||||
</TR>
|
||||
<TR><TD ALIGN="LEFT">
|
||||
<TT>out_edges(v, g)</TT> </TD>
|
||||
|
||||
@@ -217,7 +217,7 @@ x V</i> array. Each element in the array <i>a<sub>uv</sub></i> stores
|
||||
a Boolean value saying whether the edge <i>(u,v)</i> is in the graph.
|
||||
<A HREF="#fig:adj-matrix">Figure 3</A> depicts an adjacency matrix for
|
||||
the graph in <A HREF="#fig:directed-graph">Figure 1</A> (minus the
|
||||
parallel edge <i>(b,y)</i>). The ammount of space required to store
|
||||
parallel edge <i>(b,y)</i>). The amount of space required to store
|
||||
an adjacency-matrix is <i>O(V<sup>2</sup>)</i>. Any edge can be
|
||||
accessed, added, or removed in <i>O(1)</i> time. To add or remove a
|
||||
vertex requires reallocating and copying the whole graph, an
|
||||
@@ -527,7 +527,7 @@ A flow network is a directed graph <i>G=(V,E)</i> with a
|
||||
<i>t</i>. Each edge has a positive real valued <b><i>capacity</i></b>
|
||||
function <i>c</i> and there is a <b><i>flow</i></b> function <i>f</i>
|
||||
defined over every vertex pair. The flow function must satisfy three
|
||||
contraints:
|
||||
constraints:
|
||||
|
||||
<p>
|
||||
<i>f(u,v) <= c(u,v) for all (u,v) in V x V</i> (Capacity constraint) <br>
|
||||
|
||||
@@ -218,7 +218,7 @@ vertices in the graph.
|
||||
|
||||
<tr>
|
||||
<td><tt>
|
||||
edge_size_type
|
||||
edges_size_type
|
||||
</tt></td>
|
||||
<td>
|
||||
The unsigned integer type used for representing the number of
|
||||
|
||||
@@ -171,7 +171,7 @@ IN: <tt>VertexIndexMap vertex_index_map</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
<!--
|
||||
Copyright (c) 2013-2015 Louis Dionne
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
-->
|
||||
|
||||
<p><body bgcolor="#ffffff" link="#0000ee" text="#000000" vlink="#551a8b" alink="#ff0000"></p>
|
||||
|
||||
<p><img src="../../../boost.png" alt="C++ Boost" /></p>
|
||||
@@ -17,7 +25,7 @@ self-loops and redundant circuits caused by parallel edges are enumerated too.
|
||||
edges are not desired.</p>
|
||||
|
||||
<p>The algorithm is described in detail in
|
||||
<a href="http://www.massey.ac.nz/~kahawick/cstn/013/cstn-013.pdf">http://www.massey.ac.nz/~kahawick/cstn/013/cstn-013.pdf</a>.</p>
|
||||
<a href="http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf">http://complexity.massey.ac.nz/cstn/013/cstn-013.pdf</a>.</p>
|
||||
|
||||
<h3 id="where-defined">Where defined</h3>
|
||||
|
||||
@@ -54,5 +62,5 @@ edges are not desired.</p>
|
||||
<hr />
|
||||
|
||||
<div class="footer">
|
||||
© 2013 Louis Dionne
|
||||
© 2013-2015 Louis Dionne
|
||||
</div>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
<body bgcolor="#ffffff" link="#0000ee" text="#000000" vlink="#551a8b" alink="#ff0000">
|
||||
|
||||

|
||||
|
||||
# `hawick_circuits`
|
||||
|
||||
template <typename Graph, typename Visitor, typename VertexIndexMap>
|
||||
void hawick_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph));
|
||||
|
||||
template <typename Graph, typename Visitor, typename VertexIndexMap>
|
||||
void hawick_unique_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph));
|
||||
|
||||
Enumerate all the elementary circuits in a directed multigraph. Specifically,
|
||||
self-loops and redundant circuits caused by parallel edges are enumerated too.
|
||||
`hawick_unique_circuits` may be used if redundant circuits caused by parallel
|
||||
edges are not desired.
|
||||
|
||||
The algorithm is described in detail in
|
||||
<http://www.massey.ac.nz/~kahawick/cstn/013/cstn-013.pdf>.
|
||||
|
||||
|
||||
### Where defined
|
||||
|
||||
[`#include <boost/graph/hawick_circuits.hpp>`](../../../boost/graph/hawick_circuits.hpp)
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
__IN:__ `Graph const& graph`
|
||||
|
||||
> The graph on which the algorithm is to be performed. It must be a model of
|
||||
> the `VertexListGraph` and `AdjacencyGraph` concepts.
|
||||
|
||||
__IN:__ `Visitor visitor`
|
||||
|
||||
> The visitor that will be notified on each circuit found by the algorithm.
|
||||
> The `visitor.cycle(circuit, graph)` expression must be valid, with `circuit`
|
||||
> being a `const`-reference to a random access sequence of `vertex_descriptor`s.
|
||||
>
|
||||
> For example, if a circuit `u -> v -> w -> u` exists in the graph, the
|
||||
> visitor will be called with a sequence consisting of `(u, v, w)`.
|
||||
|
||||
__IN:__ `VertexIndexMap const& vim = get(vertex_index, graph)`
|
||||
|
||||
> A model of the `ReadablePropertyMap` concept mapping each `vertex_descriptor`
|
||||
> to an integer in the range `[0, num_vertices(graph))`. It defaults to using
|
||||
> the vertex index map provided by the `graph`.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
<div class="footer">
|
||||
© 2013 Louis Dionne
|
||||
</div>
|
||||
@@ -161,7 +161,7 @@ Convert Existing Graphs to the BGL</A>). External adaptation wraps a new
|
||||
interface around a data-structure without copying and without placing
|
||||
the data inside adaptor objects. The BGL interface was carefully
|
||||
designed to make this adaptation easy. To demonstrate this, we have
|
||||
built interfacing code for using a variety of graph dstructures (LEDA
|
||||
built interfacing code for using a variety of graph structures (LEDA
|
||||
graphs, Stanford GraphBase graphs, and even Fortran-style arrays) in
|
||||
BGL graph algorithms.
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ map.<br>
|
||||
<b>Default:</b> <tt>get(vertex_index, g1)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
@@ -166,7 +166,7 @@ map.<br>
|
||||
<b>Default:</b> <tt>get(vertex_index, g2)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
@@ -246,7 +246,7 @@ As a mapping from vertices to index values between 0 and
|
||||
<b>Default</b>:<tt class="computeroutput">get(vertex_index,g)</tt>.
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
<b>Python</b>: Unsupported parameter.
|
||||
|
||||
@@ -166,7 +166,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ IN: <tt>VertexIndexMap indexmap</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
</blockquote>
|
||||
|
||||
0
doc/profile.htm
Executable file → Normal file
@@ -77,7 +77,7 @@ The time complexity is <i>O(V<sup>3</sup>)</i>.
|
||||
<H3>Where Defined</H3>
|
||||
|
||||
<P>
|
||||
<a href="../../../boost/graph/push_relabel_max_flow.hpp"><TT>boost/graph/preflow_push_max_flow.hpp</TT></a>
|
||||
<a href="../../../boost/graph/push_relabel_max_flow.hpp"><TT>boost/graph/push_relabel_max_flow.hpp</TT></a>
|
||||
|
||||
<P>
|
||||
|
||||
@@ -141,7 +141,7 @@ IN: <tt>vertex_index_map(VertexIndexMap index_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
</blockquote>
|
||||
|
||||
@@ -160,6 +160,8 @@ call <tt>get(vertex_index, g)</tt> returns the actual property map object.
|
||||
{
|
||||
// ...
|
||||
|
||||
typedef graph_traits<Graph>::vertex_descriptor Vertex;
|
||||
|
||||
// get the property map for vertex indices
|
||||
typedef property_map<Graph, vertex_index_t>::type IndexMap;
|
||||
IndexMap index = get(vertex_index, g);
|
||||
@@ -167,8 +169,10 @@ call <tt>get(vertex_index, g)</tt> returns the actual property map object.
|
||||
std::cout << "vertices(g) = ";
|
||||
typedef graph_traits<Graph>::vertex_iterator vertex_iter;
|
||||
std::pair<vertex_iter, vertex_iter> vp;
|
||||
for (vp = vertices(g); vp.first != vp.second; ++vp.first)
|
||||
std::cout << index[*vp.first] << " ";
|
||||
for (vp = vertices(g); vp.first != vp.second; ++vp.first) {
|
||||
Vertex v = *vp.first;
|
||||
std::cout << index[v] << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
// ...
|
||||
return 0;
|
||||
|
||||
0
doc/r_c_shortest_paths.html
Executable file → Normal file
@@ -190,7 +190,7 @@ The type used for dealing with the number of vertices in the graph.
|
||||
|
||||
<hr>
|
||||
|
||||
<tt>graph_traits<reverse_graph>::edge_size_type</tt>
|
||||
<tt>graph_traits<reverse_graph>::edges_size_type</tt>
|
||||
<br><br>
|
||||
The type used for dealing with the number of edges in the graph.
|
||||
|
||||
|
||||
0
doc/sloan_ordering.htm
Executable file → Normal file
0
doc/sloan_start_end_vertices.htm
Executable file → Normal file
@@ -124,7 +124,7 @@ headerfile <tt><string.h></tt> (if <tt>SYSV</tt> is <tt>#define</tt>d)
|
||||
or the headerfile <tt><strings.h></tt> (if <tt>SYSV</tt> is <i>not</i>
|
||||
<tt>#define</tt>d). Some compilers, like <tt>gcc</tt>/<tt>g++</tt>,
|
||||
don't care much (<tt>gcc</tt> "knows" about the "string" functions without
|
||||
refering to <tt><string.h></tt>), but others, like MSVC on Win32, do (so
|
||||
referring to <tt><string.h></tt>), but others, like MSVC on Win32, do (so
|
||||
all "Developer Studio Projects" in the "MSVC" subdirectory of the
|
||||
<a href="#sec:SGB">SGB distribution</a> appropriately define <tt>SYSV</tt>).
|
||||
You should be careful to set (or not) <tt>SYSV</tt> according to the needs of
|
||||
|
||||
@@ -84,7 +84,7 @@ records which component each vertex in the graph belongs to by
|
||||
recording the component number in the component property map. The
|
||||
<tt>ComponentMap</tt> type must be a model of <a
|
||||
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
|
||||
Map</a>. The value type shouch be an integer type, preferably the same
|
||||
Map</a>. The value type should be an integer type, preferably the same
|
||||
as the <tt>vertices_size_type</tt> of the graph. The key type must be
|
||||
the graph's vertex descriptor type.<br>
|
||||
|
||||
@@ -162,7 +162,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<HTML>
|
||||
<!--
|
||||
Copyright (c) Jeremy Siek 2000
|
||||
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
-->
|
||||
<Head>
|
||||
<Title>Boost Graph Library: Subgraph</Title>
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
|
||||
ALINK="#ff0000">
|
||||
<IMG SRC="../../../boost.png"
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<BR Clear>
|
||||
|
||||
@@ -71,7 +71,7 @@ create the root graph object. Here we use <tt>adjacency_list</tt> as
|
||||
the underlying graph implementation. The underlying graph type is
|
||||
required to have <tt>vertex_index</tt> and <tt>edge_index</tt>
|
||||
internal properties, so we add an edge index property to the adjacency
|
||||
list. We do not need to add a vertex index properety because that is
|
||||
list. We do not need to add a vertex index property because that is
|
||||
built in to the <tt>adjacency_list</tt>. We will be building the graph
|
||||
and subgraphs in Figure 1, so we will need a total of six vertices.
|
||||
|
||||
@@ -83,7 +83,7 @@ typedef subgraph< adjacency_list< vecS, vecS, directedS,
|
||||
const int N = 6;
|
||||
Graph G0(N);
|
||||
|
||||
enum { A, B, C, D, E, F}; // for conveniently refering to vertices in G0
|
||||
enum { A, B, C, D, E, F}; // for conveniently referring to vertices in G0
|
||||
</pre>
|
||||
|
||||
Next we create two empty subgraph objects, specifying <tt>G0</tt> as
|
||||
@@ -91,8 +91,8 @@ their parent.
|
||||
|
||||
<pre>
|
||||
Graph& G1 = G0.create_subgraph(), G2 = G0.create_subgraph();
|
||||
enum { A1, B1, C2 }; // for conveniently refering to vertices in G1
|
||||
enum { A2, B2 }; // for conveniently refering to vertices in G2
|
||||
enum { A1, B1, C2 }; // for conveniently referring to vertices in G1
|
||||
enum { A2, B2 }; // for conveniently referring to vertices in G2
|
||||
</pre>
|
||||
|
||||
We can add vertices from the root graph to the subgraphs using the
|
||||
@@ -187,7 +187,7 @@ the underlying <tt>Graph</tt> type.
|
||||
<pre>
|
||||
graph_traits<subgraph>::vertex_descriptor
|
||||
</pre>
|
||||
The type for the vertex descriptors.
|
||||
The type for the vertex descriptors.
|
||||
(Required by <a href="Graph.html">Graph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -195,7 +195,7 @@ graph_traits<subgraph>::vertex_descriptor
|
||||
<pre>
|
||||
graph_traits<subgraph>::edge_descriptor
|
||||
</pre>
|
||||
The type for the edge descriptors.
|
||||
The type for the edge descriptors.
|
||||
(Required by <a href="Graph.html">Graph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -203,7 +203,7 @@ graph_traits<subgraph>::edge_descriptor
|
||||
<pre>
|
||||
graph_traits<subgraph>::vertex_iterator
|
||||
</pre>
|
||||
The type for the iterators returned by <tt>vertices</tt>.
|
||||
The type for the iterators returned by <tt>vertices</tt>.
|
||||
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -211,14 +211,14 @@ graph_traits<subgraph>::vertex_iterator
|
||||
<pre>
|
||||
graph_traits<subgraph>::edge_iterator
|
||||
</pre>
|
||||
The type for the iterators returned by <tt>edges</tt>.
|
||||
The type for the iterators returned by <tt>edges</tt>.
|
||||
(Required by <a href="EdgeListGraph.html">EdgeListGraph</a>.)
|
||||
|
||||
<hr>
|
||||
<pre>
|
||||
graph_traits<subgraph>::out_edge_iterator
|
||||
</pre>
|
||||
The type for the iterators returned by <tt>out_edges</tt>.
|
||||
The type for the iterators returned by <tt>out_edges</tt>.
|
||||
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -226,14 +226,14 @@ graph_traits<subgraph>::out_edge_iterator
|
||||
graph_traits<subgraph>::in_edge_iterator
|
||||
</pre>
|
||||
The <tt>in_edge_iterator</tt> is the
|
||||
iterator type returned by the <tt>in_edges</tt> function.
|
||||
iterator type returned by the <tt>in_edges</tt> function.
|
||||
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
|
||||
|
||||
<hr>
|
||||
<pre>
|
||||
graph_traits<subgraph>::adjacency_iterator
|
||||
</pre>
|
||||
The type for the iterators returned by <tt>adjacent_vertices</tt>.
|
||||
The type for the iterators returned by <tt>adjacent_vertices</tt>.
|
||||
(Required by <a href="AdjacencyGraph.html">AdjacencyGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -252,7 +252,7 @@ graph_traits<subgraph>::edge_parallel_category
|
||||
parallel edges (edges with the same source and target), which
|
||||
depends on the underlying <tt>Graph</tt> class. The two tags are
|
||||
<tt>allow_parallel_edge_tag</tt> and
|
||||
<tt>disallow_parallel_edge_tag</tt>.
|
||||
<tt>disallow_parallel_edge_tag</tt>.
|
||||
(Required by <a href="Graph.html">Graph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -388,7 +388,7 @@ subgraph& parent()
|
||||
<pre>
|
||||
std::pair<children_iterator, children_iterator> children() const
|
||||
</pre>
|
||||
Return an iterator pair for accessing the children subgraphs.
|
||||
Return an iterator pair for accessing the children subgraphs.
|
||||
|
||||
|
||||
<!----------------------------->
|
||||
@@ -441,7 +441,7 @@ out_edges(vertex_descriptor u_local, const subgraph& g)
|
||||
Returns an iterator range providing access to the out-edges of
|
||||
vertex <i>u</i> in subgraph <i>g</i>. If the graph is undirected, this
|
||||
iterator range provides access to all edge incident on
|
||||
vertex <i>u</i>.
|
||||
vertex <i>u</i>.
|
||||
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -451,7 +451,7 @@ in_edges(vertex_descriptor v_local, const subgraph& g)
|
||||
</pre>
|
||||
Returns an iterator range providing access to the in-edges of
|
||||
vertex
|
||||
<i>v</i> in subgraph <i>g</i>.
|
||||
<i>v</i> in subgraph <i>g</i>.
|
||||
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -482,7 +482,7 @@ out_degree(vertex_descriptor u_local, const subgraph& g)
|
||||
<pre>
|
||||
degree_size_type in_degree(vertex_descriptor u_local, const subgraph& g)
|
||||
</pre>
|
||||
Returns the number of edges entering vertex <i>u</i> in subgraph <i>g</i>.
|
||||
Returns the number of edges entering vertex <i>u</i> in subgraph <i>g</i>.
|
||||
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -543,7 +543,7 @@ void remove_edge(vertex_descriptor u_local, vertex_descriptor v_local,
|
||||
subgraph& g)
|
||||
</pre>
|
||||
Removes the edge <i>(u,v)</i> from the subgraph and from all of the
|
||||
ancestors of <tt>g</tt> in the subgraph tree.
|
||||
ancestors of <tt>g</tt> in the subgraph tree.
|
||||
(Required by <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -551,7 +551,7 @@ void remove_edge(vertex_descriptor u_local, vertex_descriptor v_local,
|
||||
void remove_edge(edge_descriptor e_local, subgraph& g)
|
||||
</pre>
|
||||
Removes the edge <tt>e</tt> from the subgraph and from all of the
|
||||
ancestors of <tt>g</tt> in the subgraph tree.
|
||||
ancestors of <tt>g</tt> in the subgraph tree.
|
||||
(Required by <a href="EdgeMutableGraph.html">EdgeMutableGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -591,7 +591,7 @@ get(PropertyTag, const subgraph& g)
|
||||
descriptor for one subgraph will change the property for the
|
||||
global vertex descriptor, and therefore for all other subgraphs.
|
||||
However, the key type for a subgraph's property map is a subgraph-local
|
||||
vertex or edge descriptor.
|
||||
vertex or edge descriptor.
|
||||
(Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -605,7 +605,7 @@ get(PropertyTag, const subgraph& g, Key k_local)
|
||||
This returns the property value for the key <tt>k_local</tt>, which
|
||||
is either a local vertex or local edge descriptor. See the above
|
||||
<tt>get</tt> function
|
||||
for more information about the propert maps.
|
||||
for more information about the property maps.
|
||||
(Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
|
||||
|
||||
<hr>
|
||||
@@ -656,11 +656,11 @@ properties into a <tt>property</tt> that contains an appropriate index. For
|
||||
example:
|
||||
<pre>
|
||||
struct my_vertex { ... };
|
||||
typedef property<vertex_index_t, std::size_t, vertex_prop> vertex_prop;
|
||||
typedef property<vertex_index_t, std::size_t, my_vertex> vertex_prop;
|
||||
|
||||
struct my_edge { ... };
|
||||
typedef property<edge_index_t, std::size_t, vertex_prop> edge_prop;
|
||||
typedef property<edge_index_t, std::size_t, my_edge> edge_prop;
|
||||
|
||||
typedef adjacency_list<vecS, listS, undirectedS, vertex_prop, edge_prop> Graph;
|
||||
typdef subgraph<Graph> Subgraph;
|
||||
typedef subgraph<Graph> Subgraph;
|
||||
</pre>
|
||||
|
||||
@@ -214,7 +214,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ IN: <tt>vertex_index_map(VertexIndexMap& index_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ integers from 0 to <tt>num_vertices(G)</tt>.<br>
|
||||
<b>Default:</b> <tt>get(vertex_index, G)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
</blockquote>
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
|
||||
<b>Default:</b> <tt>get(vertex_index, g)</tt>
|
||||
Note: if you use this default, make sure your graph has
|
||||
an internal <tt>vertex_index</tt> property. For example,
|
||||
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
|
||||
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
|
||||
not have an internal <tt>vertex_index</tt> property.
|
||||
<br>
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ or form.</p>
|
||||
<li><a href="http://www.bioconductor.org/repository/devel/vignette/RBGL.pdf">
|
||||
BGL interface for language R.</a></li>
|
||||
<li><a href="http://www.cuj.com/documents/s=8470/cuj0307tan/">CUJ Article about Electronic Design Automation</a></li>
|
||||
<li><a href="http://rubyforge.org/projects/rgl/">A BGL-inspired Ruby Graph Library</a></li>
|
||||
<li><a href="http://www.rubydoc.info/github/monora/rgl">A BGL-inspired Ruby Graph Library</a></li>
|
||||
<li><a href="http://www.codeproject.com/cs/miscctrl/quickgraph.asp">A BGL-inspired C# Graph Library</a></li>
|
||||
<li><a href="http://map1.squeakfoundation.org/sm/package/5729d80a-822b-4bc2-9420-ef7ecaea8553">A BGL-inspired Squeak (Smalltalk) Graph Library</a></li>
|
||||
<li><a href="http://www.datasim.nl/education/coursedetails.asp?coursecategory=CPP&coursecode=ADCPP">BGL course at DataSim</a></li>
|
||||
|
||||
0
doc/vf2_sub_graph_iso.html
Executable file → Normal file
0
doc/wavefront.htm
Executable file → Normal file
@@ -70,7 +70,7 @@ write_graphviz_dp(std::ostream& out, const Graph& g,
|
||||
|
||||
<p>
|
||||
This is to write a BGL graph object into an output stream in graphviz dot format
|
||||
so that users can make use of <a href="http://www.research.att.com/sw/tools/graphviz/">AT&T graphviz</a>
|
||||
so that users can make use of <a href="http://www.graphviz.org/">graphviz</a>
|
||||
to draw a picture with nice layout.
|
||||
<p>
|
||||
The first version with two parameters will write the graph into a
|
||||
|
||||
@@ -4,54 +4,215 @@
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
# exe labeled_graph : labeled_graph.cpp ;
|
||||
# exe quick_tour_new : quick_tour_new.cpp ;
|
||||
exe degree_centrality : degree_centrality.cpp ;
|
||||
exe influence_prestige : influence_prestige.cpp ;
|
||||
exe closeness_centrality : closeness_centrality.cpp ;
|
||||
exe scaled_closeness_centrality : scaled_closeness_centrality.cpp ;
|
||||
exe mean_geodesic : mean_geodesic.cpp ;
|
||||
exe inclusive_mean_geodesic : inclusive_mean_geodesic.cpp ;
|
||||
exe eccentricity : eccentricity.cpp ;
|
||||
exe clustering_coefficient : clustering_coefficient.cpp ;
|
||||
exe tiernan_print_cycles : tiernan_print_cycles.cpp ;
|
||||
exe tiernan_girth_circumference : tiernan_girth_circumference.cpp ;
|
||||
exe bron_kerbosch_print_cliques : bron_kerbosch_print_cliques.cpp ;
|
||||
exe bron_kerbosch_clique_number : bron_kerbosch_clique_number.cpp ;
|
||||
exe mcgregor_subgraphs_example : mcgregor_subgraphs_example.cpp ;
|
||||
exe grid_graph_example : grid_graph_example.cpp ;
|
||||
exe grid_graph_properties : grid_graph_properties.cpp ;
|
||||
exe bipartite_example : bipartite_example.cpp ;
|
||||
exe fr_layout : fr_layout.cpp ;
|
||||
exe canonical_ordering : canonical_ordering.cpp ;
|
||||
exe components_on_edgelist : components_on_edgelist.cpp ;
|
||||
exe boykov_kolmogorov-eg : boykov_kolmogorov-eg.cpp ;
|
||||
exe ospf-example : ospf-example.cpp ../build//boost_graph ;
|
||||
# exe cc-internet : cc-internet.cpp ../build//boost_graph ;
|
||||
exe implicit_graph : implicit_graph.cpp ;
|
||||
exe astar_maze : astar_maze.cpp ;
|
||||
exe accum-compile-times : accum-compile-times.cpp ;
|
||||
exe actor_clustering : actor_clustering.cpp ;
|
||||
exe adjacency_list : adjacency_list.cpp ;
|
||||
exe adjacency_list_io : adjacency_list_io.cpp ;
|
||||
exe adjacency_matrix : adjacency_matrix.cpp ;
|
||||
exe adj_list_ra_edgelist : adj_list_ra_edgelist.cpp ;
|
||||
exe astar-cities : astar-cities.cpp ;
|
||||
exe stoer_wagner : stoer_wagner.cpp ;
|
||||
exe bfs-example : bfs-example.cpp ;
|
||||
exe astar_maze : astar_maze.cpp ;
|
||||
exe bellman-example : bellman-example.cpp ;
|
||||
exe bellman-ford-internet : bellman-ford-internet.cpp ;
|
||||
exe bfs : bfs.cpp ;
|
||||
exe bfs-example2 : bfs-example2.cpp ;
|
||||
exe bfs-example : bfs-example.cpp ;
|
||||
exe bfs-name-printer : bfs-name-printer.cpp ;
|
||||
exe bfs_neighbor : bfs_neighbor.cpp ;
|
||||
exe bipartite_example : bipartite_example.cpp ;
|
||||
exe biconnected_components : biconnected_components.cpp ;
|
||||
exe boost_web_graph : boost_web_graph.cpp ;
|
||||
exe boykov_kolmogorov-eg : boykov_kolmogorov-eg.cpp ;
|
||||
exe bron_kerbosch_clique_number : bron_kerbosch_clique_number.cpp ;
|
||||
exe bron_kerbosch_print_cliques : bron_kerbosch_print_cliques.cpp ;
|
||||
#exe bucket_sorter : bucket_sorter.cpp ;
|
||||
exe canonical_ordering : canonical_ordering.cpp ;
|
||||
# exe cc-internet : cc-internet.cpp ../build//boost_graph ;
|
||||
exe city_visitor : city_visitor.cpp ;
|
||||
exe closeness_centrality : closeness_centrality.cpp ;
|
||||
exe clustering_coefficient : clustering_coefficient.cpp ;
|
||||
exe components_on_edgelist : components_on_edgelist.cpp ;
|
||||
|
||||
# TODO: Duplicate?
|
||||
exe connected_components : connected_components.cpp ;
|
||||
exe connected-components : connected-components.cpp ;
|
||||
|
||||
exe container_gen : container_gen.cpp ;
|
||||
exe copy-example : copy-example.cpp ;
|
||||
# exe csr-example : csr-example.cpp ;
|
||||
exe cuthill_mckee_ordering : cuthill_mckee_ordering.cpp ;
|
||||
exe cycle_canceling_example : cycle_canceling_example.cpp ;
|
||||
exe cycle-file-dep2 : cycle-file-dep2.cpp ;
|
||||
exe cycle-file-dep : cycle-file-dep.cpp ;
|
||||
exe cycle_ratio_example : cycle_ratio_example.cpp ;
|
||||
exe dag_shortest_paths : dag_shortest_paths.cpp ;
|
||||
exe dave : dave.cpp ;
|
||||
exe default-constructor2 : default-constructor2.cpp ;
|
||||
exe default-constructor : default-constructor.cpp ;
|
||||
exe degree_centrality : degree_centrality.cpp ;
|
||||
exe dfs : dfs.cpp ;
|
||||
exe dfs-example : dfs-example.cpp ;
|
||||
|
||||
# TODO: Duplicate?
|
||||
exe dfs_parenthesis : dfs_parenthesis.cpp ;
|
||||
# exe dfs-parenthesis : dfs-parenthesis.cpp ;
|
||||
|
||||
exe dijkstra-example : dijkstra-example.cpp ;
|
||||
exe dijkstra-example-listS : dijkstra-example-listS.cpp ;
|
||||
exe dijkstra-no-color-map-example : dijkstra-no-color-map-example.cpp ;
|
||||
exe adjacency_list_io : adjacency_list_io.cpp ;
|
||||
exe undirected_adjacency_list : undirected_adjacency_list.cpp ;
|
||||
exe directed_graph : directed_graph.cpp ;
|
||||
exe undirected_graph : undirected_graph.cpp ;
|
||||
exe two_graphs_common_spanning_trees : two_graphs_common_spanning_trees.cpp ;
|
||||
exe strong_components : strong_components.cpp ../build//boost_graph ;
|
||||
exe eccentricity : eccentricity.cpp ;
|
||||
exe edge_basics : edge_basics.cpp ;
|
||||
exe edge_coloring : edge_coloring.cpp ;
|
||||
|
||||
# TODO: Duplicate?
|
||||
exe edge_connectivity : edge_connectivity.cpp ;
|
||||
# exe edge-connectivity : edge-connectivity.cpp ;
|
||||
|
||||
exe edge-function : edge-function.cpp ;
|
||||
|
||||
# TODO: Duplicate?
|
||||
exe edge_iterator_constructor : edge_iterator_constructor.cpp ;
|
||||
exe edge-iter-constructor : edge-iter-constructor.cpp ;
|
||||
|
||||
exe edge_property : edge_property.cpp ;
|
||||
exe edmonds-karp-eg : edmonds-karp-eg.cpp ;
|
||||
exe exterior_properties : exterior_properties.cpp ;
|
||||
exe exterior_property_map : exterior_property_map.cpp ;
|
||||
exe family_tree : family_tree.cpp ;
|
||||
exe fibonacci_heap : fibonacci_heap.cpp ;
|
||||
exe file_dependencies : file_dependencies.cpp ;
|
||||
exe filtered-copy-example : filtered-copy-example.cpp ;
|
||||
exe filtered_graph : filtered_graph.cpp ;
|
||||
exe filtered_graph_edge_range : filtered_graph_edge_range.cpp ;
|
||||
exe filtered_vec_as_graph : filtered_vec_as_graph.cpp ;
|
||||
exe fr_layout : fr_layout.cpp ;
|
||||
exe gerdemann : gerdemann.cpp ;
|
||||
|
||||
# This needs SGB headers, via BGL's stanford_graph.h:
|
||||
# exe girth : girth.cpp ;
|
||||
|
||||
exe graph-assoc-types : graph-assoc-types.cpp ;
|
||||
|
||||
#TODO:
|
||||
#exe graph_as_tree : graph_as_tree.cpp ;
|
||||
|
||||
exe graph : graph.cpp ;
|
||||
exe graph_property : graph_property.cpp ;
|
||||
exe graph-property-iter-eg : graph-property-iter-eg.cpp ;
|
||||
exe graph-thingie : graph-thingie.cpp /boost/graph//boost_graph ;
|
||||
exe graphviz : graphviz.cpp /boost/graph//boost_graph ;
|
||||
exe grid_graph_example : grid_graph_example.cpp ;
|
||||
exe grid_graph_properties : grid_graph_properties.cpp ;
|
||||
exe hawick_circuits : hawick_circuits.cpp ;
|
||||
exe implicit_graph : implicit_graph.cpp ;
|
||||
exe inclusive_mean_geodesic : inclusive_mean_geodesic.cpp ;
|
||||
exe incremental_components : incremental_components.cpp ;
|
||||
exe incremental-components-eg : incremental-components-eg.cpp ;
|
||||
exe in_edges : in_edges.cpp ;
|
||||
exe influence_prestige : influence_prestige.cpp ;
|
||||
exe interior_pmap_bundled : interior_pmap_bundled.cpp ;
|
||||
exe interior_property_map : interior_property_map.cpp ;
|
||||
exe isomorphism : isomorphism.cpp ;
|
||||
exe iteration_macros : iteration_macros.cpp ;
|
||||
exe iterator-property-map-eg : iterator-property-map-eg.cpp ;
|
||||
exe johnson-eg : johnson-eg.cpp ;
|
||||
exe kevin-bacon2 : kevin-bacon2.cpp /boost//serialization ;
|
||||
exe kevin-bacon : kevin-bacon.cpp ;
|
||||
exe king_ordering : king_ordering.cpp ;
|
||||
exe knights_tour : knights_tour.cpp ;
|
||||
exe kruskal-example : kruskal-example.cpp ;
|
||||
# exe kruskal-telephone : kruskal-telephone.cpp ;
|
||||
exe kuratowski_subgraph : kuratowski_subgraph.cpp ;
|
||||
# exe labeled_graph : last-mod-time.cpp ;
|
||||
exe last-mod-time : last-mod-time.cpp ;
|
||||
|
||||
# These need LEDA:
|
||||
# exe leda-concept-check : leda-concept-check.cpp ;
|
||||
# exe leda-graph-eg : leda-graph-eg.cpp ;
|
||||
|
||||
# exe loops_dfs : loops_dfs.cpp ;
|
||||
exe make_biconnected_planar : make_biconnected_planar.cpp ;
|
||||
exe make_maximal_planar : make_maximal_planar.cpp ;
|
||||
exe matching_example : matching_example.cpp ;
|
||||
exe max_flow : max_flow.cpp ;
|
||||
exe mcgregor_subgraphs_example : mcgregor_subgraphs_example.cpp ;
|
||||
exe mean_geodesic : mean_geodesic.cpp ;
|
||||
|
||||
# This needs SGB headers, via BGL's stanford_graph.h:
|
||||
# exe miles_span : miles_span.cpp ;
|
||||
|
||||
exe minimum_degree_ordering : minimum_degree_ordering.cpp iohb.c ;
|
||||
|
||||
# This has an error pragma explaining that it is incorrect.
|
||||
# exe min_max_paths : min_max_paths.cpp ;
|
||||
|
||||
exe modify_graph : modify_graph.cpp ;
|
||||
exe neighbor_bfs : neighbor_bfs.cpp ;
|
||||
exe ordered_out_edges : ordered_out_edges.cpp ;
|
||||
exe ospf-example : ospf-example.cpp ../build//boost_graph ;
|
||||
exe parallel-compile-time : parallel-compile-time.cpp ;
|
||||
exe planar_face_traversal : planar_face_traversal.cpp ;
|
||||
exe prim-example : prim-example.cpp ;
|
||||
# exe prim-telephone : prim-telephone.cpp ;
|
||||
exe print-adjacent-vertices : print-adjacent-vertices.cpp ;
|
||||
exe print-edges : print-edges.cpp ;
|
||||
exe print-in-edges : print-in-edges.cpp ;
|
||||
exe print-out-edges : print-out-edges.cpp ;
|
||||
exe property_iterator : property_iterator.cpp ;
|
||||
exe property-map-traits-eg : property-map-traits-eg.cpp ;
|
||||
exe push-relabel-eg : push-relabel-eg.cpp ;
|
||||
exe put-get-helper-eg : put-get-helper-eg.cpp ;
|
||||
exe quick_tour : quick_tour.cpp ;
|
||||
exe r_c_shortest_paths_example : r_c_shortest_paths_example.cpp ;
|
||||
exe read_graphviz : read_graphviz.cpp ../build//boost_graph ;
|
||||
exe read_write_dimacs-eg : read_write_dimacs-eg.cpp ;
|
||||
# exe reachable-loop-head : reachable-loop-head.cpp ;
|
||||
# exe reachable-loop-tail : reachable-loop-tail.cpp ;
|
||||
exe remove_edge_if_bidir : remove_edge_if_bidir.cpp ;
|
||||
exe remove_edge_if_dir : remove_edge_if_dir.cpp ;
|
||||
exe remove_edge_if_undir : remove_edge_if_undir.cpp ;
|
||||
exe reverse_graph : reverse_graph.cpp ;
|
||||
|
||||
# This needs SGB headers, via BGL's stanford_graph.h:
|
||||
# exe roget_components : roget_components.cpp ;
|
||||
|
||||
# exe quick_tour_new : quick_tour_new.cpp ;
|
||||
exe scaled_closeness_centrality : scaled_closeness_centrality.cpp ;
|
||||
# exe scc : scc.cpp ;
|
||||
exe simple_planarity_test : simple_planarity_test.cpp ;
|
||||
exe sloan_ordering : sloan_ordering.cpp ;
|
||||
exe stoer_wagner : stoer_wagner.cpp ;
|
||||
exe strong-components : strong-components.cpp ;
|
||||
exe subgraph : subgraph.cpp ;
|
||||
exe strong_components : strong_components.cpp ../build//boost_graph ;
|
||||
exe subgraph_properties : subgraph_properties.cpp ;
|
||||
exe subgraph : subgraph.cpp ;
|
||||
exe successive_shortest_path_nonnegative_weights_example : successive_shortest_path_nonnegative_weights_example.cpp ;
|
||||
exe tiernan_girth_circumference : tiernan_girth_circumference.cpp ;
|
||||
exe tiernan_print_cycles : tiernan_print_cycles.cpp ;
|
||||
exe topo-sort1 : topo-sort1.cpp ;
|
||||
exe topo-sort2 : topo-sort2.cpp ;
|
||||
exe topo_sort : topo_sort.cpp ;
|
||||
exe topo-sort-file-dep2 : topo-sort-file-dep2.cpp ;
|
||||
exe topo-sort-file-dep : topo-sort-file-dep.cpp ;
|
||||
|
||||
# This needs LEDA:
|
||||
# exe topo-sort-with-leda : topo-sort-with-leda.cpp ;
|
||||
|
||||
# This needs SGB headers, via BGL's stanford_graph.h:
|
||||
# exe topo-sort-with-sgb : topo-sort-with-sgb.cpp ;
|
||||
|
||||
exe transitive_closure : transitive_closure.cpp ;
|
||||
exe transpose-example : transpose-example.cpp ;
|
||||
exe two_graphs_common_spanning_trees : two_graphs_common_spanning_trees.cpp ;
|
||||
exe undirected_adjacency_list : undirected_adjacency_list.cpp ;
|
||||
exe undirected_dfs : undirected_dfs.cpp ;
|
||||
exe undirected_graph : undirected_graph.cpp ;
|
||||
exe vector_as_graph : vector_as_graph.cpp ;
|
||||
exe vertex_basics : vertex_basics.cpp ;
|
||||
exe vertex-name-property : vertex-name-property.cpp ;
|
||||
exe vf2_sub_graph_iso_example : vf2_sub_graph_iso_example.cpp ;
|
||||
exe vf2_sub_graph_iso_multi_example : vf2_sub_graph_iso_multi_example.cpp ;
|
||||
exe sloan_ordering : sloan_ordering.cpp ;
|
||||
exe hawick_circuits : hawick_circuits.cpp ;
|
||||
exe edge_coloring : edge_coloring.cpp ;
|
||||
exe successive_shortest_path_nonnegative_weights_example : successive_shortest_path_nonnegative_weights_example.cpp ;
|
||||
exe cycle_canceling_example : cycle_canceling_example.cpp ;
|
||||
exe visitor : visitor.cpp ;
|
||||
exe write_graphviz : write_graphviz.cpp ;
|
||||
|
||||
|
||||
@@ -72,15 +72,9 @@ main()
|
||||
typedef property_map < file_dep_graph2, vertex_name_t >::type name_map_t;
|
||||
typedef property_map < file_dep_graph2, vertex_compile_cost_t >::type
|
||||
compile_cost_map_t;
|
||||
typedef property_map <file_dep_graph2, vertex_distance_t >::type
|
||||
distance_map_t;
|
||||
typedef property_map <file_dep_graph2, vertex_color_t >::type
|
||||
color_map_t;
|
||||
|
||||
name_map_t name_map = get(vertex_name, g);
|
||||
compile_cost_map_t compile_cost_map = get(vertex_compile_cost, g);
|
||||
distance_map_t distance_map = get(vertex_distance, g);
|
||||
color_map_t color_map = get(vertex_color, g);
|
||||
|
||||
std::ifstream name_in("makefile-target-names.dat");
|
||||
std::ifstream compile_cost_in("target-compile-costs.dat");
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <iostream>
|
||||
|
||||
int
|
||||
main()
|
||||
@@ -22,8 +23,12 @@ main()
|
||||
E edge_array[] = { E(0,1), E(0,2), E(0,1) };
|
||||
const std::size_t m = sizeof(edge_array) / sizeof(E);
|
||||
Graph g(edge_array, edge_array + m, n);
|
||||
for (std::size_t i = 0; i < m; ++i)
|
||||
std::cout << edges(g).first[i] << " ";
|
||||
|
||||
graph_traits<Graph>::edge_iterator edge_iterator;
|
||||
for (std::size_t i = 0; i < m; ++i) {
|
||||
const graph_traits<Graph>::edge_iterator e = edges(g).first + i;
|
||||
std::cout << *e << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -16,7 +16,6 @@ main()
|
||||
{
|
||||
using namespace boost;
|
||||
typedef adjacency_list < vecS, vecS, undirectedS > Graph;
|
||||
typedef graph_traits < Graph >::vertex_descriptor Vertex;
|
||||
|
||||
const int N = 6;
|
||||
Graph G(N);
|
||||
|
||||
@@ -15,7 +15,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
typedef int weight_t;
|
||||
typedef adjacency_list < vecS, vecS, directedS,
|
||||
property < vertex_name_t, char > > graph_t;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ int main()
|
||||
E(5, 2) };
|
||||
|
||||
typedef compressed_sparse_row_graph<directedS, WebPage> WebGraph;
|
||||
WebGraph g(&the_edges[0], &the_edges[0] + sizeof(the_edges)/sizeof(E), 6);
|
||||
WebGraph g(boost::edges_are_sorted, &the_edges[0], &the_edges[0] + sizeof(the_edges)/sizeof(E), 6);
|
||||
|
||||
// Set the URLs of each vertex
|
||||
int index = 0;
|
||||
|
||||
@@ -107,7 +107,6 @@ main(int , char* [])
|
||||
add_edge(4, 0, G);
|
||||
add_edge(4, 1, G);
|
||||
|
||||
typedef graph_traits<Graph>::vertex_descriptor Vertex;
|
||||
typedef graph_traits<Graph>::vertices_size_type size_type;
|
||||
|
||||
std::vector<size_type> d(num_vertices(G));
|
||||
|
||||
@@ -64,9 +64,6 @@ main(int, char*[])
|
||||
Graph G(edge_array, edge_array + sizeof(edge_array)/sizeof(E), 5);
|
||||
#endif
|
||||
|
||||
typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
|
||||
typedef boost::graph_traits<Graph>::vertices_size_type size_type;
|
||||
|
||||
std::cout << "DFS parenthesis:" << std::endl;
|
||||
depth_first_search(G, visitor(make_dfs_visitor(std::make_pair(open_paren(),
|
||||
close_paren()))));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//=======================================================================
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/edge_coloring.hpp>
|
||||
@@ -56,7 +57,7 @@ int main(int, char *[])
|
||||
Graph G(10);
|
||||
|
||||
for (size_t i = 0; i < sizeof(edges)/sizeof(edges[0]); i++)
|
||||
add_edge(edges[i].first, edges[i].second, G).first;
|
||||
add_edge(edges[i].first, edges[i].second, G);
|
||||
|
||||
size_t colors = edge_coloring(G, get(edge_bundle, G));
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ bool operator==(const edge_stream_iterator& x,
|
||||
const edge_stream_iterator& y)
|
||||
{
|
||||
return (x.m_stream == y.m_stream && x.m_end_marker == y.m_end_marker)
|
||||
|| x.m_end_marker == false && y.m_end_marker == false;
|
||||
|| (x.m_end_marker == false && y.m_end_marker == false);
|
||||
}
|
||||
bool operator!=(const edge_stream_iterator& x,
|
||||
const edge_stream_iterator& y)
|
||||
|
||||
@@ -141,8 +141,6 @@ int main(int , char* [])
|
||||
|
||||
add_edge(6, 8, Flow(10, Cap(8)), G);
|
||||
|
||||
typedef boost::graph_traits<Graph>::edge_descriptor Edge;
|
||||
|
||||
print_network(G);
|
||||
|
||||
property_map<Graph, edge_myflow_t>::type
|
||||
|
||||
@@ -29,7 +29,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
typedef int weight_t;
|
||||
typedef adjacency_list < vecS, vecS, bidirectionalS,
|
||||
property < vertex_name_t, char > > graph_t;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ template < typename Graph > void
|
||||
generic_bar(Graph & g)
|
||||
{
|
||||
// Declare some vertex and edge descriptor variables
|
||||
typename graph_traits < Graph >::vertex_descriptor u, v;
|
||||
typename graph_traits < Graph >::vertex_descriptor u = vertex(0,g), v = vertex(1,g);
|
||||
typename graph_traits < Graph >::edge_descriptor e1, e2;
|
||||
// Set u and e1 to valid descriptors...
|
||||
v = u; // Make v a handle to the same vertex as u.
|
||||
|
||||
@@ -89,6 +89,10 @@ const char* dot =
|
||||
istringstream gvgraph(dot);
|
||||
|
||||
bool status = read_graphviz(gvgraph,graph,dp,"node_id");
|
||||
if (!status) {
|
||||
cerr << "read_graphviz() failed." << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
cout << "graph " << get("name",dp,&graph) <<
|
||||
" (" << get("identifier",dp,&graph) << ")\n\n";
|
||||
|
||||
@@ -46,7 +46,6 @@ std::size_t myrand(std::size_t N) {
|
||||
|
||||
template <class Graph>
|
||||
bool check_edge(Graph& g, std::size_t a, std::size_t b) {
|
||||
typedef typename Graph::vertex_descriptor Vertex;
|
||||
typename Graph::adjacency_iterator vi, viend, found;
|
||||
boost::tie(vi, viend) = adjacent_vertices(vertex(a,g), g);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <boost/graph/graph_as_tree.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/cstdlib.hpp>
|
||||
#include <iostream>
|
||||
|
||||
class tree_printer {
|
||||
public:
|
||||
|
||||
@@ -381,7 +381,7 @@ edges_size_type num_edges(const ring_graph& g) {
|
||||
std::pair<edge_descriptor, bool>
|
||||
edge(vertex_descriptor u, vertex_descriptor v, const ring_graph& g) {
|
||||
if ((u == v + 1 || v == u + 1) &&
|
||||
u >= 0 && u < num_vertices(g) && v >= 0 && v < num_vertices(g))
|
||||
u > 0 && u < num_vertices(g) && v > 0 && v < num_vertices(g))
|
||||
return std::pair<edge_descriptor, bool>(edge_descriptor(u, v), true);
|
||||
else
|
||||
return std::pair<edge_descriptor, bool>(edge_descriptor(), false);
|
||||
|
||||
@@ -22,7 +22,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
typedef adjacency_list <vecS, vecS, undirectedS> Graph;
|
||||
typedef graph_traits<Graph>::vertex_descriptor Vertex;
|
||||
typedef graph_traits<Graph>::edge_descriptor Edge;
|
||||
//typedef graph_traits<Graph>::edge_descriptor Edge;
|
||||
typedef graph_traits<Graph>::vertices_size_type VertexIndex;
|
||||
|
||||
// Create a graph
|
||||
|
||||
@@ -227,7 +227,7 @@ Fri Aug 15 16:29:47 EDT 1997
|
||||
|
||||
char* substr(const char* S, const int pos, const int len);
|
||||
void upcase(char* S);
|
||||
void IOHBTerminate(char* message);
|
||||
void IOHBTerminate(const char* message);
|
||||
|
||||
int readHB_info(const char* filename, int* M, int* N, int* nz, char** Type,
|
||||
int* Nrhs)
|
||||
@@ -1340,7 +1340,7 @@ int writeHB_mat_char(const char* filename, int M, int N,
|
||||
int Ptrperline, Ptrwidth, Indperline, Indwidth;
|
||||
int Rhsperline, Rhswidth, Rhsprec;
|
||||
int Rhsflag;
|
||||
int Valperline, Valwidth, Valprec;
|
||||
int Valperline = 1, Valwidth, Valprec;
|
||||
int Valflag; /* Indicates 'E','D', or 'F' float format */
|
||||
char pformat[16],iformat[16],vformat[19],rformat[19];
|
||||
|
||||
@@ -1602,9 +1602,9 @@ void upcase(char* S)
|
||||
S[i] = toupper(S[i]);
|
||||
}
|
||||
|
||||
void IOHBTerminate(char* message)
|
||||
void IOHBTerminate(const char* message)
|
||||
{
|
||||
fprintf(stderr,message);
|
||||
fprintf(stderr,"%s",message);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ int ParseIfmt(char* fmt, int* perline, int* width);
|
||||
|
||||
int ParseRfmt(char* fmt, int* perline, int* width, int* prec, int* flag);
|
||||
|
||||
void IOHBTerminate(char* message);
|
||||
void IOHBTerminate(const char* message);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/iteration_macros.hpp>
|
||||
#include <iostream>
|
||||
|
||||
enum family { Jeanie, Debbie, Rick, John, Amanda, Margaret, Benjamin, N };
|
||||
|
||||
@@ -41,7 +42,7 @@ int main()
|
||||
else
|
||||
std::cout << " is the parent of ";
|
||||
|
||||
BGL_FORALL_ADJACENT(i, j, g, adjacency_list<>)
|
||||
BGL_FORALL_ADJ(i, j, g, adjacency_list<>)
|
||||
std::cout << name[get(index_map, j)] << ", ";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <map>
|
||||
#include <boost/graph/adj_list_serialize.hpp>
|
||||
#include <boost/archive/text_iarchive.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
|
||||
struct vertex_properties {
|
||||
std::string name;
|
||||
|
||||
@@ -76,7 +76,7 @@ int main(int , char* [])
|
||||
Vertex s = vertex(6, G);
|
||||
//king_ordering
|
||||
king_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
|
||||
get(vertex_degree, G));
|
||||
get(vertex_degree, G), get(vertex_index, G));
|
||||
cout << "King ordering starting at: " << s << endl;
|
||||
cout << " ";
|
||||
for (std::vector<Vertex>::const_iterator i = inv_perm.begin();
|
||||
@@ -94,7 +94,7 @@ int main(int , char* [])
|
||||
Vertex s = vertex(0, G);
|
||||
//king_ordering
|
||||
king_ordering(G, s, inv_perm.rbegin(), get(vertex_color, G),
|
||||
get(vertex_degree, G));
|
||||
get(vertex_degree, G), get(vertex_index, G));
|
||||
cout << "King ordering starting at: " << s << endl;
|
||||
cout << " ";
|
||||
for (std::vector<Vertex>::const_iterator i=inv_perm.begin();
|
||||
@@ -112,7 +112,7 @@ int main(int , char* [])
|
||||
{
|
||||
//king_ordering
|
||||
king_ordering(G, inv_perm.rbegin(), get(vertex_color, G),
|
||||
make_degree_map(G));
|
||||
make_degree_map(G), get(vertex_index, G));
|
||||
|
||||
cout << "King ordering:" << endl;
|
||||
cout << " ";
|
||||
|
||||
@@ -17,7 +17,6 @@ main()
|
||||
typedef adjacency_list < vecS, vecS, undirectedS,
|
||||
no_property, property < edge_weight_t, int > > Graph;
|
||||
typedef graph_traits < Graph >::edge_descriptor Edge;
|
||||
typedef graph_traits < Graph >::vertex_descriptor Vertex;
|
||||
typedef std::pair<int, int> E;
|
||||
|
||||
const int num_nodes = 5;
|
||||
|
||||
@@ -50,7 +50,6 @@ find_loops(typename graph_traits < Graph >::vertex_descriptor entry,
|
||||
{
|
||||
BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> ));
|
||||
typedef typename graph_traits < Graph >::edge_descriptor Edge;
|
||||
typedef typename graph_traits < Graph >::vertex_descriptor Vertex;
|
||||
std::vector < Edge > back_edges;
|
||||
std::vector < default_color_type > color_map(num_vertices(g));
|
||||
depth_first_visit(g, entry,
|
||||
@@ -58,7 +57,7 @@ find_loops(typename graph_traits < Graph >::vertex_descriptor entry,
|
||||
make_iterator_property_map(color_map.begin(),
|
||||
get(vertex_index, g), color_map[0]));
|
||||
|
||||
for (std::vector < Edge >::size_type i = 0; i < back_edges.size(); ++i) {
|
||||
for (typename std::vector < Edge >::size_type i = 0; i < back_edges.size(); ++i) {
|
||||
typename Loops::value_type x;
|
||||
loops.push_back(x);
|
||||
compute_loop_extent(back_edges[i], g, loops.back());
|
||||
|
||||
@@ -99,13 +99,10 @@ int main(int argc, char* argv[])
|
||||
if ( argc >= 4 )
|
||||
delta = atoi(argv[3]);
|
||||
|
||||
typedef double Type;
|
||||
|
||||
harwell_boeing hbs(argv[1]);
|
||||
|
||||
//must be BGL directed graph now
|
||||
typedef adjacency_list<vecS, vecS, directedS> Graph;
|
||||
typedef graph_traits<Graph>::vertex_descriptor Vertex;
|
||||
|
||||
int n = hbs.nrows();
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ main()
|
||||
}
|
||||
#else
|
||||
Graph g(edges, edges + sizeof(edges) / sizeof(E), weights, num_nodes);
|
||||
property_map<Graph, edge_weight_t>::type weightmap = get(edge_weight, g);
|
||||
#endif
|
||||
std::vector < graph_traits < Graph >::vertex_descriptor >
|
||||
p(num_vertices(g));
|
||||
|
||||
@@ -102,7 +102,6 @@ main()
|
||||
|
||||
graph_traits < graph_type >::vertex_iterator i, end;
|
||||
boost::tie(i, end) = vertices(g);
|
||||
typedef property_map < graph_type, vertex_name_t >::type name_map_t;
|
||||
i = std::find_if(i, end, name_equals("libzigzag.a", get(vertex_name, g)));
|
||||
output_in_edges(std::cout, g, *i, get(vertex_name, g));
|
||||
assert(num_vertices(g) == 15);
|
||||
|
||||
1
example/r_c_shortest_paths_example.cpp
Executable file → Normal file
@@ -200,7 +200,6 @@ public:
|
||||
|
||||
// example graph structure and cost from
|
||||
// http://www.boost.org/libs/graph/example/dijkstra-example.cpp
|
||||
const int num_nodes = 5;
|
||||
enum nodes { A, B, C, D, E };
|
||||
char name[] = "ABCDE";
|
||||
|
||||
|
||||
@@ -57,5 +57,5 @@ int main() {
|
||||
|
||||
bool status = read_graphviz(gvgraph,graph,dp,"node_id");
|
||||
|
||||
return 0;
|
||||
return status ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//=======================================================================
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <boost/graph/stanford_graph.hpp>
|
||||
#include <boost/graph/strong_components.hpp>
|
||||
|
||||
0
example/sloan_ordering.cpp
Executable file → Normal file
@@ -8,8 +8,8 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/graph/topological_sort.hpp>
|
||||
#include <boost/graph/stanford_graph.hpp>
|
||||
#include <boost/graph/topological_sort.hpp>
|
||||
|
||||
int
|
||||
main()
|
||||
|
||||
@@ -15,7 +15,6 @@ int
|
||||
main()
|
||||
{
|
||||
using namespace boost;
|
||||
typedef int weight_t;
|
||||
typedef adjacency_list < vecS, vecS, bidirectionalS,
|
||||
property < vertex_name_t, char > > graph_t;
|
||||
|
||||
|
||||