Compare commits

...

76 Commits

Author SHA1 Message Date
E Kawashima 7913228c9d Fix dead links (#79) 2016-11-03 11:29:42 -06:00
Jakob Lykke Andersen 45b600b665 VF2, fix assumption that index maps are default constructible. (#27) 2016-11-03 11:29:32 -06:00
K. Noel Belcourt 41dc6bc8ec Update meta data. 2016-11-03 11:29:17 -06:00
Murray Cumming 09914913d8 Remove any support for slist, which is a deprecated gcc extension. (#73)
We might want to add support for std::forward_list as a replacement
for slist.
2016-11-03 11:29:05 -06:00
K. Noel Belcourt 38c0346d50 Fix uninitialized variable. 2016-11-03 11:28:48 -06:00
K. Noel Belcourt d59e865d77 Remove unused typedef. 2016-11-03 11:28:38 -06:00
K. Noel Belcourt 06184c0bfe Fix a tautological compare warning with clang on mbp. 2016-11-03 11:28:28 -06:00
K. Noel Belcourt 15d1ce3c5b Add dependency on missing deprecated header <boost/detail/iterator.hpp>
This so all examples build correctly.  Will need to migrate the rest
of the code to use <boost/iterator/...>  instead.
2016-11-03 11:28:16 -06:00
K. Noel Belcourt 96e152f8e5 Remove unwanted side effect from add_edge call. 2016-11-03 11:28:03 -06:00
K. Noel Belcourt 10035bd207 Silence uninitialized variable warning. 2016-11-03 11:27:53 -06:00
K. Noel Belcourt d311ba1ccf Fix unused variable warning. 2016-11-03 11:27:41 -06:00
K. Noel Belcourt 3977e06d83 Fix duplicate quick_tour build target. 2016-11-03 11:27:31 -06:00
E Kawashima e758310566 Enable printing functions to use arbitary std::ostream and avoid flush (#71)
* print_in_edges
* print_graph_dispatch
* print_graph
* print_edges
* print_edges2
* print_vertices
2016-11-03 11:27:20 -06:00
E Kawashima 3b503707ad doc/subgraph.html: fix typo (#76) 2016-11-03 11:27:07 -06:00
akumta 03b9b5bdfd update for ticket #12526 (#77)
Thanks for the patch.
2016-11-03 11:26:55 -06:00
Matt Barr da0610c99b Add degree to reverse_graph (#78)
degree is required for BidirectionalGraphConcept.
Also adds the concept check to the reverse_graph unit test.
2016-11-03 11:26:41 -06:00
Maël Valais db5c1b317c Add Travis-ci as the continuous integration service for Boost.Graph (#63)
* Add travis-ci as CI for boostorg/graph repo.

I thought it would be a great idea to have the test running from a
"neutral entity" instead of having to checkout the pull request and
cd libs/graph/test && ../../../b2

I saw that many other boostorg submodules had their own CI system:
- compute relies on travis-ci
- geometry uses circleci

The major difference between circleci and travis-ci is the multi-threading supported by circleci. Both are free for open-source project (as of 2016/04/26). I chose travis-ci because I know how to configure it.

As for geometry, we could also use coveralls.io to display the test covering reports and improve the quality/coverage of tests on boostorg/graph.

IMPORTANT: a member of boostorg will have to add the repo boostorg/graph into travis-ci for it to work.

* csr_graph_test won't pass unless -std=c++11 is enabled

* Fixed gcc too old (4.6.3) using instead gcc-4.8 for -std=c++11
2016-11-03 11:26:29 -06:00
Murray Cumming 05a9ed31da Add a .clang-format file. (#68)
So we can at least make the examples use a more consistent code style.

Run clang-format like so:
$ clang-format -i *.cpp
and use git diff to see what has changed.

This will strip trailing whitespace too. You can ignore that by
using git diff -w
2016-11-03 11:26:19 -06:00
Murray Cumming c1ccf73891 example: Build all the examples (#64)
* examples: Sort the examples in the Jamfile.

This makes it easier to see which example files are even
mentioned in the build.

* examples: Build all examples.

To at least test that they build with the current API.

The newly-mentioned files here seem to be mostly (maybe all) the
BGL book examples that were added in 2001:
https://github.com/boostorg/graph/commit/5215e9b4f201bf4509a78abe89d16cb8f4199bbd
I would prefer to put these all in an examples/bgl_book subdirectory.

* Examples build: Comment out examples that cannot be expected to build.

For instance, because they depend on SBG or Stanford Graph.

* Examples: Add missing <iostream> includes.

* Examples: Comment out unused typedefs and variables.

* Examples: king_ordering: Adapt to newer API.

Specify the extra parameter for king_ordering().
The API was changed in 2005:
https://github.com/boostorg/graph/commit/4bc19a162166c025ba878cf77e959deab8cf1983
The test code was already correct:
https://github.com/imvu/boost/blob/master/libs/graph/test/king_ordering.cpp

* Examples: Some graphviz examples: Link to the library.

read_graphviz() is not header only.

* csr-example: Pass edge_are_sorted to constructor.

To use the new (well, in 2009) API:
https://github.com/boostorg/graph/commit/809904f268eb719e400fb20a4b62e17c45247066

* iteration_macros: Use BGL_FORALL_ADJ.

Not BGL_FORALL_ADJACENT(), which doesn't exist, because this was
changed in 2001:
https://github.com/boostorg/graph/commit/a0061ba07e8662561b362461c2d4347a5eb5f236

* examples: kevin-bacon2: Fix the build.

Include boost/serialization/string.hpp to fix this error:
kevin-bacon2.cpp:68:9:   required from here
../../../boost/serialization/access.hpp:116:9: error: ‘class std::__cxx11::basic_string<char>’ has no member named ‘serialize’

and link to the boost serialization library.

* examples: loop_dfs: Add a missing typename keyword.

* examples: accum-compile-times: Remove unused variables.

* Examples: Remove unused typedefs.

* examples: avoid warning about parentheses aronud &&.

* example: read_graphviz: Actually use status.

* Example: adj_list_ra_edgelist: Fix the build.

The [] syntax must have worked once but doesn't anymore.
This fixes the build but it is even more clearl now a stupid way to use
the edge iterator.

* Examples: Remove unused typedefs.

* Examples: Remove an unused variable.

* Example: iohb: A const correction.

Otherwise newer compilers complain about converting string literals
to char* when callig this function.

* Exmaples: iohb: Avoid security warning with fprintf().

* Examples: Actually use a variable.

* Examples: Comment out all Graphviz examples.

These use the now-non-existant GraphizGraph and GraphvizDigraph
types. Presumably these could be updated but it's not obvious how
to do that:
https://svn.boost.org/trac/boost/ticket/4762
2016-11-03 11:26:06 -06:00
Murray Cumming 281bb94e51 random.hpp: weighted_random_out_edge(): Add missing return. (#74)
This should avoid a compiler warning. For instance:
http://beta.boost.org/development/tests/develop/output/GLIS-homo-impi-graph-intel-linux-warnings.html#cycle_ratio_tests

Looks good, thanks.
2016-11-03 11:25:49 -06:00
K. Noel Belcourt 7cb9113a61 Disable csr_graph_test until can work through lack of c++11 support. 2016-10-31 11:02:17 -06:00
Murray Cumming 56d3e72155 bc_clustering: Remove an unused typedef. (#66)
Thanks.
2016-07-16 17:19:23 -06:00
Murray Cumming 7e54f9997d Make files not executable. (#69)
See https://github.com/boostorg/admin/issues/47
2016-07-16 17:19:11 -06:00
Nicholas Matteo 2796c0a147 Fix typos (#70)
Thanks!
2016-07-16 17:18:57 -06:00
K. Noel Belcourt b50fe850a2 Apologies to whomever committed this patch, I was unable to locate
the original commit to cherry-pick so have picked this source up
from develop and committed to master.
2016-07-16 16:43:20 -06:00
K. Noel Belcourt 529934f827 Apologies to whomever contributed this patch, I lost the original
commit.  Pick this from develop as work towards moving master
towards develop for the next release.
2016-07-16 16:41:07 -06:00
K. Noel Belcourt caa8fd4568 Minor wordsmiting and formatting picked from develop. 2016-07-16 16:39:16 -06:00
K. Noel Belcourt c7a6fdc418 Fixes unused variable warnings, picked from develop. 2016-07-16 16:35:16 -06:00
Murray Cumming 0ce03767a8 Add a README.md file.
So people can see what the project even is when they reach the GitHub repository.
Also, even the documentation doesn't have an actual short description of what
BGL is.
And, without a direct link, it is very hard to find the list of open issues
on Boost's trac system.

With many improvements from Maël Valais:
https://github.com/murraycu/graph/pull/1
2016-07-16 16:19:11 -06:00
Murray Cumming 8321c79d20 tree_traits: Add include for boost::tie().
This lets examples/graph_as_tree compile.
2016-07-16 16:18:52 -06:00
Maël Valais 589584b4e4 Fix #11374 and #12038: issues with find_flow_cost(), bundled properties and named parameters (#61)
* trac 11374: find_flow_cost() not working with bundled properties.

When using bundled for Weight and Cost properties, find_flow_cost() coudln't work because the properties had been "hard coded" instead of using generic types.

Fixes https://svn.boost.org/trac/boost/ticket/11374

* trac 12038: max-flow algorithms not working with named parameters.

The named parameter "Capacity" was not working. I just had to reverse the order of get_param_type parameters.

Here are the max-flow algorithms that are curretly not working with the named parameter "Capacity":
- edmonds_karp_max_flow,
- push_relabel_max_flow,
- boykov_kolmogorov_max_flow.

Fixes https://svn.boost.org/trac/boost/ticket/12038

* trac 11374: find_flow_cost() not working with named parameters and bundled properties at the same time.

When using bundled properties as well as named parameters, there was an error.

What happened is that the "named parameters" version of find_flow_cost() was not using a generic return value, hence the error.

Also, the return value_type was using edge_capacity_value instead of edge_weight_value (which is the type of a flow cost).

I fixed it using the trick used for edmonds_karp_max_flow(): add `edge_weight_value` to named_function_params.hpp.

* Unit test find_flow_cost() with bundled properties & named params.

-> unit tests for trac 11374

I used the existing min_cost_max_flow_utils.hpp, but I had to make the graph of getSampleGraph() more generic.

In the first place, I wanted to make a compile-only test but I also made
the test runnable so we check that
- find_flow_cost works() correctly with bundled properties
- successive_shortest_path_nonnegative_weights() also works with bundled properties

To run this test, this is a bit painful...
I had to run the entire graph-related tests.
- I commented the other tests except for graph in ./status/Jamfile.v2
- in this same dir, I ran `../b2`

One issue though: csr_graph_test seems to be broken on my boost copy, I may have an issue with updating the submodules or something...

* Unit test edmond_karp_max_flow with named params & bundled properties.

-> unit tests for trac 12038

As the previous commit, I rely on min_cost_max_flow_utils.hpp.

And I also made a runnable test instead of a simple "compile-time" test.

* Indented with 2 spaces instead of tabs

Thanks for the patch!
2016-07-16 16:18:35 -06:00
Justin Viiret f0faaabca1 Make lengauer_tarjan_dominator_tree use indexMap (#49)
Pass the indexMap parameter through to the dominator_visitor and use it
instead of get(vertex_index, g). This allows this algorithm to be used
for graphs without a vertex_index property.

Addresses bug #11742.
2016-07-16 16:18:22 -06:00
K. Noel Belcourt 4b07d0b469 Eliminate unused variable, regularize formatting. 2016-07-16 16:17:54 -06:00
K. Noel Belcourt cdc7f4f75b Remove unused member variable. 2016-07-16 16:17:44 -06:00
K. Noel Belcourt 9249b640e4 Fix a stack variable bound to member reference, a concept
checking variable that was unused triggering a warning,
and a documentation typo.
2016-07-16 16:17:33 -06:00
coderakki c0756b5ebf Update kamada_kawai_spring_layout.hpp (#53) 2016-07-16 16:17:21 -06:00
Alexander Lauser a14f8df86c Fixed bug 10231 partly: If finish_edge was called, then now correctly. (#16)
This appears to be fixed, we may have to patch this to ensure there's no backward compatibility issues with older compilers.  Thanks for the bug report and patch.

The bug that it never gets called with the current construction remains.
2016-07-16 16:17:09 -06:00
K. Noel Belcourt 7f94230dca Revert "removed an unused function (#39)"
This reverts commit 655ce30eb3.
2016-07-16 16:16:59 -06:00
Mads Jensen ecf83843e7 removed an unused function (#39)
The C++ standard deprecates use of <stdio.h>, <stdlib.h> etc., and suggests using <cstdio>, <cstdlib> etc.

Some trailing whitespace removed in affected files because of a setting in my editor

dead code surrounded by #if 0 ... #endif removed
2016-07-16 16:16:42 -06:00
K. Noel Belcourt 13cea9c32b Fix unused variable warning. 2016-07-16 16:16:33 -06:00
K. Noel Belcourt 50cb642e94 Quiet an unused variable warning. 2016-07-16 16:16:23 -06:00
sehe c112afbbad Fix labeled_graph constructors (#58)
* Fix labeled_graph constructors

* Wraparound bug leads to out-of-bounds addressing. 

    Seems obvious that `> 0` was meant (seeing the comments). 
    Also, if `vertices_size_type` is unsigned - which it usually (always?) is - the loop condition was never false.

 * Finally, one constructor didn't properly initialize the graph property

* Copy vertex property on add_vertex

Tested with clang on El Capitan, thanks!
2016-07-16 16:16:09 -06:00
felix b1a4f32b1f use graph_traits to access *_category types of a Graph (#54)
Tested with El Capitan and clang-darwin, thanks!
2016-07-16 16:15:54 -06:00
Arne B f9e930f006 Fixes bug 10449 (#57)
Without this patch it is not possible to call the copy constructor of directed_graph
2016-07-16 16:15:36 -06:00
E Kawashima a4e6f4dd78 fix typo in document of subgraph (#62)
Thanks!
2016-07-16 16:15:20 -06:00
Jakob Lykke Andersen 753c88c484 Add missing check for 'degree' in BidirectionalGraphConcept. Fix the concept checking class in the documentation for BidirectionalGraphConcept. Implementation of missing 'degree' function for filtered_graph. (#29)
Thanks for the patch.
2016-07-16 16:15:09 -06:00
Jared Grubb fa7ef591c2 Fix Ticket #11133: Graph: using 'nil' as a local variable (#34)
Looks good, thanks.
2016-07-16 16:14:55 -06:00
Louis Dionne eec98072db [Doc] Fix broken link to article for hawick_circuits, and remove useless .md file (#50)
Also update copyright and add license information.

Thanks for the patch.
2016-07-16 16:14:38 -06:00
Jakob Lykke Andersen 48b63adf44 Doc: remove IncidenceGraph requirement from AdjacencyGraph. (#28)
Thanks for the fix, it's good to have to documentation reflect the actual code.
2016-07-16 16:14:16 -06:00
Daniel J. H b0214ec131 Fix some minor documentation annoyances (#51)
* Fix documentation about type alias edge_size_type -> edges_size_type

This replaces occurences of `edge_size_type` (sg.) in the documentation
with the actual `edges_size_type` (pl.) as it is named in the
implementation.

There is a graph implementation (Stanford graph) that has a type alias
of `edge_size_type` (sg.) --- I did not change that implementation, as
it would break backwards compatibility, and therefore I also did not
change its documentation.

* Fix documentation on push_relabel algorithm, defined in header: preflow_push -> push_relabel
2016-07-16 16:14:01 -06:00
Vladimir Prus ba0cf281c9 Add missing include of <list>.
Thanks to Amit Prakash Ambasta for the report.
2016-07-16 16:13:34 -06:00
Ola Nilsson b5171962bf Fix doc spelling 2016-07-16 16:12:09 -06:00
Ahmed Charles 5d8c6fd1d3 Match concept_def.hpp and concept_undef.hpp. 2016-07-16 16:11:55 -06:00
Mads Jensen 59aba774bc Typo in Misra name 2016-07-16 16:11:12 -06:00
Mads Jensen 0eabc7ceb5 documentation fix for "allow_parallel_edge-_tag" 2016-07-16 16:10:59 -06:00
Mads Jensen 8729cc8a7c no need for executable flag on source files 2016-07-16 16:10:30 -06:00
Akira Takahashi 5bfc793f06 breadth_first_search doc : fix figure number
BFS Figure number is 6.
2016-07-16 16:10:11 -06:00
Akira Takahashi b357a88ecd add_edge doc : fix minor mistake
s/member function/non-member function/
2016-07-16 16:09:53 -06:00
K. Noel Belcourt a089d3bc35 Fix uninitialized variable by setting to null_vertex.
Thanks to Lu Wang for reporting this.
2016-07-16 16:08:58 -06:00
K. Noel Belcourt 04c1c99051 Add new strong components test to Jamfile from Alex Lauser.
Remove long unused file.
2016-07-16 16:04:39 -06:00
K. Noel Belcourt d6b7a717db Add finish_edge test case from Alex Lauser.
This test demonstrates incorrect output in
the order edges are finished.  We're using
this test to both ensure finish_edge is
called, and that the output is incorrect.
Once we fix where the visitor is called,
this test will be changed to check for the
correct output.
2016-07-16 16:03:30 -06:00
K. Noel Belcourt b6d9a72999 Fix macro logic for gcc 5, thanks to Alex Lauser
for pointing this out.
2016-07-16 16:03:18 -06:00
Alexander Lauser 6f5964a6bd Cleaned up the strong-components test. 2016-07-16 16:02:59 -06:00
Alexander Lauser d155583ac2 Added test for Boost.Graph's strong_components.
Associated with Bug #10231 which causes the test to fail.
2016-07-16 16:02:31 -06:00
K. Noel Belcourt 6a2d45ae20 Condition TTI finish_edge on supported compilers.
If compiler doesn't support has_member_function for member
templates, use old TTI syntax to avoid compiler error.
Supported compilers are gcc 4.9 and newer, clang any platform,
and intel 12 and newer.
2016-07-16 16:02:12 -06:00
K. Noel Belcourt 0e1414f46e Fix type traits so finish_edge is called when defined.
Changed the usage of TTI so that finish_edge is actually
called when defined.  Also regularized the finish_edge
signature so E is passed by value and G by const ref.
2016-07-16 16:01:53 -06:00
K. Noel Belcourt 189c113f04 Add missing iostream header. 2016-07-16 16:01:30 -06:00
Jakob Lykke Andersen add3546f94 Update attribute delimiter for read_graphviz
Support semicolon and nothing as ending of attributes, in addition to comma. See http://graphviz.org/content/dot-language.
2016-07-16 16:01:11 -06:00
mikael 6416fecc90 Simplified the move and copy constructor and assignment to avoid the maintenance nightmare of trying to rely on default functions. 2016-07-16 16:00:51 -06:00
Lorenz Breidenbach 8ca2084c9d Add missing #include of boost/functional/hash.hpp 2016-07-16 16:00:20 -06:00
Josef Cibulka 5b84005bac Comparison of doubles in graphml_test.cpp in now done with some tolerance to rounding errors. 2016-07-16 15:59:44 -06:00
Josef Cibulka 6a33285342 Changed asserts to BOOST_CHECK in graphml_test.cpp 2016-07-16 15:59:19 -06:00
Josef Cibulka 379383b62a Added reading of graph properties from graphml. 2016-07-16 15:57:52 -06:00
Daniel James a5b6a097e6 Add metadata file. 2016-07-16 15:56:22 -06:00
Marcel Raad 316445d7c9 Fix MSVC14 compile break
array_binary_tree_node::children_type::iterator pretends to be a bidirectional iterator but does not define operator--, which results in compile breaks with Visual C++ 2015.
2016-05-08 17:47:46 -06:00
K. Noel Belcourt ed98931118 Fixes to clear graph and graph_parallel for 1.61 release. 2016-04-27 05:42:03 -06:00
143 changed files with 1419 additions and 791 deletions
+16
View 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
View 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
View 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).
-1
View File
@@ -112,7 +112,6 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
typedef typename boost::graph_traits&lt;G&gt;::adjacency_iterator
adjacency_iterator;
void constraints() {
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; ));
p = adjacent_vertices(v, g);
+5
View File
@@ -149,16 +149,21 @@ undirected graphs).
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; ));
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&amp; g) {
p = in_edges(v, g);
n = in_degree(v, g);
n = degree(v, g);
e = *p.first;
}
std::pair&lt;in_edge_iterator, in_edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
typename boost::graph_traits&lt;G&gt;::degree_size_type n;
G g;
};
</PRE>
+5 -5
View File
@@ -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&lt;adjacency_list&gt;::edge_size_type</tt><br>
<tt>graph_traits&lt;adjacency_list&gt;::edges_size_type</tt><br>
and<br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::edge_size_type</tt><br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::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&nbsp;u, vertex_descriptor&nbsp;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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
+2 -2
View File
@@ -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
View File
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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.
Executable → Regular
View File
+1 -1
View 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>
@@ -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>
+9 -9
View File
@@ -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>
+1 -1
View File
@@ -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>
Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Executable → Regular
View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

+1 -1
View File
@@ -257,7 +257,7 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;filtered_graph&gt;::edge_size_type</tt>
<tt>graph_traits&lt;filtered_graph&gt;::edges_size_type</tt>
<br><br>
The type used for dealing with the number of edges in the graph.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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>
+10 -2
View File
@@ -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">
&copy; 2013 Louis Dionne
&copy; 2013-2015 Louis Dionne
</div>
-53
View File
@@ -1,53 +0,0 @@
<body bgcolor="#ffffff" link="#0000ee" text="#000000" vlink="#551a8b" alink="#ff0000">
![C++ Boost](../../../boost.png)
# `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">
&copy; 2013 Louis Dionne
</div>
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
Executable → Regular
View File
+2 -2
View 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>
Executable → Regular
View File
+1 -1
View File
@@ -190,7 +190,7 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;reverse_graph&gt;::edge_size_type</tt>
<tt>graph_traits&lt;reverse_graph&gt;::edges_size_type</tt>
<br><br>
The type used for dealing with the number of edges in the graph.
Executable → Regular
View File
Executable → Regular
View File
+1 -1
View File
@@ -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>
+24 -24
View File
@@ -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>
@@ -83,7 +83,7 @@ typedef subgraph&lt; adjacency_list&lt; 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 refering to vertices in G0
</pre>
Next we create two empty subgraph objects, specifying <tt>G0</tt> as
@@ -187,7 +187,7 @@ the underlying <tt>Graph</tt> type.
<pre>
graph_traits&lt;subgraph&gt;::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&lt;subgraph&gt;::vertex_descriptor
<pre>
graph_traits&lt;subgraph&gt;::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&lt;subgraph&gt;::edge_descriptor
<pre>
graph_traits&lt;subgraph&gt;::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&lt;subgraph&gt;::vertex_iterator
<pre>
graph_traits&lt;subgraph&gt;::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&lt;subgraph&gt;::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&lt;subgraph&gt;::out_edge_iterator
graph_traits&lt;subgraph&gt;::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&lt;subgraph&gt;::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&lt;subgraph&gt;::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&lt;children_iterator, children_iterator&gt; 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&amp; 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&amp; 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&amp; g)
<pre>
degree_size_type in_degree(vertex_descriptor u_local, const subgraph&amp; 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&amp; 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&amp; 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&amp; 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&amp; 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 propert maps.
(Required by <a href="PropertyGraph.html">PropertyGraph</a>.)
<hr>
@@ -656,10 +656,10 @@ properties into a <tt>property</tt> that contains an appropriate index. For
example:
<pre>
struct my_vertex { ... };
typedef property&lt;vertex_index_t, std::size_t, vertex_prop&gt; vertex_prop;
typedef property&lt;vertex_index_t, std::size_t, my_vertex&gt; vertex_prop;
struct my_edge { ... };
typedef property&lt;edge_index_t, std::size_t, vertex_prop&gt; edge_prop;
typedef property&lt;edge_index_t, std::size_t, my_edge&gt; edge_prop;
typedef adjacency_list&lt;vecS, listS, undirectedS, vertex_prop, edge_prop&gt; Graph;
typedef subgraph&lt;Graph&gt; Subgraph;
@@ -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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -97,7 +97,7 @@ IN: <tt>vertex_index_map(VertexIndexMap&amp; 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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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>
Executable → Regular
View File
Executable → Regular
View File
+1 -1
View File
@@ -70,7 +70,7 @@ write_graphviz_dp(std::ostream&amp; out, const Graph&amp; 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&amp;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
+200 -39
View File
@@ -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-eg : family-tree-eg.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-eg : reverse-graph-eg.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 ;
-6
View File
@@ -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");
+7 -2
View File
@@ -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] << " ";
typename 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;
-1
View File
@@ -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);
-1
View File
@@ -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;
+1 -1
View File
@@ -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;
-1
View File
@@ -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));
-3
View File
@@ -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()))));
+2 -1
View File
@@ -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));
+1 -1
View File
@@ -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)
-2
View File
@@ -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
-1
View File
@@ -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;
+1 -1
View File
@@ -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.
+4
View File
@@ -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";
-1
View File
@@ -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);
+1
View File
@@ -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:
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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);
}
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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;
}
+1
View File
@@ -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;
+3 -3
View File
@@ -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 << " ";
-1
View File
@@ -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;
+1 -2
View File
@@ -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());
-3
View File
@@ -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();
-1
View File
@@ -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));
-1
View File
@@ -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
View 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";
+1 -1
View File
@@ -57,5 +57,5 @@ int main() {
bool status = read_graphviz(gvgraph,graph,dp,"node_id");
return 0;
return status ? EXIT_SUCCESS : EXIT_FAILURE;
}
Executable → Regular
View File
-1
View File
@@ -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;
View File
View File
-1
View File
@@ -84,7 +84,6 @@ main(int, char*[])
Graph G(edges, edges + sizeof(edges)/sizeof(E), 5);
#endif
typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
typedef boost::graph_traits<Graph>::vertices_size_type size_type;
std::vector<size_type> d(num_vertices(G));
@@ -10,6 +10,7 @@
#ifndef BOOST_ADJACENCY_ITERATOR_HPP
#define BOOST_ADJACENCY_ITERATOR_HPP
#include <boost/detail/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/graph/graph_traits.hpp>
+1 -24
View File
@@ -20,14 +20,6 @@
#include <boost/unordered_set.hpp>
#if !defined BOOST_NO_SLIST
# ifdef BOOST_SLIST_HEADER
# include BOOST_SLIST_HEADER
# else
# include <slist>
# endif
#endif
#include <boost/scoped_ptr.hpp>
#include <boost/graph/graph_traits.hpp>
@@ -52,10 +44,6 @@ namespace boost {
// to map the selectors to the container type used to implement the
// graph.
#if !defined BOOST_NO_SLIST
struct slistS {};
#endif
struct vecS { };
struct listS { };
struct setS { };
@@ -74,12 +62,7 @@ namespace boost {
struct container_gen<listS, ValueType> {
typedef std::list<ValueType> type;
};
#if !defined BOOST_NO_SLIST
template <class ValueType>
struct container_gen<slistS, ValueType> {
typedef BOOST_STD_EXTENSION_NAMESPACE::slist<ValueType> type;
};
#endif
template <class ValueType>
struct container_gen<vecS, ValueType> {
typedef std::vector<ValueType> type;
@@ -136,12 +119,6 @@ namespace boost {
struct parallel_edge_traits<listS> {
typedef allow_parallel_edge_tag type; };
#if !defined BOOST_NO_SLIST
template <>
struct parallel_edge_traits<slistS> {
typedef allow_parallel_edge_tag type; };
#endif
template <>
struct parallel_edge_traits<setS> {
typedef disallow_parallel_edge_tag type; };
+1 -1
View File
@@ -443,7 +443,7 @@ namespace boost {
// graph type. Instead, use directedS, which also provides the
// functionality required for a Bidirectional Graph (in_edges,
// in_degree, etc.).
BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same<Directed, bidirectionalS>::value)>::value);
BOOST_STATIC_ASSERT(!(is_same<Directed, bidirectionalS>::value));
typedef typename mpl::if_<is_directed,
bidirectional_tag, undirected_tag>::type
-2
View File
@@ -114,8 +114,6 @@ betweenness_centrality_clustering(MutableGraph& g, Done done,
centrality_type;
typedef typename graph_traits<MutableGraph>::edge_iterator edge_iterator;
typedef typename graph_traits<MutableGraph>::edge_descriptor edge_descriptor;
typedef typename graph_traits<MutableGraph>::vertices_size_type
vertices_size_type;
if (has_no_edges(g)) return;
+2 -1
View File
@@ -6,13 +6,13 @@
#ifndef BOOST_GRAPH_BUFFER_CONCEPTS_HPP
#define BOOST_GRAPH_BUFFER_CONCEPTS_HPP 1
#include <boost/concept_check.hpp>
#include <boost/concept/detail/concept_def.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/concept/detail/concept_def.hpp>
namespace boost {
BOOST_concept(Buffer, (B))
@@ -87,5 +87,6 @@ namespace boost {
};
} // end `namespace boost`
#include <boost/concept/detail/concept_undef.hpp>
#endif // !BOOST_GRAPH_BUFFER_CONCEPTS_HPP
+2 -2
View File
@@ -248,8 +248,8 @@ namespace boost {
template <class Graph>
struct choose_graph_copy {
typedef typename Graph::traversal_category Trv;
typedef typename Graph::directed_category Dr;
typedef typename graph_traits<Graph>::traversal_category Trv;
typedef typename graph_traits<Graph>::directed_category Dr;
enum { algo =
(is_convertible<Trv, vertex_list_graph_tag>::value
&& is_convertible<Trv, edge_list_graph_tag>::value)
+16 -4
View File
@@ -64,19 +64,27 @@ namespace boost {
template <bool IsCallable> struct do_call_finish_edge {
template <typename E, typename G, typename Vis>
static void call_finish_edge(Vis& vis, const E& e, const G& g) {
static void call_finish_edge(Vis& vis, E e, const G& g) {
vis.finish_edge(e, g);
}
};
template <> struct do_call_finish_edge<false> {
template <typename E, typename G, typename Vis>
static void call_finish_edge(Vis&, const E&, const G&) {}
static void call_finish_edge(Vis&, E, const G&) {}
};
template <typename E, typename G, typename Vis>
void call_finish_edge(Vis& vis, const E& e, const G& g) { // Only call if method exists
void call_finish_edge(Vis& vis, E e, const G& g) { // Only call if method exists
#if ((defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))) || \
defined(__clang__) || \
(defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200)))
do_call_finish_edge<
has_member_function_finish_edge<Vis, void,
boost::mpl::vector<E, const G&> >::value>::call_finish_edge(vis, e, g);
#else
do_call_finish_edge<has_member_function_finish_edge<Vis, void>::value>::call_finish_edge(vis, e, g);
#endif
}
@@ -137,6 +145,11 @@ namespace boost {
src_e = back.second.first;
boost::tie(ei, ei_end) = back.second.second;
stack.pop_back();
// finish_edge has to be called here, not after the
// loop. Think of the pop as the return from a recursive call.
if (src_e) {
call_finish_edge(vis, src_e.get(), g);
}
while (ei != ei_end) {
Vertex v = target(*ei, g);
vis.examine_edge(*ei, g);
@@ -164,7 +177,6 @@ namespace boost {
}
put(color, u, Color::black());
vis.finish_vertex(u, g);
if (src_e) call_finish_edge(vis, src_e.get(), g);
}
}
+23 -22
View File
@@ -237,12 +237,6 @@ namespace boost {
inline stored_edge() { }
inline stored_edge(Vertex target, const no_property& = no_property())
: m_target(target) { }
// Need to write this explicitly so stored_edge_property can
// invoke Base::operator= (at least, for SGI MIPSPro compiler)
inline stored_edge& operator=(const stored_edge& x) {
m_target = x.m_target;
return *this;
}
inline Vertex& get_target() const { return m_target; }
inline const no_property& get_property() const { return s_prop; }
inline bool operator==(const stored_edge& x) const
@@ -258,7 +252,7 @@ namespace boost {
template <class Vertex>
no_property stored_edge<Vertex>::s_prop;
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_SMART_PTR)
template <class Vertex, class Property>
class stored_edge_property : public stored_edge<Vertex> {
typedef stored_edge_property self;
@@ -270,12 +264,24 @@ namespace boost {
const Property& p = Property())
: stored_edge<Vertex>(target), m_property(new Property(p)) { }
stored_edge_property(const self& x)
: Base(x), m_property(const_cast<self&>(x).m_property) { }
: Base(static_cast< Base const& >(x)), m_property(const_cast<self&>(x).m_property) { }
self& operator=(const self& x) {
Base::operator=(x);
// NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
static_cast<Base&>(*this) = static_cast< Base const& >(x);
m_property = const_cast<self&>(x).m_property;
return *this;
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
// NOTE Don't rely on default operators, their behavior is broken on several compilers (GCC 4.6).
stored_edge_property(self&& x)
: Base(static_cast< Base&& >(x)), m_property(std::move(x.m_property)) { }
self& operator=(self&& x) {
// NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
static_cast<Base&>(*this) = static_cast< Base&& >(x);
m_property = std::move(x.m_property);
return *this;
}
#endif
inline Property& get_property() { return *m_property; }
inline const Property& get_property() const { return *m_property; }
protected:
@@ -296,27 +302,22 @@ namespace boost {
inline stored_edge_property(Vertex target,
const Property& p = Property())
: stored_edge<Vertex>(target), m_property(new Property(p)) { }
#if defined(BOOST_MSVC) || (defined(BOOST_GCC) && (BOOST_GCC / 100) < 406)
stored_edge_property(self&& x) : Base(static_cast< Base const& >(x)) {
m_property.swap(x.m_property);
}
stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)) {
m_property.swap(const_cast<self&>(x).m_property);
}
stored_edge_property(self&& x) : Base(static_cast< Base&& >(x)),
m_property(std::move(x.m_property)) { }
stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)),
m_property(std::move(const_cast<self&>(x).m_property)) { }
self& operator=(self&& x) {
Base::operator=(static_cast< Base const& >(x));
// NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
static_cast<Base&>(*this) = static_cast< Base&& >(x);
m_property = std::move(x.m_property);
return *this;
}
self& operator=(self const& x) {
Base::operator=(static_cast< Base const& >(x));
// NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla).
static_cast<Base&>(*this) = static_cast< Base const& >(x);
m_property = std::move(const_cast<self&>(x).m_property);
return *this;
}
#else
stored_edge_property(self&& x) = default;
self& operator=(self&& x) = default;
#endif
inline Property& get_property() { return *m_property; }
inline const Property& get_property() const { return *m_property; }
protected:
@@ -63,6 +63,9 @@ public:
inline iterator& operator++() { ++i; return *this; }
inline iterator operator++(int)
{ iterator t = *this; ++(*this); return t; }
inline iterator& operator--() { --i; return *this; }
inline iterator operator--(int)
{ iterator t = *this; --(*this); return t; }
inline bool operator==(const iterator& x) const { return i == x.i; }
inline bool operator!=(const iterator& x) const
{ return !(*this == x); }
+2
View File
@@ -13,6 +13,8 @@
#include <iosfwd>
#include <boost/functional/hash.hpp>
namespace boost {
namespace detail {
+6 -6
View File
@@ -58,10 +58,10 @@ namespace boost {
template <class Node, class Next>
inline Node
slist_previous(Node head, Node x, Node nil,
slist_previous(Node head, Node x, Node empty,
Next next)
{
while (head != nil && next(head) != x)
while (head != empty && next(head) != x)
head = next(head);
return head;
}
@@ -82,12 +82,12 @@ namespace boost {
template <class Node, class Next>
inline Node
slist_reverse(Node node, Node nil,
slist_reverse(Node node, Node empty,
Next next)
{
Node result = node;
node = next(node);
next(result) = nil;
next(result) = empty;
while(node) {
Node next = next(node);
next(node) = result;
@@ -99,11 +99,11 @@ namespace boost {
template <class Node, class Next>
inline std::size_t
slist_size(Node head, Node nil,
slist_size(Node head, Node empty,
Next next)
{
std::size_t s = 0;
for ( ; head != nil; head = next(head))
for ( ; head != empty; head = next(head))
++s;
return s;
}
@@ -18,7 +18,7 @@
// and page 34 or http://www.graphviz.org/pdf/dotguide.pdf
//
// See documentation for this code at:
// http://www.boost.org/libs/graph/doc/read-graphviz.html
// http://www.boost.org/libs/graph/doc/read_graphviz.html
//
// Author: Jeremiah Willcock

Some files were not shown because too many files have changed in this diff Show More