Compare commits

...

2296 Commits

Author SHA1 Message Date
Jeremy W. Murphy a649be53bd Merge pull request #305 from boostorg/develop
Merge develop into master for 1.80.0 release
2022-07-27 09:55:56 +10:00
Jeremy W. Murphy 2862644154 Merge pull request #304 from sebrockm/fix-max-flows
Fix named parameter overload of `boykov_kolmogorov_max_flow`
2022-07-25 11:44:49 +10:00
Sebastian Brockmeyer f62a1839bd Fix return type of named paramter overload 2022-07-25 01:37:31 +02:00
Sebastian Brockmeyer 3600dbc226 add test for bk_max_flow with named bundled properties 2022-07-25 01:08:40 +02:00
Sebastian Brockmeyer 01020b0265 Use put instead of subscript operator in fill_random_max_flow_graph 2022-07-25 00:30:19 +02:00
Jeremy W. Murphy fcfc152f85 Merge pull request #303 from jesseli2002/docs_update
Clarify docs on what traversal category allowed
2022-07-20 09:32:57 +10:00
Jesse Li ea24532da5 Clarify docs on what traversal category allowed 2022-07-18 22:54:03 -07:00
Jeremy W. Murphy 944d9fc836 Merge pull request #302 from sebrockm/fix-conversion-warning
Fix conversion warning
2022-07-18 21:13:36 +10:00
Sebastian Brockmeyer 446dc15cf8 Remove redundant erase call 2022-07-17 21:23:08 +02:00
Sebastian Brockmeyer 44632af1a9 Fix conversion warning 2022-07-17 21:20:40 +02:00
Jeremy W. Murphy 5f4ce096f8 Merge pull request #299 from boostorg/Xcode_CI
Disable old versions of Xcode in Drone config
2022-07-15 09:50:55 +10:00
Jeremy W. Murphy 393c31d148 Remove GCC 11 and 12 2022-07-15 09:48:45 +10:00
Jeremy W. Murphy 73149e556b Add GCC 11 and 12 from Beast 2022-07-13 15:06:45 +10:00
Jeremy W. Murphy 3b6d40011b Remove old versions of Xcode from Drone config 2022-07-13 13:58:47 +10:00
Jeremy W. Murphy 797530d23a Merge pull request #296 from sebrockm/fix_stoer_wagner
Fix Stoer Wagner
2022-07-12 16:02:26 +10:00
Sebastian Brockmeyer 2e4b9c461a Rollback implementation change of 393c072c18 2022-07-11 14:19:18 +02:00
Sebastian Brockmeyer 3b6825958a Fix link and expected result in regression test 2022-07-10 19:42:46 +02:00
etienneINSA fa6aa57529 add test for stoer_wagner 2022-07-10 19:30:49 +02:00
Jeremy W. Murphy 430f61f696 Merge pull request #290 from jeremy-murphy/windows_msvc_14_3
Add MSVC 14.3 to github CI

Not Drone CI like I mistakenly said in the original commit message.
2022-03-06 22:46:10 +11:00
Jeremy W. Murphy 51f7f20cb6 Add MSVC 14.3 to Drone CI
Using windows-2022 machine.
2022-03-06 21:39:50 +11:00
Jeremy W. Murphy 71fed2fda8 Merge pull request #264 from qbit86/feature/first-child
Resolves #261 by replacing child() with first_child()
2022-03-04 13:10:18 +11:00
Jeremy W. Murphy 76aed24add Merge pull request #265 from qbit86/feature/remove-combine
Resolves #260 by removing call to `combine`
2022-03-04 10:55:12 +11:00
John Maddock c583bfa197 Merge branch 'develop' 2022-02-22 12:13:51 +00:00
Jeremy W. Murphy fa3bd05312 Merge pull request #269 from cqc-alec/bugfix/issue_268
Revert commit change to `reindex_edge_list`

Specifically, this reverts 5dd748307c.
2022-02-21 11:43:28 +11:00
Alec Edgington 99d0414416 Merge branch 'develop' into bugfix/issue_268 2022-02-20 07:56:56 +00:00
Jeremy W. Murphy 31026c4a5a Merge pull request #289 from jeremy-murphy/fix-windows-CI
Change windows-latest to windows-2019
2022-02-20 12:32:44 +11:00
Jeremy W. Murphy 5f6e128c16 Change windows-latest to windows-2019 2022-02-20 07:09:17 +11:00
Alec Edgington 1e200701f8 Merge branch 'develop' into bugfix/issue_268 2022-02-04 08:50:16 +00:00
Jeremy W. Murphy 8543c8ad78 Merge pull request #279 from jeremy-murphy/gcc-10-ICE
Get a green CI build by removing builds and code that we can't support

In the long term someone may want to revisit the builds removed and reinstate them if the underlying problem can be fixed.
Boost.Concept_Check has to be made compatible with C++17 before we can resume using the broken features.
2022-02-03 15:10:41 +11:00
Jeremy W. Murphy f2e5ef1b40 Disable failing builds 2022-02-03 09:55:02 +11:00
Jeremy W. Murphy f6fc9c8157 Remove failing builds from Drone CI configuration 2022-01-30 06:39:52 +11:00
Alec Edgington 0486e91d1b Extend unit test to cover directed graphs as well and add a couple of checks. 2022-01-05 10:43:25 +00:00
Jeremy W. Murphy 0defbbc323 Merge pull request #277 from cvvergara/patch-1
Add pgRouting to Boost Graph Library Users
2022-01-04 12:58:12 +11:00
Jeremy W. Murphy b657cf3901 Disable use of AdaptableBinaryFunction
It uses deprecated (C++17) and removed (C++20) classes such as
std::binary_function. Fails to compile on msvc-14.2.
Temporarily disabling altogether for simplicity.
2021-12-12 22:10:45 +11:00
Jeremy W. Murphy 5ff3645af6 Remove g++-10 from CI because it has an ICE on Boost.Xpressive code. 2021-12-12 22:04:47 +11:00
Alec Edgington 84232b46c0 Add unit test. 2021-12-10 12:47:21 +00:00
Ashish Kumar b76ffc7f2a Typo fix in graph edge_coloring docs (#209) 2021-12-09 17:26:38 +11:00
Philip Allgaier 972bde3031 Fix minor doc typos (#270)
* Fix typo in incident doc

* Add missing closing bracket to random_spanning_tree doc
2021-12-09 17:22:10 +11:00
char-lie 8c76c8aa01 Fix #274: Typo in Boykov-Kolmogorov Max-Flow (#275)
Redundant letter `c` in a comment.
2021-12-09 17:19:11 +11:00
Vicky Vergara 4879e70593 Add pgRouting to Boost Graph Library Users
First of all, I want to congratulate you for the amazing job you are doing.

I am the main developer of pgRouting, and the project is part of the OSGeo
Foundation [2] community projects.

pgRouting extends the PostGIS / PostgreSQL geospatial database to provide
geospatial routing functionality.

I would like pgRouting [1] to be added on the list of
"Boost Graph Library Users"
The Boost license is on the projects repository [3] and we document when a
boost graph function is used for example in [4]

[1] https://pgrouting.org/
[2] https://www.osgeo.org
[3] https://github.com/pgRouting/pgrouting
[4] https://docs.pgrouting.org/latest/en/pgr_aStar.html
2021-11-12 09:49:11 -06:00
Alec Edgington 27202068ea Remove stray bracket. 2021-07-05 13:31:20 +01:00
John Maddock cea3ee8225 Merge branch 'develop' 2021-07-03 10:21:10 +01:00
Alec Edgington 6e1f68ef22 Partially revert commit 5dd748307c.
Revert change to `reindex_edge_list`.

See https://github.com/boostorg/graph/issues/268 .
2021-07-02 14:17:27 +01:00
jzmaddock af22c9bcde Merge pull request #267 from boostorg/feature/lightweight_test
Convert the few remaining tests to use the header-only Lightweight Test
2021-06-10 08:55:38 +01:00
Glen Fernandes 7a6ceb3cd2 Convert the few remaining tests to use the header only Lightweight Test 2021-06-09 22:40:16 -04:00
Peter Dimov 2bc8d0490e Do not define BOOST_GRAPH_SOURCE in CMakeLists.txt 2021-06-09 19:06:17 +03:00
Peter Dimov 5bb73cd899 Add CMakeLists.txt 2021-06-09 19:06:00 +03:00
Peter Dimov 6bae630c38 Do not define BOOST_GRAPH_SOURCE in CMakeLists.txt 2021-06-09 18:45:39 +03:00
Viktor T bb4fbd6494 Resolves #260 by removing call to combine from astar_search_no_init_tree 2021-06-04 00:01:17 +03:00
Viktor T 64aa4a822a Resolves #261 by replacing child() with first_child() 2021-06-03 02:14:43 +03:00
jzmaddock d865589d62 As with other repro's, clang-9 on github is broken. 2021-05-31 12:01:41 +01:00
jzmaddock 03318bfb5f Fix #include errors and one GCC-ism in relaxed_heap.hpp. 2021-05-31 09:50:52 +01:00
Peter Dimov 97f51d8180 Add CMakeLists.txt 2021-05-29 20:34:01 +03:00
jzmaddock 35d3e15a47 Merge pull request #255 from boostorg/pr190_integration
Integration testing for PR190
2021-04-21 19:23:47 +01:00
jzmaddock c2c341c12d Merge pull request #254 from boostorg/pr234_integrate
Run PR234 through new CI
2021-04-21 11:59:23 +01:00
jzmaddock 685f9e091a Merge pull request #253 from boostorg/pr217_integrate
Integration CI test for PR217
2021-04-21 11:59:07 +01:00
jzmaddock 2247005473 Remove XCode testing workarounds, to see if PR190 fixes them.
Fixes: https://github.com/boostorg/graph/issues/251
2021-04-20 19:18:50 +01:00
John Maddock 1fd5fc12a4 Merge branch 'issue_175' of https://github.com/bkpoon/graph into pr190_integration 2021-04-20 19:14:58 +01:00
jzmaddock 58b6f3640a Merge pull request #202 from jwakely/patch-2
Prevent fallthrough when assertions are not fatal
2021-04-20 19:11:58 +01:00
jzmaddock 63135f59b5 Merge pull request #219 from vadi2/patch-1
Remove extra closing bracket
2021-04-20 19:10:55 +01:00
John Maddock 0c38817632 Merge branch 'develop' of https://github.com/jcelerier/graph into pr234_integrate 2021-04-20 18:59:31 +01:00
jzmaddock 5842a766b6 Merge pull request #236 from Myles1/fix-links
fix graph library user manual links
2021-04-20 18:57:38 +01:00
John Maddock 5f1bbdb941 Merge branch 'use-boost-override' of https://github.com/EugeneZelenko/graph into pr217_integrate 2021-04-20 18:54:20 +01:00
jzmaddock 9b425a037c Merge pull request #191 from valiko-ua/develop
Fixed HTML and other errors in doc/graph_theory_review.html
2021-04-20 10:47:28 +01:00
jzmaddock 2bcd634112 Merge pull request #210 from jaredkhan/patch-1
Fix minor typo in AdjacencyGraph docs
2021-04-20 10:45:22 +01:00
jzmaddock 7cccda8854 Merge pull request #241 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-04-20 10:42:56 +01:00
jzmaddock f4aa9658fe Update build badges. 2021-04-20 10:41:22 +01:00
jzmaddock b3751605e4 Merge pull request #250 from boostorg/update_ci
Update CI.
2021-04-19 17:53:20 +01:00
jzmaddock d63a380343 Add missing #define to drone config. 2021-04-19 15:31:11 +01:00
jzmaddock 46702c45ac More clang versions have broken std lib headers. 2021-04-19 08:43:19 +01:00
jzmaddock 487459712b Change version number to which issue 251 applies. 2021-04-19 08:42:13 +01:00
jzmaddock cb342d159b Correct various CI issues. 2021-04-18 19:12:40 +01:00
jzmaddock b05b379492 Correct CI script and Jamfile. 2021-04-18 10:04:21 +01:00
jzmaddock 099f965f24 Correct path to tests. 2021-04-17 18:43:44 +01:00
jzmaddock d4160d52ba More CI fixes. 2021-04-17 18:38:43 +01:00
jzmaddock 50e9e7a692 Correct CI scripts. 2021-04-17 16:44:40 +01:00
jzmaddock d2ae80b7db Update drone files. 2021-04-17 12:46:04 +01:00
jzmaddock 0cfb1b8895 Update CI. 2021-04-17 12:01:26 +01:00
Edward Diener 493e7b53a5 [skip ci] Add "cxxstd" json field. The "cxxstd" json field is being added to each Boost library's meta json information for libraries in order to specify the minumum C++ standard compilation level. The value of this field matches one of the values for 'cxxstd' in Boost.Build. The purpose of doing this is to provide information for the Boost website documentation for each library which will specify the minimum C++ standard compilation that an end-user must employ in order to use the particular library. This will aid end-users who want to know if they can successfully use a Boost library based on their C++ compiler's compilation level, without having to search the library's documentation to find this out. 2021-01-19 22:42:35 -05:00
Myles1 f0c469b8e6 fix graph library user manual links 2020-12-21 18:39:49 -08:00
Jean-Michaël Celerier bbc499708c Fix compilation on C++20 mode
MSVC standard library has removed std::not1, thus use the C++17 alternative if available
2020-12-14 12:08:04 +01:00
jzmaddock e4e12158e7 Merge pull request #218 from Lastique/fix_deprecated_headers
Fix usage of deprecated headers boost/bind.hpp and boost/detail/iterator.hpp
2020-11-02 15:39:05 +00:00
Peter Dimov 0c9dbd7808 Merge branch 'master' into develop 2020-11-01 16:20:07 +02:00
Peter Dimov 83646b1913 Merge pull request #215 from eldiener/develop
Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74
2020-08-24 14:08:17 +03:00
Vadim Peretokin 56ce18a75d Remove extra closing bracket 2020-05-24 10:13:30 +02:00
Andrey Semashev 1b2c9d8d3f Update usage of deprecated header boost/bind.hpp, add missing includes.
boost/bind.hpp generates compiler warnings about deprecation of placeholders
in the global namespace. Updated to include boost/bind/bind.hpp and
using namespace boost::placeholders;

Also added a few missing includes.
2020-05-11 20:11:06 +03:00
Andrey Semashev f364ee7be2 Removed usage of deprecated header boost/detail/iterator.hpp.
The header was deprecated in favor of <iterator>. It generates compiler
warnings and will be removed in a future release.
2020-05-11 19:59:23 +03:00
Eugene Zelenko 910445584a Use BOOST_OVERRIDE to fix GCC -Wsuggest-override and Clang-tidy modernize-use-override warnings.
Also fix CLang extra-semi, Clang-tidy modernize-deprecated-headers and readability-container-size-empty warnings.
Alphabetical order of C++ headers.
2020-05-09 15:05:13 -07:00
Edward Diener 4149230e27 Corrected fix. 2020-04-08 19:08:47 -04:00
Edward Diener 7f77c3563b Include ctime and use std::time function. 2020-04-03 12:11:43 -04:00
Edward Diener 14c2bf17b4 Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. 2020-03-31 08:36:03 -04:00
Jared Khan ecbd271eb1 Fix minor typo in AdjacencyGraph docs 2020-03-17 16:31:08 +00:00
jzmaddock ca17604dca Update readme with correct bug reporting locations, plus CI badges. 2020-02-09 19:48:38 +00:00
Jonathan Wakely 274a05f630 Prevent fallthrough when assertions are not fatal
When BOOST_DISABLE_ASSERTS or BOOST_ENABLE_ASSERT_HANDLER is defined, the nested switch on `str[1]` can continue past the assert and will fallthrough to the `default` case below.

This can cause warnings with static analysis tools, and if a user-defined `boost::assertion_failed` function that doesn't terminate the process is being used, that function will be called twice because the first assertion falls through to the second.

Inserting a `break` avoids static analysis warnings and avoids potentially calling the assertion handler twice.
2020-01-31 14:48:21 +00:00
jzmaddock 554da2950e Merge pull request #196 from boostorg/develop
Merge develop to master
2020-01-11 13:26:54 +00:00
jzmaddock be1a8fdebc Make example reproducible for CI testing. 2020-01-07 18:23:16 +00:00
Glen Fernandes 2159a9ec62 Make all guard macros BOOST_GRAPH_ prefixed 2019-12-24 19:47:37 -05:00
Peter Dimov 99b9fd190a Merge branch 'master' into develop 2019-12-13 17:20:52 +02:00
Peter Dimov d26f6acc17 Merge commit 'b3f9fa1284702f756ecc6fb3ac8daebffb4f8774' 2019-12-13 17:18:42 +02:00
Peter Dimov dc7b450dea Merge commit 'a7896a7e974e453fdf6122981912c3ddd97f8c41' 2019-12-13 17:17:51 +02:00
Peter Dimov 27a28047d8 Merge branch 'master' into develop 2019-12-13 17:15:47 +02:00
Valentyn Shtronda 7c0a9d2998 One more correction of "Elementary Graph Theory" 2019-12-03 16:13:54 +02:00
Valentyn Shtronda c1803bbb4f Some vertices were omitted 2019-11-27 04:26:23 +02:00
Valentyn Shtronda 545428a4d0 Grammar/formatting 2019-11-27 04:25:30 +02:00
Valentyn Shtronda 53d0e93e43 Added missing parts.
Added parts that seems were lost long time ago during conversion to HTML.
2019-11-27 04:22:38 +02:00
Valentyn Shtronda 1eb8c16a76 Fixed HTML. 2019-11-27 04:17:17 +02:00
Billy K. Poon b9c3b14d39 Second file with forward iterator issue 2019-10-16 15:30:58 -07:00
Billy K. Poon 80b88a32e9 Use boost::first_max_element instead of std::max_element to avoid issue with forward iterator (#175) 2019-10-16 15:30:11 -07:00
jzmaddock ed8b0bb007 travis testing update #2. 2019-08-27 13:23:50 +01:00
jzmaddock 318920a132 travis update. 2019-08-27 09:09:47 +01:00
John Maddock c188da1fac Merge branch 'deprication-and-lint' of https://github.com/anadon/graph into pr171_2 2019-08-26 18:10:02 +01:00
jzmaddock fa6871ef4d Merge branch 'whitespace_and_formatting' of https://github.com/anadon/graph into pr171_2
Resolved Conflicts:
 include/boost/graph/one_bit_color_map.hpp
 include/boost/graph/two_bit_color_map.hpp
2019-08-26 18:09:24 +01:00
Glen Fernandes d3b157f465 Value initialize to not require fill() 2019-08-21 22:52:45 -04:00
jzmaddock 1134c88ee6 Merge pull request #173 from ffosilva/develop
adjacency_list: Fix example broken link
2019-07-14 09:01:08 +01:00
Fábio Silva daec2ee5e0 adjacency_list: Fix example broken link
- family-tree-eg.cpp -> family_tree.cpp
2019-06-09 22:17:43 -03:00
Josh Marshall b6ff20c1a5 Dusting off tests 2019-05-08 18:10:07 -04:00
Josh Marshall d497c3731c This appears to be the one whitespace character change needed to fix everything. 2019-05-05 20:21:47 -04:00
Josh Marshall 66d8827926 Changed clang-format settings from C++11 to C++03 to allow '>>' to '> >' for templates. 2019-05-03 15:37:47 -04:00
Josh Marshall 3fb1a64bd1 Shouldn't have modified the PDFs. 2019-05-02 16:37:09 -04:00
Josh Marshall 8747675e12 Applied clang-format and stripped all trailing whitespace. 2019-05-02 16:31:08 -04:00
jzmaddock b3f9fa1284 Fix links in docs moved from disjoint_sets. 2019-05-02 18:31:24 +01:00
jzmaddock a7896a7e97 Merge pull request #169 from jeking3/ingest-disjoint-sets
Relocate boostorg/disjoint_sets into graph
2019-05-02 18:22:50 +01:00
jzmaddock 8f5e1f1bf9 Merge pull request #164 from boostorg/develop
merge develop to master for release
2019-04-28 14:54:05 +01:00
James E. King III 0978691c1f Integrate boostorg/disjoint_sets into boostorg/graph 2019-04-26 14:42:58 -04:00
James E. King III 5c7e174ae1 Import files from boostorg/disjoint_sets 2019-04-26 14:42:58 -04:00
jzmaddock a2f6aa7317 Merge pull request #168 from tinko92/develop
Fix for a number of broken links.
2019-04-24 18:48:39 +01:00
Tinko Bartels d483524c83 Fix for a number of broken links. 2019-04-24 08:49:53 +02:00
jzmaddock 146f6f7b3d Merge pull request #165 from ahhz/dijkstra_uses_std_plus
Dijkstra uses std::plus
2019-04-17 17:18:30 +01:00
Alex Hagen-Zanker 3a388e5843 Dijkstra uses std::plus
This commit changes the relax function that dijkstra shortest paths uses to only update the distance and predecessor map of the target vertex of each edge. This has the benefit that from now on we can use std::plus as the default combine function.
2019-03-08 17:56:20 +00:00
John Maddock 887e63d34e Merge branch 'develop' of https://github.com/aleden/graph into develop 2019-01-26 09:31:03 +00:00
jzmaddock 15ffe0e5cf Remove comments from examples about them being broken - as they're now fixed. 2019-01-26 09:26:11 +00:00
jzmaddock e694fc7e9e Merge branch 'bucket_sorter' of https://github.com/deinst/graph into develop
Fixed Conflicts:
	example/Jamfile.v2
2019-01-26 09:05:44 +00:00
jzmaddock 338f917cfb Merge branch 'csr-example' of https://github.com/deinst/graph into develop
Fixed Conflicts:
	example/Jamfile.v2
2019-01-26 09:03:55 +00:00
jzmaddock 487347fc08 Add astar_maze.cpp back into the tests. 2019-01-26 08:39:43 +00:00
jzmaddock 36a395a14c Merge branch 'develop' of https://github.com/boostorg/graph into develop 2019-01-26 08:38:19 +00:00
jzmaddock a7a78f0df8 cycle_ratio_example.cpp: adjust tolerance on assert: otherwise we can get random failures. 2019-01-26 08:37:59 +00:00
jzmaddock 32bc0e1dff Modify astar_maze.cpp to not return a dangling reference from random_maze().
See discussion in https://github.com/boostorg/graph/issues/148.
2019-01-26 08:34:54 +00:00
jzmaddock c314b5518b Merge pull request #144 from boostorg/testing-fixup
Fix up tests and examples so that more are tested
2019-01-25 19:01:01 +00:00
jzmaddock 0310bbee74 Add maximum weighting matching to the table of contents. 2019-01-23 19:34:20 +00:00
jzmaddock ac0a340d0b maximum_weighted_matching: change initialization order to suppress GCC warnings. 2019-01-23 19:30:42 +00:00
John Maddock 4d45af8b80 Merge branch 'develop' of https://github.com/yi-ji/graph into develop 2019-01-23 17:40:05 +00:00
David Einstein 4e270bd62b Fix bucket_sorter example. Bug #151
Changed ID toidentity_property_map.
Added concept check to bucket_sorter.hpp.
Fixed minor grammar nits.
2019-01-22 14:25:42 -05:00
jzmaddock 1dfbbe2a16 Don't test adj_list_invalidation.cpp - it deliberately creates graphs in an invalid state which runtime-crash. 2019-01-22 19:18:08 +00:00
John Maddock 32087dd0b6 Merge branch 'develop' into testing-fixup 2019-01-22 19:03:28 +00:00
jzmaddock ee71134160 Merge pull request #154 from CromwellEnage/doc_stl_links
Documentation cleanup
2019-01-22 18:05:43 +00:00
jzmaddock a0d87b4467 Merge pull request #138 from CromwellEnage/min_degree_empty
Fix minimum_degree_ordering
2019-01-22 17:59:52 +00:00
CromwellEnage bf217327df Documentation cleanup
Replace links to Hewlett Packard's retired Silicon Graphics STL website.
2019-01-21 16:09:17 -05:00
Cromwell D. Enage aa7f76d79d Merge with boostorg/graph 2019-01-21 16:07:19 -05:00
David Einstein 002c56a108 Make csr-example compile
github bug #150 for boost/graph
Changed write_graphviz to write_graphviz_dp to handle dynamic properties
2019-01-20 20:52:52 -05:00
jzmaddock 12be045f8d Merge branch 'develop' into testing-fixup 2019-01-16 18:15:35 +00:00
jzmaddock 1324532d83 Merge pull request #152 from CromwellEnage/parameter_usage
Fix regressions & update .yml scripts
2019-01-16 18:13:54 +00:00
yi-ji 04f8155cbb [CI SKIP] update bibliography for max weighted matching labeling procedure 2018-12-23 01:32:23 +09:00
CromwellEnage d73f1d2a76 Fix regressions & update .yml scripts
<boost/graph/named_function_params.hpp>
* Original fix worked only when one boost::parameter::keyword was bound and passed in.  This fix now works when binding and passing in one or more boost::parameter::keyword objects.

<boost/graph/isomorphism.hpp>
* Make isomorphism_impl a metafunction that returns the function object result_type for the fix to work.

"test/isomorphism.cpp"
* Test the fix with two boost::parameter::keyword objects.

".travis.yml"
"appveyor.yml"
* Update as per Peter Dimov's message announcing the merging of CMake into boostorg/develop.
2018-12-19 23:32:51 -05:00
jzmaddock 32a83a7479 Add notes to examples that are outdated and either crash or do not compile. 2018-12-18 18:35:20 +00:00
jzmaddock e2851a6b8c Disable one more example which segfaults under VC12, correct file handling in graphviz.cpp. 2018-12-18 13:22:49 +00:00
jzmaddock cec1b39f43 Fix up paths to .dot files so they can be used in the tests. 2018-12-17 18:57:50 +00:00
jzmaddock 0048ae1b7e Remove reference to deleted file. 2018-12-16 20:12:07 +00:00
jzmaddock 972f3c49d0 Fix examples that don't build and/or run, rationalize Jamfile.v2 to place them all in alphabetical order, run those that can be run, and document those that are terminally broken. 2018-12-16 18:53:35 +00:00
jzmaddock 40f15af259 Add more untested files to Jamfile.v2. 2018-12-16 10:33:57 +00:00
jzmaddock 0157743b8e Add filter_graph_vp_test.cpp to Jamfile.v2. 2018-12-16 10:19:48 +00:00
jzmaddock 31375672d7 Include csr_graph_test.cpp in Jamfile.v2 2018-12-16 10:17:23 +00:00
jzmaddock 977560b917 Remove adj_list_test.cpp as it could never be portably run, replace with updated version of graph_type.hpp which tests all the same permutations that adj_list_test.cpp was intended to handle. Update Jamfile.v2 to run all the permutations. 2018-12-16 10:10:04 +00:00
CromwellEnage 1b177b75a8 Consolidate variable declaration & definition 2018-12-16 01:19:35 -05:00
jzmaddock 44663dd46f Suppress msvc warnings, add adj_list_invalidation.cpp to tests and fix buggy #include. 2018-12-15 18:34:41 +00:00
CromwellEnage 48af7e0237 Merge branch 'min_degree_empty' of https://github.com/CromwellEnage/graph into min_degree_empty 2018-12-15 11:34:41 -05:00
Cromwell D. Enage 833589ebdf Merge with boostorg/graph 2018-12-15 11:30:23 -05:00
jzmaddock 174ed2ed11 Merge pull request #137 from CromwellEnage/parameter_usage
Fix compiler errors
2018-12-15 15:50:00 +00:00
CromwellEnage f234920446 Merge branch 'parameter_usage' into min_degree_empty 2018-12-14 12:20:59 -05:00
CromwellEnage 8a2381f9c2 Fix memory access violations
Algorithms affected: astar_search and random_spanning_tree
2018-12-14 12:20:12 -05:00
CromwellEnage d81e8612d3 Fix memory access violations
Algorithms affected: boyer_myrvold_planar_test, maximum_adjacency_search, stoer_wagner_min_cut
2018-12-13 15:25:05 -05:00
CromwellEnage 0201705aa3 Fix memory access violations in boyer_myrvold_planar_test 2018-12-12 17:59:01 -05:00
CromwellEnage cb8e9738b6 Merge branch 'parameter_usage' into min_degree_empty 2018-12-11 22:47:55 -05:00
CromwellEnage 9aff046cb5 Split jobs
Reduce chances of timeout errors.
2018-12-11 22:47:30 -05:00
Anthony Eden f2bd3d1be7 couldn't infer unused template argument 2018-12-11 15:10:09 -05:00
CromwellEnage ec34a721b3 Merge branch 'parameter_usage' into min_degree_empty 2018-12-11 14:04:59 -05:00
CromwellEnage 91291eab78 Revert unnecessary changes & update test suite
<boost/graph/named_function_params.hpp>
* Revert unnecessary changes.

"test/Jamfile.v2"
* Add alias statements to deal with xcode compile failures stemming from Boost.Filesystem.
* Mark regressions as expected.

"travis.yml"
* Remove xcode6.4 from test suite since Travis Cl deprecated it.
* Add xcode9.4.1 to test suite.
2018-12-11 13:58:52 -05:00
CromwellEnage df1d52790c Fix minimum_degree_ordering
Handle degenerate case where input graph contains no edges.
2018-11-23 01:18:28 -05:00
CromwellEnage 484ccb08c9 Revert unnecessary changes 2018-11-23 01:07:43 -05:00
CromwellEnage b3cefefb76 Revert unnecessary changes 2018-11-23 01:00:03 -05:00
CromwellEnage a62de4ae41 Revert unnecessary changes
<boost/pending/bucket_sorter.hpp>
"example/Jamfile.v2"
* Revert

"test/Jamfile.v2"
* Remove <preserve-target-tests>off
2018-11-23 00:58:30 -05:00
CromwellEnage 52978e2ac1 Fix test/Jamfile.v2
Mark msvc-14.0 failures as expected.
2018-11-21 02:17:57 -05:00
CromwellEnage 392b280fc7 Revert test suite
...but also remove "sudo: false" from .travis.yml because Travis Cl just deprecated it.  (See <https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures>.)
2018-11-20 16:38:51 -05:00
CromwellEnage 038fe2890a Fix test suite
Mark ICE failures as expected for correct test configurations.
2018-11-16 18:57:15 -05:00
CromwellEnage c1e69486d6 Update test suite
Mark ICE failures as expected.
2018-11-16 17:46:58 -05:00
CromwellEnage 6a46e45fee Fix compiler errors
<boost/pending/bucket_sorter.hpp>
* Work around OSX implementation of iterator copy constructor defined in private scope.

<boost/graph/named_function_params.hpp>
* Use typename add_const<remove_reference<typename T::value_type>::type>::type vice const typename T::value_type within boost::parameter::aux::tagged_argument type definition.
* Use boost::mpl::has_key vice boost::detail::parameter_exists.
* Add missing boost::graph::[function_name] overload defintion that takes in ArgumentPack as the last parameter.

"example/Jamfile.v2"
* Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY=0 where applicable to suppress generation of exponential boost::parameter::parameters::operator() overloads and prevent ICE failures.

"test/Jamfile.v2"
* Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY=0 where applicable to suppress generation of exponential boost::parameter::parameters::operator() overloads and prevent ICE failures.
2018-11-16 14:23:38 -05:00
yi-ji d05622a677 [CI SKIP] documentation for maximum weighted matching 2018-11-16 01:09:22 +09:00
jzmaddock f7dfafb5af Merge pull request #128 from ZaMaZaN4iK/develop
Fix typo in the documentation
2018-11-05 18:24:56 +00:00
Alexander Zaitsev 741bff6b7c Fix typo in the documentation 2018-11-05 00:52:48 +03:00
jzmaddock 023bca04f6 Merge pull request #121 from kenkangxgwe/develop
Fix the copy constructor of the subgraph.
2018-11-01 18:07:44 +00:00
jzmaddock c731e2a29c Split gcc-6 tests into 2 blocks to prevent timeouts. 2018-11-01 17:59:34 +00:00
yi-ji 4f937d1617 Name VERTEX_STATE to anonymous enum; change brute-force verification to pre-computed answers comparison 2018-10-24 22:35:26 +09:00
康小广 5d17aeb1ae Fix the copy constructor of the subgraph.
In the previous version, the children and their properties are not copied correctly.
Please see the test case.
2018-10-18 03:06:14 -04:00
jzmaddock fa7fe4d622 Merge pull request #115 from pavelkryukov/gcc8
Fix G++8 warnings: catch by reference and unused variables
2018-10-17 18:38:49 +01:00
jzmaddock b27d731c1e Merge pull request #83 from e-kwsm/exterior
fix comments about boost::detail::vector_matrix
2018-10-17 18:38:11 +01:00
jzmaddock 8f11f4b51f Merge branch 'develop' of https://github.com/boostorg/graph into develop 2018-10-15 13:36:57 +01:00
jzmaddock 8934754552 Reduce clang testing load as tests time out. 2018-10-15 13:36:43 +01:00
jzmaddock f30f9ca2b3 Merge pull request #101 from DanielaE/fix/no-iterator-inheritance
Inheriting std::iterator is deprecated in C++17
2018-10-15 08:34:53 +01:00
jzmaddock 6bfc5b5b79 Change fibonacci_heap.cpp to use <random> where possible - not all versions of std::shuffle work with Boost's rng's. 2018-10-15 08:33:54 +01:00
jzmaddock 8c7ea35cc8 Testing 4 std versions in one go takes too long - reduce to 2 or 3 at a time. 2018-10-15 08:23:22 +01:00
jzmaddock 9cc83d86d8 Merge branch 'develop' of https://github.com/boostorg/graph into develop
Resolved Conflicts:
	example/astar_maze.cpp
	example/gerdemann.cpp
2018-10-14 13:43:54 +01:00
jzmaddock d51ba76e20 Include examples in tests -
Fix C++17 build errors in examples.
Disable some examples that use Unix-ism's from building on other platforms.
2018-10-14 13:40:56 +01:00
jzmaddock 38b65d2afd Merge pull request #99 from pavelkryukov/patch-2
Remove deprecated std::unary_function and std::binary_function from examples
2018-10-14 08:47:59 +01:00
jzmaddock 948eb2455a Merge branch 'fix/replace-deprecated-allocator-members' of https://github.com/DanielaE/boost.graph into develop
Resolved Conflicts:
	include/boost/graph/r_c_shortest_paths.hpp
2018-10-14 08:45:04 +01:00
Peter Dimov bdccbcdde2 Merge pull request #120 from boostorg/pr/move-graph_test
Move graph_test.hpp to test/ to avoid a dependency on Boost.Test
2018-10-14 08:02:28 +03:00
yi-ji 650291caf6 remove decltype of anonymous enum; decrease test time 2018-10-14 10:09:46 +09:00
jzmaddock affdd15565 Merge pull request #94 from jedrezej/subgraph_docs_fix
Fix subgraph usage example in the documentation.
2018-10-13 08:38:58 +01:00
jzmaddock 462d4bbc9b Merge pull request #108 from mywtfmp3/fix-type-error-in-example
fix type error in grid graph example
2018-10-13 08:38:03 +01:00
jiyi 10242dd583 decrease test batch size to avoid travis-ci timeout 2018-10-13 16:34:17 +09:00
jiyi 71f544d41d O(n^3) maximum weighted matching 2018-10-13 13:10:23 +09:00
jiyi 79b32f5d6e some examples for maximum weighted matching 2018-10-13 13:10:23 +09:00
jiyi 5fd3b3d078 tests for maxmimum weighted matching using brute-force verifier 2018-10-13 13:10:23 +09:00
jiyi 400eed8f02 Maximum weighted matching of O(n^4) time complexity, with brute-force verifier 2018-10-13 13:10:23 +09:00
Pavel I. Kryukov 3d737c34af Fix G++8 warnings: catch by reference and unused variables 2018-10-12 23:11:07 +03:00
Peter Dimov 5809e70e60 Move graph_test.hpp to test/ to avoid a dependency on Boost.Test 2018-10-12 22:15:17 +03:00
jzmaddock 48aff2213e Merge pull request #107 from mywtfmp3/fix-typo
fix typos
2018-10-12 19:15:19 +01:00
jzmaddock 084e55f5d5 Merge pull request #109 from katrinleinweber/resolve-DOIs-securely
Hyperlink DOIs against preferred resolver
2018-10-12 18:41:29 +01:00
jzmaddock a01537012d Reinstate assert in subgraph.hpp.
Refer to discussion in https://github.com/boostorg/graph/pull/101
Original PR was https://github.com/boostorg/graph/pull/80.
2018-10-12 18:32:08 +01:00
jzmaddock b7c9394c22 Merge branch 'develop' of https://github.com/anadon/graph into develop
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2018-10-12 17:58:56 +01:00
Peter Dimov 1e2a8ccf03 Merge pull request #119 from boostorg/feature/mpi-include
Include graph_parallel headers through a BOOST_GRAPH_MPI_INCLUDE macro
2018-10-09 06:20:19 +03:00
Peter Dimov 0d56559460 Avoid including an mpi header in property_serialize.hpp 2018-10-08 01:34:25 +03:00
Jeremiah Willcock 6f9a4a9468 Changed property lookup code to simplify graph implementations (remove most special-casing of bundled properties), made CSR graph work with non-bundled properties (probably), split named parameter algorithms to not use property map code
[SVN r77549]
2018-10-08 01:34:25 +03:00
Jeremiah Willcock 0fcc4dd80e Fixed warnings
[SVN r57559]
2018-10-08 01:34:25 +03:00
Jeremiah Willcock 0a0b58c6bb Merged headers and source files (but not examples, tests, or docs) from Parallel BGL
[SVN r52300]
2018-10-08 01:34:25 +03:00
Douglas Gregor 785306781f Adjacency list serialization fixes, from David Keller
[SVN r36838]
2018-10-08 01:34:25 +03:00
Douglas Gregor dd85022178 boost/pending/property_serialize.hpp: - Moved serialization code here
boost/pending/property.hpp:
  - From here

boost/graph/adj_list_serialize.hpp:
  - Include the new property_serialization header

[SVN r32275]
2018-10-08 01:34:25 +03:00
Peter Dimov 5f1edca51c Include graph_parallel headers through a BOOST_GRAPH_MPI_INCLUDE macro to hide them from boostdep 2018-10-06 19:03:11 +03:00
Peter Dimov 6039d918eb Re-add g++-4.6 to Travis 2018-09-30 02:57:44 +03:00
Josh Marshall 183a67fdc4 Merge branch 'boostorg-develop' into develop 2018-09-29 19:45:29 -04:00
Josh Marshall d31aa184af Rebasing to new develop 2018-09-29 19:44:58 -04:00
Peter Dimov 878d6f6b22 Fix xcode configs (8.2, 8.1, 8.0 don't exist, were interpreted as default (9.4) 2018-09-29 18:26:26 +03:00
Peter Dimov a65f604d54 Deprecate relaxed_heap.hpp, do not test (fails on g++-8) 2018-09-29 17:20:25 +03:00
Peter Dimov 23b26724c2 Merge pull request #118 from apolukhin/antoshkka/visibility-issues
fix visibility of exceptions within Boost.Graph
2018-09-29 17:14:43 +03:00
jrmarsha 2e54007e75 Merge pull request #6 from apolukhin/antoshkka/visibility-issues
Antoshkka/visibility issues
2018-09-29 10:05:34 -04:00
Peter Dimov 80806fdfb7 Enable Travis testing of feature branches 2018-09-29 16:50:59 +03:00
Josh Marshall 5dd748307c Realized the while loop in reindex_edge_list(), and so changed this. 2018-09-28 09:47:26 -04:00
Josh Marshall 5d6c7f6695 Reverting a block comment removal at jzmaddock's request. 2018-09-25 09:59:16 -04:00
Antony Polukhin ab9299f9c6 fix visibility of exceptions within Boost.Graph 2018-09-25 11:05:31 +03:00
Josh Marshall 5d0f5a6b03 Clang had some helpful warnings about typename usage which were applied. 2018-09-22 22:03:15 -04:00
Josh Marshall 9cfddda9cf I don't recall messing with these to make them auto, but they were auto. I've still been unable to reproduce the TravisCI errors, but this should still bring this branch closer to merging. 2018-09-22 21:25:21 -04:00
Josh Marshall 21bdac5709 Silencing some build warnings about a trivial faux pas 2018-09-14 14:45:11 -04:00
Josh Marshall 6808062c07 First possible complete fixes for r_c_shortest_paths. 2018-09-11 17:00:43 -04:00
Josh Marshall a10f17eb99 Made typename fixes more broad and complete. 2018-09-11 17:00:05 -04:00
Josh Marshall 8551039ae3 Learned more of how typename works, changed to using that. 2018-09-08 03:02:13 -04:00
Josh Marshall 3cc890e854 Changing c++11 auto type usage to delctype() boilerplate in order to allow compatability with C++03. This has only been tested locally, and this is being uploaded to test aginst the automated test suite. 2018-09-07 00:03:57 -04:00
Josh Marshall 037af4db54 Fixing incorrect use of typedef's via macro. 2018-09-06 10:06:07 -04:00
Josh Marshall 82fa79e783 Inappropriate overuse of 'typename' removed. 2018-09-05 14:35:26 -04:00
Josh Marshall 283675d792 Use of nullptr when it is too soon to include that feature. 2018-09-05 14:33:43 -04:00
Pavel I. Kryukov 2f430a19e1 Remove deprecated code from examples
std::unary_function and std::binary_function were
removed in C++17 and are no longer available
while compiling with MS Visual Studio 2017
2018-09-02 14:05:50 +03:00
Josh Marshall 98164bf937 Removed dead code/comment block from iteration macros. 2018-09-01 17:59:02 -04:00
Josh Marshall 19c23ca255 Removing references and testing to relaxed heap; relaxed heap is now marked as depreciated. This is due to some testing failures and a lack of use of relaxed_heap. 2018-09-01 14:51:42 -04:00
jzmaddock 4aaf5307db CI: disable toolsets that fail for reasons unconnected to us.
[CI SKIP]
2018-09-01 13:05:23 +01:00
jzmaddock f36a7bab16 Touch travis.yml. 2018-09-01 09:39:12 +01:00
jzmaddock 458594d43a Add better Appveyor and Travis support. 2018-09-01 09:03:11 +01:00
Josh Marshall 84122c8049 Fixed an incorrect file name in tests and added a git ignore for generated testing files. 2018-08-31 23:53:45 -04:00
jrmarsha c0450496a8 Merge pull request #5 from anadon/fix-add-vertex-subgraph
Getting together PR's for first batch of merges.
2018-08-31 22:07:36 -04:00
jrmarsha 19dd94ee70 Merge pull request #4 from boostorg/develop
Updating development branch that I'm merging to.
2018-08-31 22:03:34 -04:00
jrmarsha e2f742d584 Merge pull request #2 from asomers/develop
Creating first batch merge for well formed bug fixes.
2018-08-31 21:58:43 -04:00
jrmarsha 03b6e8acd6 Merge pull request #3 from raahlb/fix_remove_vertex
Creating first batch of merges for well formed bug fixes.
2018-08-31 21:58:28 -04:00
jrmarsha a499be87cb Merge pull request #1 from pmateusz/develop
Creating first batch merge to bring in well formed bugfixing pull requests.
2018-08-31 21:58:08 -04:00
Rasmus Ahlberg e8d7c9fe9b Added test case for removing edges bug from previous commit. 2018-08-23 16:22:06 +02:00
Rasmus Ahlberg e2db737d1b Don't copy value if not needed, as source's m_property will be set to null when copied.
See https://svn.boost.org/trac10/ticket/13544.
2018-07-30 12:15:25 +02:00
Katrin Leinweber 94b4c662f8 Hyperlink DOIs against preferred resolver 2018-06-24 08:17:22 +02:00
John Zhang bcc8ed65b5 fix type error in grid graph example 2018-05-15 11:55:21 +08:00
John Zhang 30d0faa665 fix typos 2018-05-12 13:27:24 +08:00
Daniel James 815268534f Merge remote-tracking branch 'origin/develop' 2018-04-15 21:38:19 +01:00
Daniel James cb43ad3a45 Merge commit 'c48c80f51fca0cad8b654135a5940a5a33bbc571'
Everything up to this commit is already in master, apart from a minor
whitespace change.
2018-04-15 21:37:04 +01:00
Daniela Engert 32d5b35e2e Most members of std::allocate are deprecated in C++17
Replace them by their cousins from std::allocator_traits. Without that, heaps of deprecation warnings will fall onto humble users when compiling with MSVC 15 in C++17 mode.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-04-14 18:14:41 +02:00
Daniela Engert 93cfa18f3d Inheriting std::iterator is deprecated in C++17
Boost's iterator.hpp is deprecated, too. Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-04-14 18:11:05 +02:00
Daniel James 4c752ee2f1 Use std::mt19937 where available
In C++17 mode, libc++'s `std::shuffle` isn't compatible with Boost's random
generators because the `min` and `max` functions aren't `constexpr`, so use
`std::mt19937` instead. This might not be required if boostorg/random#24 is
accepted.
2018-04-13 15:43:38 +01:00
Daniel James e0b46b934e Merge pull request #102 from hlynurf/develop
Fix typos
2018-04-13 13:33:02 +01:00
Daniel James 1643881cac Merge pull request #98 from jwakely/patch-1
Fix typo
2018-04-13 13:29:15 +01:00
Daniel James 98899a640a Merge pull request #105 from danieljames/fix-argument-type
Remove reference from argument_type
2018-04-13 13:22:12 +01:00
Daniel James a651ecf6ab Merge pull request #85 from Flast/patch-1
Qualify calling of as_const.
2018-04-13 13:21:59 +01:00
Denis Davydov da6e2b5efb fix missing header (#104) 2018-04-04 00:22:47 +01:00
Daniel James 85b3f9746a Merge pull request #104 from davydden/fix_missing_header
fix missing header
2018-04-04 00:21:43 +01:00
Daniel James 50dcb5528d Remove reference from argument_type
The reference was added in pull request #89. It causes a regression of gcc 4.4
in C++98 mode.
2018-03-31 14:10:40 +01:00
Denis Davydov a5ff4ea80e fix missing header 2018-03-31 10:38:10 +02:00
Eric Niebler 2a9ef82c35 Merge pull request #103 from smeenai/develop
Fix friend declarations for iterator_core_access
2018-03-01 12:24:44 -08:00
Shoaib Meenai 07e902d8e7 Fix friend declarations for iterator_core_access
csr_out_edge_iterator and csr_in_edge_iterator are part of the
boost::detail namespace, so they need to explicitly qualify
iterator_core_access in their friend declarations. Note that
csr_edge_iterator already gets this correct.
2018-02-28 15:45:10 -08:00
hlynurf bbb74d5a71 Fix typos 2018-01-03 12:26:45 +00:00
Jonathan Wakely 58f550a361 Fix typo 2017-09-06 16:46:05 +01:00
Alan Somers 726e9530d6 Replace /bin/bash with /bin/sh
/bin/bash is a Linuxism.  /bin/sh is portable, and this script isn't
using any bash-specific features.
2017-07-27 14:34:07 -06:00
Jedrzej Solecki 2999dc735b Fix subgraph usage example in the documentation.
Make the docs match the example.
2017-07-13 09:33:52 -07:00
Mateusz Polnik 67a32c26b2 Fix read/writes outside allocated memory. Remove is_valid assertions - explain a scenario where they do not work correctly. 2017-07-04 23:26:54 +01:00
Mateusz Polnik faef224193 Reproduce memory issue with resource constrained shortest paths. Valgrind confirms reads/writes outside allocated memory. 2017-07-04 23:26:54 +01:00
Andreas Scherer 74115a2a1e Compile the SGB examples. (#87)
Works fine with c++11, thanks!

System: (K)Ubuntu 16.04 LTS
Compiler: g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Try to 'g++ -c' the four SGB examples girth.cpp, miles_span.cpp,
roget_components.cpp, and topo-sort-with-sgb.cpp.

(1) SGB 2002-01-30 changed the 'Associated Press scores' from 'ap0' and
'ap1' to 'ap'. This preprocessor macro (sic!) collides with numerous
function parameters in 'named_function_params.hpp'. '#undef'ining the
macro doesn't break the BGL examples.

(2) girth.cpp fails because of a missing 'null_vertex()' function.

(3) roget_components.cpp invokes 'strncmp()' from the C library.

(4) topo-sort-with-sgb.cpp hickups because of a missing 'vertices()'
function. Following roget_components.cpp and putting the collective
SGB header up front fixes this.
2017-05-26 18:00:45 -06:00
Nik Reiman eda383e91d Fix compiler error with release builds on VS2015 (#84)
When using MSVC compiler optimization, using param_not_found() causes
compiler error C4172: returning address of local variable or temporary
2017-05-26 15:34:07 -06:00
Daniela Engert 9886e3fef2 Conditionally replace deprecated/removed C++98 std::bind1st by std::bind, std::auto_ptr by std::unique_ptr, and std::random_shuffle by std::shuffle. (#89)
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-05-26 15:04:34 -06:00
Murray Cumming 9697b20826 astar_search: Remove unused variable. (#90)
To avoid a compiler warning.
2017-05-26 13:53:02 -06:00
Andreas Scherer 87bf61ced3 Fix typos. (#88)
* Fix typos.

A quick check with 'aspell -c -l en_US'.

* Fix some more typos.

* More typos fixed.
2017-05-26 13:45:40 -06:00
Kohei Takahashi a45e3de9b7 Qualify calling of as_const.
It is ambiguous with upcoming standardized `std::as_const`.
2017-02-04 13:27:07 +09:00
E Kawashima 9757b9e44c fix comments about boost::detail::vector_matrix 2016-11-07 21:36:55 +09:00
K. Noel Belcourt ac70119f9f Make example file names consistent. 2016-11-05 13:14:55 -06:00
K. Noel Belcourt bc21e6426e Rename files so easier to find expected output. 2016-11-05 13:13:27 -06:00
K. Noel Belcourt b6594e17e7 Fix typo. 2016-11-05 13:11:40 -06:00
K. Noel Belcourt c88a459d8c Use consistent naming convention for related files. 2016-11-05 13:11:40 -06:00
K. Noel Belcourt 00ad80ec84 Fix typename outside of template, use consistent naming convention
for source file and expected results file.
2016-11-05 12:37:30 -06:00
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
E Kawashima c48c80f51f Fix dead links (#79) 2016-11-02 08:51:15 -06:00
Stefan Hammer f07d91397c [subgraph.hpp] add_vertex(u_global, g) on a subgraph does not recursively add to parent subgraphs 2016-11-02 11:02:39 +01:00
Jakob Lykke Andersen cf6e8efdf4 VF2, fix assumption that index maps are default constructible. (#27) 2016-10-31 20:10:23 -06:00
K. Noel Belcourt db0f694531 Update meta data. 2016-10-31 19:03:02 -06:00
Murray Cumming d4ae9d1e3f 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-10-31 16:43:12 -06:00
K. Noel Belcourt f3939dcef2 Fix uninitialized variable. 2016-10-31 15:54:33 -06:00
K. Noel Belcourt af40fc7f8c Remove unused typedef. 2016-10-31 15:47:50 -06:00
K. Noel Belcourt 3d5d6b70f1 Fix a tautological compare warning with clang on mbp. 2016-10-31 15:44:42 -06:00
K. Noel Belcourt 2f18f795a2 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-10-31 15:41:30 -06:00
K. Noel Belcourt 10a5b5182f Remove unwanted side effect from add_edge call. 2016-10-31 15:36:34 -06:00
K. Noel Belcourt a915aa0ade Silence uninitialized variable warning. 2016-10-31 15:31:52 -06:00
K. Noel Belcourt 090527e0fd Fix unused variable warning. 2016-10-31 15:29:28 -06:00
K. Noel Belcourt d396eb771e Fix duplicate quick_tour build target. 2016-10-31 14:18:05 -06:00
E Kawashima b48a9cd5a4 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-10-31 14:10:45 -06:00
E Kawashima 8b5d16c7b0 doc/subgraph.html: fix typo (#76) 2016-10-31 14:06:12 -06:00
akumta f5bc5e8504 update for ticket #12526 (#77)
Thanks for the patch.
2016-10-31 14:05:52 -06:00
Matt Barr 387bcb3d72 Add degree to reverse_graph (#78)
degree is required for BidirectionalGraphConcept.
Also adds the concept check to the reverse_graph unit test.
2016-10-31 14:03:54 -06:00
Maël Valais f3b89e9f19 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-10-31 13:22:40 -06:00
Murray Cumming 8dd8cd945e 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-10-31 13:21:10 -06:00
Murray Cumming 8f15303620 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-10-31 13:20:27 -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 0d3be12b42 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-08-09 19:51:39 -06:00
K. Noel Belcourt 54589358a4 Disable csr_graph_test until can work through lack of c++11 support. 2016-07-24 13:41:26 -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
Murray Cumming 2f8b0897aa bc_clustering: Remove an unused typedef. (#66)
Thanks.
2016-07-16 17:08:04 -06:00
Murray Cumming a9c0fa9495 Make files not executable. (#69)
See https://github.com/boostorg/admin/issues/47
2016-07-16 17:05:54 -06:00
Nicholas Matteo 2f257fa083 Fix typos (#70)
Thanks!
2016-07-16 17:04:30 -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
Murray Cumming e24fe39546 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-14 18:13:57 +03:00
Murray Cumming e4aa48bc4b tree_traits: Add include for boost::tie().
This lets examples/graph_as_tree compile.
2016-07-14 18:10:16 +03: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
Maël Valais 15872fe070 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-05-02 11:11:23 -06:00
Justin Viiret 976e524b59 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-05-01 17:52:37 -06:00
K. Noel Belcourt ded3042cd2 Eliminate unused variable, regularize formatting. 2016-05-01 16:17:47 -06:00
K. Noel Belcourt 677ba4b1e6 Remove unused member variable. 2016-05-01 16:14:28 -06:00
K. Noel Belcourt 400e8b5904 Fix a stack variable bound to member reference, a concept
checking variable that was unused triggering a warning,
and a documentation typo.
2016-05-01 16:06:24 -06:00
coderakki 06f304656c Update kamada_kawai_spring_layout.hpp (#53) 2016-05-01 15:42:15 -06:00
Alexander Lauser ee8b7c377d 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-05-01 14:00:19 -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
K. Noel Belcourt 08453c109a Revert "removed an unused function (#39)"
This reverts commit 655ce30eb3.
2016-04-26 10:54:43 -06:00
Mads Jensen 655ce30eb3 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-04-24 10:26:25 -06:00
K. Noel Belcourt a61ae7153e Fix unused variable warning. 2016-04-23 22:25:57 -06:00
K. Noel Belcourt 6fc1f4a924 Quiet an unused variable warning. 2016-04-23 22:17:49 -06:00
sehe 73136fa215 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-04-23 20:08:52 -06:00
felix 89b694c3f5 use graph_traits to access *_category types of a Graph (#54)
Tested with El Capitan and clang-darwin, thanks!
2016-04-23 16:31:01 -06:00
Arne B b2526fbd16 Fixes bug 10449 (#57)
Without this patch it is not possible to call the copy constructor of directed_graph
2016-04-23 16:15:42 -06:00
E Kawashima 12737ab552 fix typo in document of subgraph (#62)
Thanks!
2016-04-23 16:13:49 -06:00
Jakob Lykke Andersen 50bfd8dad0 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-04-23 12:27:51 -06:00
Jared Grubb 06f9e27fdf Fix Ticket #11133: Graph: using 'nil' as a local variable (#34)
Looks good, thanks.
2016-04-22 12:14:16 -06:00
Louis Dionne d84651c9ad [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-04-21 20:41:16 -06:00
Jakob Lykke Andersen 05dc4222ee Doc: remove IncidenceGraph requirement from AdjacencyGraph. (#28)
Thanks for the fix, it's good to have to documentation reflect the actual code.
2016-04-21 20:37:31 -06:00
Daniel J. H d69fcd93c5 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-04-21 20:12:22 -06:00
Noel Belcourt 702c1110ad Merge pull request #44 from silolis/silolis-doc-patch-1
Fix doc spelling
2016-04-21 20:09:59 -06:00
Vladimir Prus 6197b9c549 Add missing include of <list>.
Thanks to Amit Prakash Ambasta for the report.
2015-12-07 13:55:07 +03:00
marcinz 8cad3dfa4b Merge pull request #42 from jzmaddock/patch-2
Remove depricated type_traits usage.
2015-10-23 09:11:18 -04:00
marcinz daa2e69db1 Merge pull request #46 from aschnell/patch-1
fixed typo
2015-10-23 08:50:19 -04:00
Arvin Schnell 6a559d3b73 coding style 2015-10-23 14:25:08 +02:00
Arvin Schnell b31f6de077 fixed typo 2015-10-23 14:15:57 +02:00
jzmaddock 1d5f43d9f6 Remove depricated type_traits usage. 2015-07-21 18:54:48 +01:00
Noel Belcourt 7c95f6ebcd Merge pull request #26 from faithandbrave/patch-3
breadth_first_search doc : fix figure number
2015-07-21 11:00:27 -06:00
Noel Belcourt 3921923880 Merge pull request #25 from faithandbrave/patch-2
add_edge doc : fix minor mistake
2015-07-21 11:00:06 -06:00
Ola Nilsson 66f5121309 Fix doc spelling 2015-07-09 11:32:04 +02:00
Ahmed Charles dfe2156c16 Match concept_def.hpp and concept_undef.hpp. 2015-05-21 10:37:26 +03:00
Noel Belcourt 7492a04210 Merge pull request #37 from atombrella/master
no need for executable flag on source files
2015-05-18 11:30:29 -06:00
Noel Belcourt 60fcab11ca Merge pull request #36 from atombrella/doc_fix
Doc fix
2015-05-16 13:36:58 -06:00
Noel Belcourt 4aa40f807a Merge pull request #33 from MarcelRaad/patch-1
Fix MSVC14 compile break
2015-05-14 19:43:03 -06:00
Mads Jensen 3c25ef6717 Typo in Misra name 2015-05-12 20:45:09 +02:00
Mads Jensen c0b8ef85fb documentation fix for "allow_parallel_edge-_tag" 2015-05-12 11:10:30 +02:00
Marcel Raad 0fc1749bd7 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.
2015-03-02 18:47:19 +01:00
Mads Jensen b326f2cdb6 no need for executable flag on source files 2015-01-31 23:00:53 +01:00
Akira Takahashi 69db10b6ef breadth_first_search doc : fix figure number
BFS Figure number is 6.
2014-12-16 15:11:59 +09:00
Akira Takahashi 56a9c5e5c3 add_edge doc : fix minor mistake
s/member function/non-member function/
2014-12-11 17:40:18 +09:00
K. Noel Belcourt 2573fbb9f0 Fix warning on const return by value. 2014-11-20 12:17:23 -07:00
K. Noel Belcourt ffb6218f07 Fix uninitialized variable by setting to null_vertex.
Thanks to Lu Wang for reporting this.
2014-11-18 20:14:26 -07:00
Noel Belcourt 8c7c546942 Merge pull request #22 from mikael-s-persson/bugfix/ticket-10382-simplified-edge-move-copy
Simplified the stored-edge move and copy
2014-11-16 15:33:46 -07:00
K. Noel Belcourt 9d35801154 Add new strong components test to Jamfile from Alex Lauser.
Remove long unused file.
2014-11-11 21:02:19 -07:00
Noel Belcourt efa9fbd904 Merge pull request #15 from gatlex/bugfix/ticket-10222-root-map-broken
Fixed bug 10222.

I'll go ahead and add the test to the Jamfile, thanks for the test.
2014-11-11 20:57:50 -07:00
K. Noel Belcourt 713ee03efc 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.
2014-11-11 12:37:56 -07:00
K. Noel Belcourt 441edc8e1c Fix macro logic for gcc 5, thanks to Alex Lauser
for pointing this out.
2014-11-11 12:18:44 -07:00
Alexander Lauser 9cd237093c Cleaned up the strong-components test. 2014-11-11 11:09:39 +01:00
Alexander Lauser 221ac5d6f0 Added test for Boost.Graph's strong_components.
Associated with Bug #10231 which causes the test to fail.
2014-11-11 10:49:47 +01:00
K. Noel Belcourt f13ec6fa32 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.
2014-11-10 21:39:40 -07:00
K. Noel Belcourt 8ece8fac15 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.
2014-11-08 17:01:01 -07:00
K. Noel Belcourt 63dd92da72 Add missing iostream header. 2014-11-08 13:07:55 -07:00
Noel Belcourt eb9c64626c Merge pull request #23 from jakobandersen/develop
Update attribute delimiter for read_graphviz
2014-11-07 17:34:10 -07:00
Jakob Lykke Andersen 183a74d213 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.
2014-11-08 01:27:35 +01:00
mikael 1740916e42 Simplified the move and copy constructor and assignment to avoid the maintenance nightmare of trying to rely on default functions. 2014-11-06 01:25:01 -05:00
Noel Belcourt aba24ae80a Merge pull request #19 from josefcibulka/changes
Added graph property support to read_graphml

Well, it turns out there's already Boost.Test dependencies in Graph that I wasn't aware of.  Tested with Clang 6.0 on Darwin.
2014-11-02 15:23:14 -07:00
Noel Belcourt cad7851624 Merge pull request #21 from lorenzb/develop
Fix missing #include causing compilation errors

Thanks, nice find!
2014-11-02 13:38:20 -07:00
Lorenz Breidenbach 6e1ed79cbc Add missing #include of boost/functional/hash.hpp 2014-10-15 13:05:26 +02:00
Josef Cibulka bc60e27f75 Comparison of doubles in graphml_test.cpp in now done with some tolerance to rounding errors. 2014-09-29 11:08:23 +02:00
Josef Cibulka 3afa03dcd0 Changed asserts to BOOST_CHECK in graphml_test.cpp 2014-09-29 10:27:19 +02:00
Josef Cibulka 3a663cddc3 Merge remote-tracking branch 'myremote/master' into HEAD 2014-09-27 21:11:10 +02:00
Josef Cibulka 02fbda4272 Added reading of graph properties from graphml. 2014-09-26 16:28:22 +02:00
Noel Belcourt c07183ad71 Merge pull request #17 from danieljames/metadata
Create metadata file.

Thanks Daniel.
2014-09-01 20:33:01 -06:00
Daniel James 292fb84421 Add metadata file. 2014-08-18 14:59:33 +01:00
Eric Niebler 290e9fc3d1 Merge branch 'master' into develop 2014-08-03 13:06:46 -07:00
Eric Niebler 70a2630932 Merge pull request #14 from Lastique/patch-1
Fix compilation with gcc 4.4 in C++11 mode
2014-08-03 12:46:30 -07:00
Noel Belcourt 7d7eca4a38 Cleanup unused typedefs (gcc-4.8.2 c++0x). 2014-07-31 12:46:39 -06:00
Noel Belcourt 03dbf02a5a Fixes explicit operator() bool of Boost.Optional in c++11 mode.
Uses static_cast<const bool>() rather than explicit conversion.
2014-07-31 12:12:05 -06:00
Noel Belcourt da78b282b4 Fix convertion to bool from vector boost::optional in c++0x mode. 2014-07-30 21:09:52 -06:00
Eric Niebler 612b42c7b2 Merge pull request #14 from Lastique/patch-1
Fix compilation with gcc 4.4 in C++11 mode
2014-07-30 14:13:56 -07:00
Andrey Semashev 73c4e2e36c Resolve assignment operator ambiguity with gcc 4.4. 2014-07-30 23:37:09 +04:00
Andrey Semashev 0f4ecbcd4b Fix compilation with gcc 4.4 in C++11 mode
Add constructor and assignment operator implementations for gcc 4.4 since it does not support defaulted move constructors and assignment. The operators are also used for gcc 4.5 for good measure (I cannot test it but gcc 4.6 does not need this workaround).

Also the workaround is used for MSVC as well. The previous MSVC branch was incorrect since it did not invoke base class constructors and assignment.
2014-07-30 12:01:19 +04:00
Alexander Lauser 9160fdb45e Fixed bug 10222. 2014-07-28 19:07:08 +02:00
Noel Belcourt 4210b6aa84 Merge pull request #11 from MarcelRaad/patch-1
Remove unused variables

Tested with clang-5.1 on Mavericks, thanks Marcel.
2014-07-12 15:03:43 -06:00
Marcel Raad d6314a81bb Remove unused variables
This fixes compiler warnings about variable shadowing.
2014-07-12 13:32:16 +02:00
K. Noel Belcourt 9ce26cf6ea Fix graph_parallel test conversion from const optional<> to
a non-const bool.
2014-05-18 21:27:08 -06:00
Noel Belcourt 235064c63c Merge branch 'develop' 2014-05-16 15:15:30 -06:00
Noel Belcourt 1b88c5bc8b Merge branch 'master' into develop
Conflicts:
	include/boost/graph/adjacency_matrix.hpp
	include/boost/graph/detail/adjacency_list.hpp
	include/boost/graph/named_graph.hpp
	include/boost/graph/r_c_shortest_paths.hpp
	include/boost/graph/vf2_sub_graph_iso.hpp
	test/Jamfile.v2
	test/make_connected_test.cpp
2014-05-16 15:14:57 -06:00
Noel Belcourt 887de5e2e3 Merge pull request #10 from jhunold/vc12
Vc12 does not support default move constructors

Looks okay, assume you'll followup with any remaining failing vc12 tests.
2014-05-14 17:07:40 -06:00
Noel Belcourt 12d334fff6 Merge pull request #5 from BenPope/develop
Fix [un]directed_graph::swap and add tests

Nice job, thanks!  I'll have to look at your other points a bit more carefully before responding.
2014-05-14 10:41:25 -06:00
BenPope e2da814588 Add tests for member swap and fix undirected_graph<>::swap 2014-05-14 23:46:25 +08:00
BenPope 9b7fbc1a76 Add tests for member swap and fix undirected_graph<>::swap 2014-05-14 23:43:53 +08:00
BenPope 1f2dc47fdd Merge branch 'develop' of github.com:boostorg/graph into develop 2014-05-14 21:51:59 +08:00
Jürgen Hunold fcaef7c4e3 Fix: vc12 doe not support defaulted move constructors, so provide an implementation. 2014-05-13 15:52:46 +02:00
Noel Belcourt 07c47bca51 Merge pull request #8 from cirosantilli/doc-quicktour-vertex-type
Explicitly use vertex type on quick tour example.
2014-04-28 13:42:15 -06:00
Ciro Santilli b77deb851a Explicitly use vertex type on quick tour example. 2014-04-28 09:28:13 +02:00
BenPope 86bbbf563d Fix directed_graph::swap 2014-04-21 22:15:48 +08:00
K. Noel Belcourt f1fe4a9132 Fix a use of typename outside of template. Looks like a merge
from develop omitted this as it's fixed in develop, not in
master.

This should clear master graph tests on Darwin and Linux.
2014-01-29 13:01:02 -07:00
Jeremiah Willcock cb26ccf2ba Changed to use unique_ptr when C++11 is enabled; made other fixes to enable move semantics
[SVN r86733]
2013-11-17 02:18:42 +00:00
Jeremiah Willcock cec654dedb Changed some names to fix shadowing warnings; refs #9371
[SVN r86680]
2013-11-13 17:36:02 +00:00
Jeremiah Willcock 983be4b9e7 Added graph property support to write_graphviz_dp
[SVN r86604]
2013-11-09 19:06:06 +00:00
Jeremiah Willcock 332b49261c Fixed invalid uses of "typename"
[SVN r86577]
2013-11-06 21:16:55 +00:00
Jeremiah Willcock a9b0657fd3 Fixed figure caption; fixes #9312
[SVN r86502]
2013-10-28 16:40:16 +00:00
Jeremiah Willcock 4af610830b Fixed edge_range bug from http://stackoverflow.com/questions/19223692/boost-graph-library-directed-multigraph-edge-range-bug?rq=1
[SVN r86469]
2013-10-26 22:57:10 +00:00
Jeremiah Willcock 031ce8084b Changed random_access_iterator_property_map to iterator_property_map in documentation; fixes #9300
[SVN r86456]
2013-10-26 15:30:09 +00:00
Jeremiah Willcock db6e8b7981 Moved parts of PBGL used by parallel property maps over to property map directories and namespaces; this fixes circular dependencies between these two libraries (assuming boost/property_map/parallel is treated as a separate library)
[SVN r86381]
2013-10-21 18:29:04 +00:00
Jeremiah Willcock 74564d5a1c Made some of changes from #9246: added new test case (modifying tests on callback usage to match current documentation); removed special-casing of empty graphs; added patch from #9246 for correct return values; did not make change to documentation suggested there since I chose to have the callback called even for empty graphs; fixes #9246
[SVN r86336]
2013-10-17 02:51:14 +00:00
Stephen Kelly 91a21a559c Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#else...#endif blocks.

[SVN r86245]
2013-10-11 23:17:48 +00:00
Stephen Kelly 73b68e32ba Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifndef...#endif conditions.

[SVN r86244]
2013-10-11 23:15:00 +00:00
Stephen Kelly 0464915a7f Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #ifdef...#endif blocks.

[SVN r86243]
2013-10-11 23:13:10 +00:00
Jeremiah Willcock 4ebf7f60fc Applied patch from #9229 to allow common subgraphs of size 1; fixes #9229
[SVN r86236]
2013-10-11 14:32:02 +00:00
Jeremiah Willcock 4fc3cbfaae Made boost::unordered inclusion unconditional; removed support for non-partial-specialization compilers; enabled C++11 unordered containers when they are present; refs #8962
[SVN r86137]
2013-10-02 19:15:21 +00:00
Jeremiah Willcock da59145176 Fixed documentation about hash_setS; fixes #6990
[SVN r86136]
2013-10-02 19:10:30 +00:00
Jeremiah Willcock bed19d5c25 Qualified calls to tie in documentation; fixes #9184
[SVN r86126]
2013-10-01 18:12:50 +00:00
Stephen Kelly f0f1251da7 Graph: Remove obsolete GCC version check.
[SVN r86059]
2013-09-30 15:55:18 +00:00
Stephen Kelly 4f8a34090e Pending: Remove obsolete MSVC version checks.
[SVN r86028]
2013-09-30 00:19:09 +00:00
Stephen Kelly e096e7e5cc Graph: Remove obsolete MSVC version checks.
[SVN r85934]
2013-09-26 09:41:38 +00:00
Jeremiah Willcock 51d3fe8aed Cleaned up property maps and added a bunch of error checking asserts
[SVN r85853]
2013-09-23 15:30:22 +00:00
Jeremiah Willcock 5922324c2b Merged Boost.Graph, Boost.Graph.Parallel, and Boost.PropertyMap changes from Boost trunk
[SVN r85813]
2013-09-21 20:17:00 +00:00
Jeremiah Willcock f97c2ee746 Attached patch from Piotr Wygocki for min-cost max-flow
[SVN r85661]
2013-09-13 14:48:17 +00:00
Jeremiah Willcock c40148ee94 Removed uses of pointers as property maps from tests and examples
[SVN r85655]
2013-09-12 15:14:36 +00:00
Jeremiah Willcock fdd8e41b47 Fixing tests (hopefully) for VC++
[SVN r85654]
2013-09-12 14:01:50 +00:00
Jeremiah Willcock 93f232252e Fixed VC++ warning
[SVN r85594]
2013-09-07 16:36:45 +00:00
Jeremiah Willcock 93f4a862c3 Changed from iterator to const_iterator to fix VC++ issue
[SVN r85593]
2013-09-07 16:34:49 +00:00
Jeremiah Willcock e1bcb667b6 Fixed ambiguous call
[SVN r85583]
2013-09-06 03:54:57 +00:00
Jeremiah Willcock 405e21d011 Applied patch from potato_research to add copyright notice
[SVN r85580]
2013-09-05 19:48:31 +00:00
Jeremiah Willcock a3efa1c030 Added new test from potato_research of custom vertex index map in r_c_shortest_paths
[SVN r85571]
2013-09-05 12:57:15 +00:00
Jeremiah Willcock bd107e4ab5 Applied patch and file renames from Piotr Wygocki
[SVN r85568]
2013-09-04 21:39:21 +00:00
Jeremiah Willcock 85b45da7c8 Fixed various data type bugs, and cleaned up signed vs. unsigned and int vs. size_t issues
[SVN r85567]
2013-09-04 20:47:36 +00:00
Jeremiah Willcock 8aa602b40d Fixed pseudocode in documentation; fixes #9080
[SVN r85551]
2013-09-03 18:12:59 +00:00
Jeremiah Willcock 915b70ec05 Added min_cost_max_flow code from Piotr Wygocki
[SVN r85536]
2013-08-31 20:09:11 +00:00
Jeremiah Willcock 5297423229 Added edge coloring code from Maciej Piechotka; fixes #8317
[SVN r85534]
2013-08-31 19:44:08 +00:00
Jeremiah Willcock 01a683d8ce Added Hawick circuits code from Louis Dionne; fixes #8433
[SVN r85533]
2013-08-31 19:29:22 +00:00
Jeremiah Willcock 5ba855f46e Removed use of "void" as property type to avoid errors in Clang; added static assertion to prevent this use in the future (it is broken anyway)
[SVN r85472]
2013-08-26 04:11:49 +00:00
Jeremiah Willcock d983ea89a5 Simplified negative-edge test; refs #9012
[SVN r85387]
2013-08-17 22:21:16 +00:00
Jeremiah Willcock cd267de654 Fixed test for negative-weight edges when combine operator is project2nd (as in prim_minimum_spanning_tree); fixes #9012; refs #8398
[SVN r85386]
2013-08-17 22:12:20 +00:00
Jeremiah Willcock 130f7129c3 Added MSSP support for non-named parameter versions
[SVN r85348]
2013-08-14 15:34:02 +00:00
Jeremiah Willcock be2fc043d1 Fixed unused typedef warnings from GCC 4.9; fixes #8877; fixes #8986
[SVN r85323]
2013-08-12 18:14:58 +00:00
Jeremiah Willcock a5a29bd065 Changed to use adjacency_list for temporary graph, avoiding ADL issues with vector_as_graph; fixes #8791
[SVN r84976]
2013-07-07 16:50:24 +00:00
Jeremiah Willcock 73d2d7500e Added #define to detect recent modification
[SVN r84915]
2013-06-29 19:12:52 +00:00
Jeremiah Willcock d53729083f Changed dispatching strategy for bfs_helper
[SVN r84913]
2013-06-28 18:47:30 +00:00
Jeremiah Willcock 37bd777094 Moved distributed graph tags into graph_traits.hpp
[SVN r84912]
2013-06-28 18:47:10 +00:00
Jeremiah Willcock ca70cdaa2c Removed assertion to enable removal of non-existent edges, as suggested by comment to #4622; refs #4622
[SVN r84869]
2013-06-21 20:06:45 +00:00
Jeremiah Willcock 5e88d92265 Merged another bug fix from trunk
[SVN r84728]
2013-06-10 15:23:08 +00:00
Jeremiah Willcock 61296c352a Changed // comments to be non-greedy; fixes #8681
[SVN r84725]
2013-06-10 14:29:39 +00:00
Jeremiah Willcock 2cd57a4180 Merged more Boost.Graph bug fixes from trunk
[SVN r84641]
2013-06-04 20:53:19 +00:00
Jeremiah Willcock df1a183214 Added reference in parameter type
[SVN r84633]
2013-06-04 16:07:45 +00:00
Jeremiah Willcock bf00bbe4f0 Fixed dangling reference bug reported by Marshall Clow; other small cleanups
[SVN r84632]
2013-06-04 16:07:20 +00:00
Jeremiah Willcock b98f225d0d Removed unused typedefs
[SVN r84471]
2013-05-25 02:20:09 +00:00
Jeremiah Willcock 1311d1b035 Chaned project1st and project2nd function objects to return copies rather than references to arguments, preventing a dangling reference when the type of the argument passed in is not exactly the same as the template argument of the projection function object
[SVN r84466]
2013-05-24 21:19:21 +00:00
Jeremiah Willcock 966aa0cf48 Fixed to work with self-loops
[SVN r84396]
2013-05-20 21:33:31 +00:00
Jeremiah Willcock 67f7bcfa96 Merged Boost.Graph, Boost.Graph.Parallel, and Boost.PropertyMap changes from trunk
[SVN r84299]
2013-05-16 15:38:05 +00:00
Jeremiah Willcock 2c62f35e46 Added timeout support code from Brammert Ottens
[SVN r84102]
2013-05-01 17:42:44 +00:00
Jeremiah Willcock 67aacbe6ef Added support for distance types without numeric_limits specializations; changed test to use that functionality to ensure that it keeps working; fixes #8490
[SVN r84028]
2013-04-24 02:19:13 +00:00
Jeremiah Willcock 53bdf1db9c Applied patch from #7155 to add "graphml" as a value for "for"; fixes #7155; fixes #7016
[SVN r83961]
2013-04-18 20:21:39 +00:00
Jeremiah Willcock 7e9b77f5fb Fixed VC++ error
[SVN r83893]
2013-04-14 03:49:56 +00:00
Jeremiah Willcock 535e593810 Added sloan_ordering example to build list
[SVN r83878]
2013-04-13 18:20:45 +00:00
Jeremiah Willcock c40a522362 Fixed 32/64-bit size issues; fixes #8434
[SVN r83877]
2013-04-13 18:20:16 +00:00
Jeremiah Willcock 32fa162931 Fixed documentation to be correct; fixes #8428
[SVN r83857]
2013-04-12 19:54:31 +00:00
Jeremiah Willcock 65c9ef22c6 Flipped arguments to combine calls to match documentation; refs #8428
[SVN r83845]
2013-04-11 17:19:38 +00:00
Jeremiah Willcock 44912cc2be Fixed some typos; not a fix to #8428 yet
[SVN r83844]
2013-04-11 17:14:28 +00:00
Jeremiah Willcock f9dbc3ffb3 Removed unnecessary requirement; fixes #8427
[SVN r83837]
2013-04-10 20:42:27 +00:00
Jeremiah Willcock 3e770e171e Added patches from Flavio De Lorenzi; fixed HTML typo in VF2 documentation
[SVN r83832]
2013-04-10 17:03:21 +00:00
Jeremiah Willcock 4f3e758c9c Fixed example for C++11 mode
[SVN r83798]
2013-04-07 19:37:29 +00:00
Jeremiah Willcock 0e4f022d9d Changed test for negative edges per #8398; fixes #8398
[SVN r83772]
2013-04-05 18:25:33 +00:00
Jeremiah Willcock 393c072c18 Added maximum adjacency search from Fernando Vilas; fixes #6780
[SVN r83410]
2013-03-12 00:35:48 +00:00
Jeremiah Willcock 2539ea8bca Changed .size() comparison against 0 to .empty()
[SVN r83409]
2013-03-12 00:34:38 +00:00
Jeremiah Willcock 02aaeccae5 Changed difference_types to not be void
[SVN r83366]
2013-03-08 17:31:15 +00:00
Jeremiah Willcock 3ebad4bc01 Added patch to example from Takatoshi Kondo
[SVN r83234]
2013-03-01 18:41:32 +00:00
Jeremiah Willcock 057a718a39 Added new versions of VF2 from Jakob Lykke Andersen; fixes #8166; some test cases for the new functionality would be appreciated as a separate patch.
[SVN r83233]
2013-03-01 18:17:34 +00:00
Jeremiah Willcock 51a28ac04b Fixed handling of const graphs and property maps; fixes #8192
[SVN r83191]
2013-02-27 22:04:17 +00:00
Jeremiah Willcock e8eba95d4a Fixed typo in tag
[SVN r83067]
2013-02-21 19:51:54 +00:00
Jeremiah Willcock afd2ee41bd Removed uses of check_is_close which seems to be broken now
[SVN r82779]
2013-02-07 21:13:56 +00:00
Jeremiah Willcock e41d96177f Added check to prevent use of remove_vertex on named adjacency list graphs with vecS vertex container (since it does not work and could not be made to work efficiently); refs #7863
[SVN r82498]
2013-01-14 21:03:48 +00:00
Jeremiah Willcock 1c54f431ca Changed loop header to avoid GCC warning from -Wunsafe-loop-optimizations
[SVN r82445]
2013-01-11 03:05:08 +00:00
Jeremiah Willcock 7ea6373369 Removed obsolete workarounds and changed to iterator_property_map; refs #7877
[SVN r82441]
2013-01-10 22:51:53 +00:00
Jeremiah Willcock 8caf6fc368 Removed obsolete workaround
[SVN r82440]
2013-01-10 22:50:14 +00:00
Jeremiah Willcock f10ad0650a Changed to iterator_property_map; fixes #7877
[SVN r82439]
2013-01-10 22:49:10 +00:00
Jeremiah Willcock 2f12c59529 Added more examples to Jamfile
[SVN r82438]
2013-01-10 22:14:46 +00:00
Jeremiah Willcock 086cd12a7e Applied variant of patch from #7845; fixes #7845
[SVN r82358]
2013-01-04 19:29:27 +00:00
Jeremiah Willcock 22b521ecf4 Merged Boost.Graph changes from trunk for 1.53
[SVN r82061]
2012-12-17 23:59:46 +00:00
Jeremiah Willcock 31cf899da9 Trying to fix defaults for StoredEdge; refs #7801
[SVN r82052]
2012-12-17 17:37:39 +00:00
Jeremiah Willcock ebd636bfc0 Added VF2 updates from Flavio De Lorenzi
[SVN r82050]
2012-12-17 17:11:02 +00:00
Jeremiah Willcock 8a1913f804 Trying to fix property map ambiguities with distributed graphs on Intel compiler
[SVN r82010]
2012-12-16 05:16:47 +00:00
Jeremiah Willcock f53d02e0eb Added updates from Flavio De Lorenzi to vf2_sub_graph_iso code
[SVN r82007]
2012-12-16 01:51:51 +00:00
Jeremiah Willcock 233cc514c5 Re-added incident edges example from documentation; fixed undirected_adjacency_list.expected to match current code; fixed link to undirected.cpp example in documentation; fixes #7787
[SVN r81869]
2012-12-12 03:38:48 +00:00
Jeremiah Willcock 5f6963e0f0 Fixed typo; fixes #7780
[SVN r81822]
2012-12-10 15:26:59 +00:00
Jeremiah Willcock 25852f92af Applied patch from #7766; fixes #7766
[SVN r81772]
2012-12-07 19:41:01 +00:00
Jeremiah Willcock 36d3d83375 Fixed adding properties in labeled_graph; fixes #7773
[SVN r81771]
2012-12-07 19:30:28 +00:00
Jeremiah Willcock 867f8cf495 Fixed directed_graph and undirected_graph handling of vertex_all and edge_all properties
[SVN r81770]
2012-12-07 19:29:12 +00:00
Jeremiah Willcock add307aafc Added info on default argument; fixes #7771
[SVN r81747]
2012-12-07 01:33:49 +00:00
Jeremiah Willcock 0c2db206d3 Added VF2 subgraph isomorphism algorithm from Flavio De Lorenzi and Vomel Christof
[SVN r81725]
2012-12-05 19:28:12 +00:00
Jeremiah Willcock fd7f84560b Changed to BOOST_ASSERT
[SVN r81724]
2012-12-05 19:26:38 +00:00
Jeremiah Willcock 6aed0a5a45 Removed unused code
[SVN r81603]
2012-11-27 22:25:50 +00:00
Jeremiah Willcock 1a9533422d Fixed template parameter names; fixes #4386
[SVN r81602]
2012-11-27 22:17:25 +00:00
Jeremiah Willcock 56223ce7b0 Added name A* for astar_search
[SVN r81601]
2012-11-27 22:14:29 +00:00
Jeremiah Willcock e39be516c2 Added tree version of astar_search functions
[SVN r81600]
2012-11-27 22:13:46 +00:00
Jeremiah Willcock 55047c74c1 Added new property map that returns a constant and eats writes
[SVN r81599]
2012-11-27 22:12:39 +00:00
Jeremiah Willcock d1bd08f2a3 Added astar-cities example to build list
[SVN r81598]
2012-11-27 22:12:17 +00:00
Jeremiah Willcock 74dc17ee94 Added assertions and cast on property map value
[SVN r81597]
2012-11-27 22:11:57 +00:00
Jeremiah Willcock 942d3430f1 Removed references to member types not required by documentation; fixed concept definitions; fixes #7741
[SVN r81589]
2012-11-27 15:14:36 +00:00
Jeremiah Willcock eefb7a3d47 Applied patch from #7728 to fix B-K max-flow bug; fixes #7728; fixes #3468
[SVN r81536]
2012-11-25 20:13:25 +00:00
Jeremiah Willcock 923877b3c5 Applied patch from #7684; fixes #7684
[SVN r81369]
2012-11-16 15:30:42 +00:00
Jeremiah Willcock 4495a409e5 Added support for reading reliably from files with more than one GraphML graph
[SVN r81313]
2012-11-12 22:30:19 +00:00
Jeremiah Willcock 1bb17dab63 Applied patch from #7648; fixes #7648
[SVN r81218]
2012-11-06 13:23:03 +00:00
Jeremiah Willcock f95e102060 Applied patch from #7600; fixes #7600
[SVN r81099]
2012-10-29 18:16:22 +00:00
Jeremiah Willcock 0df5824004 Trying to fix issue reported by Jan Hudec
[SVN r81049]
2012-10-22 20:12:34 +00:00
Jürgen Hunold 3419d42acc Merge 80908,80939,80957 from ^/trunk
------------------------------------------------------------------------
  r80908 | jewillco | 2012-10-08 22:04:48 +0200 (Mo, 08 Okt 2012) | 1 line
  
  Added attempt at workaround for VC++ const graph type bug
  ------------------------------------------------------------------------
  r80939 | jewillco | 2012-10-10 19:27:44 +0200 (Mi, 10 Okt 2012) | 1 line
  
  Added another remove_const to work around VC++ 9 issues
  ------------------------------------------------------------------------
  r80957 | jewillco | 2012-10-11 18:45:33 +0200 (Do, 11 Okt 2012) | 1 line
  
  Added test from Juergen Hunold
  ------------------------------------------------------------------------


[SVN r81042]
2012-10-21 18:06:15 +00:00
Marshall Clow b5b07e13a8 Merge comment typo to release; Fixes #7511
[SVN r80998]
2012-10-16 03:44:59 +00:00
Marshall Clow 2275b3019b Fix typo; Refs #7511
[SVN r80997]
2012-10-16 03:35:39 +00:00
Jeremiah Willcock 0a990db1c5 Fixed for starting vertices other than 0; thanks to Morten Strandberg for the bug report
[SVN r80961]
2012-10-11 20:09:23 +00:00
Jeremiah Willcock b4e1fe7a66 Added test from Juergen Hunold
[SVN r80957]
2012-10-11 16:45:33 +00:00
Jeremiah Willcock 8c4d0b33cd Added another remove_const to work around VC++ 9 issues
[SVN r80939]
2012-10-10 17:27:44 +00:00
Jeremiah Willcock 0d1769a27c Added attempt at workaround for VC++ const graph type bug
[SVN r80908]
2012-10-08 20:04:48 +00:00
Jeremiah Willcock 8f37c21e99 Fixed return type of vertex_by_label
[SVN r80879]
2012-10-05 22:40:22 +00:00
Jeremiah Willcock 34ddb83a49 Removed extra semicolon; fixes #7467
[SVN r80842]
2012-10-04 14:49:26 +00:00
Jeremiah Willcock c964747407 Applied patch from #7457; fixes #7457
[SVN r80814]
2012-10-02 03:05:22 +00:00
Jeremiah Willcock b214ef2f4d Changed classes to structs to get public inheritance; thanks to Shaun Jackman for the bug report
[SVN r80811]
2012-10-01 18:31:15 +00:00
Jeremiah Willcock 607d866854 Merged Boost.Graph changes from trunk
[SVN r80740]
2012-09-28 18:34:12 +00:00
Jeremiah Willcock f95abaa83c Applied patch from #7428; fixes #7428
[SVN r80725]
2012-09-27 17:43:07 +00:00
Jeremiah Willcock ddf8a5e07e Removed incorrect note about restrictions on graph dimensionality and fixed other typos; fixes #6950
[SVN r80642]
2012-09-22 20:09:44 +00:00
Jeremiah Willcock 3009b2303c Checking multiple dimensionalities of graphs
[SVN r80641]
2012-09-22 20:09:08 +00:00
Jeremiah Willcock b9e9ed2067 Removed invalid templated friend definitions and fixed other bugs
[SVN r80640]
2012-09-22 20:08:44 +00:00
Jeremiah Willcock f16a1b114d Fixed relax logic to not write predecessor map unless distance was actually changed in memory (although this case will never be hit unless registers have extra precision compared to memory); fixes #7226
[SVN r80639]
2012-09-22 19:32:32 +00:00
Jeremiah Willcock 8afe81608c Reversed incorrect order of arguments to non-named-parameter call; fixes #7380
[SVN r80638]
2012-09-22 19:26:30 +00:00
Jeremiah Willcock 3be269ba35 Added wording that infinite-weight edges are not guaranteed to work correctly; fixes #7398
[SVN r80637]
2012-09-22 19:21:39 +00:00
Jeremiah Willcock 58829e019b Added more enable_ifs to try to get code working on VC++
[SVN r80582]
2012-09-18 18:20:15 +00:00
Jeremiah Willcock 663127c3b7 Trying to remove unnecessary member accesses (that might not exist) for unused traits
[SVN r80569]
2012-09-18 03:27:42 +00:00
Jeremiah Willcock 9002628f15 Further fixed #7378 issue; refs #7378
[SVN r80532]
2012-09-15 13:49:04 +00:00
Jeremiah Willcock 076085fd29 Using lazy_enable_if to avoid "reference to void" errors for properties that are not found; fixes #7378
[SVN r80528]
2012-09-14 21:41:06 +00:00
Jeremiah Willcock adaa84d861 Added void as default value of lookup_one_property_internal::type for "not found"; refs #7378
[SVN r80524]
2012-09-14 18:04:00 +00:00
Jeremiah Willcock 8c83132ef7 Applied patch from #7327; fixes #7327
[SVN r80511]
2012-09-13 13:18:36 +00:00
Jeremiah Willcock 60b5e07027 Allowed pointers-to-base-members to be used to access properties of derived bundled property classes; fixes #7308
[SVN r80505]
2012-09-12 12:24:04 +00:00
Jeremiah Willcock 58ff2364ba Fixed typos
[SVN r80490]
2012-09-11 07:04:18 +00:00
Jeremiah Willcock fecccdd81c Changed core_numbers to use d_ary_heap and only update queue elements that are in the queue; fixes #7341
[SVN r80421]
2012-09-06 15:31:41 +00:00
Jeremiah Willcock b52e49730b Fixed issues with indirect_cmp; fixes #7338
[SVN r80420]
2012-09-06 13:44:21 +00:00
Jeremiah Willcock 9dcbb861d6 Added warning about copying
[SVN r80407]
2012-09-05 15:19:59 +00:00
Jeremiah Willcock d2d880b4e0 Made edge weight a reference based on a suggestion by Tristram Gräbener; made vertex distance variables const values
[SVN r80264]
2012-08-27 19:05:25 +00:00
Jeremiah Willcock 88101e0ab0 Fixed default template arguments
[SVN r80216]
2012-08-25 20:45:29 +00:00
Jeremiah Willcock 4672f4d430 Fixed typo
[SVN r80189]
2012-08-25 03:10:40 +00:00
Jeremiah Willcock 6dc5eb1d6a Fixed typo
[SVN r80188]
2012-08-25 03:09:27 +00:00
Jeremiah Willcock 48f4d92a38 Removed retag_property_list and all uses of it
[SVN r79855]
2012-08-02 18:05:11 +00:00
Jeremiah Willcock ff872bad11 Fixed subgraph_properties example and added more examples to Jamfile.v2
[SVN r79833]
2012-08-01 15:31:23 +00:00
Jeremiah Willcock 245e36feba Fixed order of arguments to get_param_type
[SVN r79772]
2012-07-27 18:23:02 +00:00
Jeremiah Willcock 1cdce524a2 Merged r79227 from trunk, hopefully fixing all VC++ Boost.Graph Graphviz test issues
[SVN r79771]
2012-07-27 18:15:55 +00:00
Jeremiah Willcock ba9155f89c Merged bug fix from trunk
[SVN r79393]
2012-07-09 20:15:04 +00:00
Jeremiah Willcock df80876475 Fixed uninitialized variable problem
[SVN r79391]
2012-07-09 20:10:02 +00:00
Jeremiah Willcock 6604e3a013 Merged more changes (bug fixes, especially hopefully fixing the VC++ test failure) from trunk
[SVN r79390]
2012-07-09 20:07:47 +00:00
Jeremiah Willcock 408469afcf Refactored handling of properties (especially bogus property tags) to work around VC++ <=10 issues in graphviz_test; changed graph_all_t to return ref_property_map like is needed for dynamic_properties in I/O functions
[SVN r79388]
2012-07-09 19:49:55 +00:00
Jeremiah Willcock 20ab0ffec3 Fixed VC++ issues in examples
[SVN r79387]
2012-07-09 19:48:12 +00:00
Jeremiah Willcock 71f0ab997d Added default for property_kind to try to work around VC++ issues
[SVN r79227]
2012-07-02 12:53:15 +00:00
Jeremiah Willcock 708d8b62a5 Second batch of Boost.Graph and Boost.PropertyMap changes for 1.51
[SVN r79191]
2012-06-30 20:22:16 +00:00
Jeremiah Willcock 616b9e7134 Merged first batch of 1.51 changes for Boost.Graph and Boost.PropertyMap
[SVN r79189]
2012-06-30 20:00:41 +00:00
Jeremiah Willcock 849d1538ed Fixed construction and assignment of bidirectional CSR graphs from other graphs; removed add_edges* functions (which were broken and not documented) from bidirectional CSR; fixes #7002
[SVN r79179]
2012-06-29 20:26:26 +00:00
Jeremiah Willcock 215359117a Applied patch from #7023; fixes #7023
[SVN r79177]
2012-06-29 19:40:29 +00:00
Jeremiah Willcock 5cab2dcf61 Changed grid_graph_index_map to use raw pointer to graph based on suggestion by Sergey Mitsyn
[SVN r79017]
2012-06-20 16:37:50 +00:00
Jeremiah Willcock 30dd4d8f69 Fixed property name as per #6993; fixes #6993
[SVN r79010]
2012-06-19 19:14:46 +00:00
Jeremiah Willcock 0cbdd0a40f Merged warning fixes from trunk
[SVN r78652]
2012-05-26 19:33:09 +00:00
Jeremiah Willcock 38ad939f37 Fixed warnings
[SVN r78651]
2012-05-26 19:30:47 +00:00
Jeremiah Willcock cbe70511cd Merged in more trunk bug fixes for Boost.Graph and Boost.PropertyMap
[SVN r78641]
2012-05-26 18:56:37 +00:00
Jeremiah Willcock 0b30767da0 Merged bug fixes for Boost.Graph and Boost.PropertyMap from trunk
[SVN r78639]
2012-05-26 18:23:01 +00:00
Dave Abrahams 8ff9b6c510 Replace all uses of boost/utility.hpp with more-granular includes. Solves modularization dependency nightmare.
[SVN r78502]
2012-05-18 04:44:04 +00:00
Jeremiah Willcock b37570381b Fixed inspect warnings and typos
[SVN r78442]
2012-05-12 20:46:47 +00:00
Jeremiah Willcock 34ba5d36d7 Fixed uses of std::min
[SVN r78441]
2012-05-12 20:36:02 +00:00
Jeremiah Willcock 856e0fb3ab Fixed bugs in remove_edge and clear_vertex for undirected graphs; refs #4622
[SVN r78439]
2012-05-12 20:10:11 +00:00
Jeremiah Willcock 48860d938c Removed unnecessary concept requirement; fixes #6892
[SVN r78438]
2012-05-12 18:46:34 +00:00
Jeremiah Willcock 4e5382d828 Trying to fix undirected clear_vertex() again; refs #4622
[SVN r78428]
2012-05-11 21:03:19 +00:00
Jeremiah Willcock 2d70ac7254 Fixed handling of self-loops; fixes #4622
[SVN r78425]
2012-05-11 19:37:54 +00:00
Jeremiah Willcock 1eb950d630 Removed use of Boost.Typeof to enhance portability; using Boost.ResultOf instead
[SVN r78330]
2012-05-05 03:08:49 +00:00
Jeremiah Willcock 1441c15255 Removed use of Boost.Typeof to enhance portability; using Boost.ResultOf instead
[SVN r78329]
2012-05-05 03:07:40 +00:00
Jeremiah Willcock 8e40b350e3 Qualified calls to tie
[SVN r78328]
2012-05-05 02:52:41 +00:00
Jeremiah Willcock 429112df7c Fixed ambiguous call
[SVN r78327]
2012-05-05 02:50:55 +00:00
Jeremiah Willcock 0586ac290f Edited reverse_graph to fix test case; fixes #6858
[SVN r78315]
2012-05-03 16:20:58 +00:00
Jeremiah Willcock d42d54b54e Removed #error for lack of bundled properties
[SVN r78076]
2012-04-19 03:30:59 +00:00
Jeremiah Willcock bec6cb4dda Disabled build on Sun; waiting to disable in regression test output until results show that library is not built
[SVN r78053]
2012-04-17 19:53:26 +00:00
Jeremiah Willcock 117689a3f9 Fixed argument order to get_param_type
[SVN r78031]
2012-04-16 23:17:12 +00:00
Jeremiah Willcock 6ea899f7ed Added code and docs from #5269 (some code heavily rewritten) and removed old workarounds; fixes #5269
[SVN r78030]
2012-04-16 23:12:50 +00:00
Jeremiah Willcock a64981a983 Changed to old-style named parameter wrapper generator
[SVN r78027]
2012-04-16 19:17:04 +00:00
Jeremiah Willcock 2a4350905b Added generator to make old-style named parameter wrappers
[SVN r78026]
2012-04-16 19:07:20 +00:00
Jeremiah Willcock ebdec45c4b Added test for Boost.Parameter version of isomorphism; fixed bugs that found
[SVN r78024]
2012-04-16 18:44:36 +00:00
Jeremiah Willcock 97bea429fc Added new code from #6242; fixes #6242
[SVN r78023]
2012-04-16 17:55:07 +00:00
Jeremiah Willcock 01832f76c2 Fixed SCC example and added it to Jamfile; fixes #6647
[SVN r78022]
2012-04-16 17:46:15 +00:00
Jeremiah Willcock 0aaf3858a0 Reverted r77731 because it complicated the code and did not fix BGL compilation on any compilers
[SVN r78020]
2012-04-16 17:35:15 +00:00
Jeremiah Willcock efd4b992cc Clarified and corrected documentation
[SVN r77924]
2012-04-11 20:52:32 +00:00
Jeremiah Willcock 706859b595 Removed uses of Boost.Typeof to hopefully help on XLC
[SVN r77916]
2012-04-11 16:26:51 +00:00
Jeremiah Willcock 3d43c1a8ec Added algorithm from Michele Caini for common spanning trees of two graphs; fixes #6401
[SVN r77893]
2012-04-10 19:51:59 +00:00
Jeremiah Willcock eeaee30dd3 Converted to Boost.Parameter
[SVN r77739]
2012-04-03 05:50:40 +00:00
Jeremiah Willcock a4806bed3b Fixed off-by-one bug
[SVN r77738]
2012-04-03 05:50:29 +00:00
Jeremiah Willcock 8400e599ca Starting on converting to Boost.Parameter; not finished yet because of interaction with PBGL
[SVN r77737]
2012-04-03 05:50:09 +00:00
Jeremiah Willcock 28cf285c4d Added no-named-parameter version and simplified code
[SVN r77736]
2012-04-03 05:49:36 +00:00
Jeremiah Willcock 7d3b9f0b4b Qualified call to isomorphism
[SVN r77735]
2012-04-03 05:49:07 +00:00
Jeremiah Willcock aaedb9bac7 Added user-visible Boost.Parameter version; changed to use new wrapper functions, and to allow old named-parameter version to call it, changed detection of starting vertex
[SVN r77734]
2012-04-03 04:45:47 +00:00
Jeremiah Willcock ce845156b8 Added null_vertex()
[SVN r77733]
2012-04-03 04:44:40 +00:00
Jeremiah Willcock 755c77e7c1 Added functions to get null_vertex and default starting vertex, added code to generate wrappers to allow user-visible Boost.Parameter-enabled versions of BGL functions
[SVN r77732]
2012-04-03 04:44:08 +00:00
Jeremiah Willcock 30026490ee Changed to manual token-testing code to avoid use of Boost.Xpressive (allowing use on more compilers)
[SVN r77731]
2012-04-03 04:42:25 +00:00
Jeremiah Willcock 63200dc0ea Added null_vertex() required by Graph concept
[SVN r77730]
2012-04-03 04:39:03 +00:00
Jeremiah Willcock 8ecd3a986c Disabling abort for Windows CE
[SVN r77693]
2012-04-01 19:23:18 +00:00
Jeremiah Willcock d70d07b0ba Trying to fix choose_pmap on more compilers
[SVN r77650]
2012-03-30 17:50:17 +00:00
Jeremiah Willcock eaebaf87a6 Fixing things so bundled graph properties will not crash
[SVN r77634]
2012-03-29 18:43:26 +00:00
Jeremiah Willcock 428762da2b Keeping tag values around to allow bundled properties
[SVN r77633]
2012-03-29 18:42:53 +00:00
Jeremiah Willcock 5d1e1ce628 Changed more things to inheritance to allow more SFINAE and fixed accessibility problem
[SVN r77632]
2012-03-29 18:42:04 +00:00
Jeremiah Willcock 771d9307cc Added forwarding of values of property tags to fix bundled properties
[SVN r77616]
2012-03-28 20:57:02 +00:00
Jeremiah Willcock 7fccfd1f42 Added graph property to serialization, and made default graph property no_property to allow serialization; fixes #5310
[SVN r77615]
2012-03-28 20:56:44 +00:00
Jeremiah Willcock 9092da0b8f Changed default version of property_map to use inheritance to try to get SFINAE in more cases
[SVN r77611]
2012-03-28 20:40:15 +00:00
Jeremiah Willcock 118a055bc4 Fixed narrowing conversion
[SVN r77610]
2012-03-28 20:27:30 +00:00
Jeremiah Willcock 068b2916b3 Fixed categories of property maps for subgraph based on constness of graph; fixes #6739
[SVN r77609]
2012-03-28 20:20:45 +00:00
Jeremiah Willcock e77cd87de1 Changed property lookup code to simplify graph implementations (remove most special-casing of bundled properties), made CSR graph work with non-bundled properties (probably), split named parameter algorithms to not use property map code
[SVN r77549]
2012-03-25 21:03:59 +00:00
Jeremiah Willcock e0c11b3116 Fixed HTML
[SVN r77536]
2012-03-25 05:22:49 +00:00
Jeremiah Willcock 8f8cd154e6 Fixed warning
[SVN r77534]
2012-03-25 05:01:58 +00:00
Jeremiah Willcock 5aa2be67b0 Changed to use documented interface
[SVN r77533]
2012-03-25 05:01:15 +00:00
Jeremiah Willcock 7a2ec7c4dc Removed unused type and variable
[SVN r77532]
2012-03-25 05:00:52 +00:00
Jeremiah Willcock 035fac705c Fixed warnings
[SVN r77531]
2012-03-25 05:00:36 +00:00
Jeremiah Willcock 6f4b8bf204 Removed unused variable
[SVN r77530]
2012-03-25 05:00:21 +00:00
Jeremiah Willcock 57121513a7 Fixed property map access
[SVN r77529]
2012-03-25 05:00:05 +00:00
Jeremiah Willcock 7e59864546 Fixed warnings
[SVN r77528]
2012-03-25 04:59:23 +00:00
Jeremiah Willcock bbab01b9c3 Removed incorrect tests
[SVN r77527]
2012-03-25 04:58:58 +00:00
Jeremiah Willcock 3b7250f736 Disambiguated tuple operations
[SVN r77526]
2012-03-25 04:57:48 +00:00
Jeremiah Willcock e315856b1b Fixed warnings
[SVN r77525]
2012-03-25 01:38:29 +00:00
Jeremiah Willcock b838adfa32 Fixed warnings
[SVN r77523]
2012-03-24 23:35:23 +00:00
Jeremiah Willcock cae4628d7e Added "inline" to avoid multiple definition errors; fixes #6708
[SVN r77415]
2012-03-19 20:48:42 +00:00
Jeremiah Willcock a3d25c5521 Added missing #include; fixes #6707
[SVN r77414]
2012-03-19 20:38:20 +00:00
Jeremiah Willcock 7cddb8febf Changed type of graph property keys to Graph* to match Graphviz reader code and test
[SVN r77341]
2012-03-15 17:39:14 +00:00
Jeremiah Willcock 908ebf506f Added range checking in asserts
[SVN r77279]
2012-03-09 02:19:01 +00:00
Jeremiah Willcock fee51b8cdc Added typename; fixes #6656
[SVN r77248]
2012-03-06 16:23:53 +00:00
Jeremiah Willcock 00ae7b7e72 Applied patch from #6564; fixes #6564
[SVN r77223]
2012-03-04 20:24:30 +00:00
Jeremiah Willcock 5476d8d70a Made Graphviz reading into CSR graphs work for external properties only; refs #5442
[SVN r77222]
2012-03-04 20:21:22 +00:00
Jeremiah Willcock c49c05f502 Tried to do read_graphviz for CSR; does not work but some infrastructure changed so it is being committed
[SVN r77189]
2012-03-03 21:19:38 +00:00
Jeremiah Willcock e7d2639f6e Added finish call to mutate_graph
[SVN r77188]
2012-03-03 21:19:03 +00:00
Jeremiah Willcock fdc5f76aca Fixed use of non-existent member
[SVN r77187]
2012-03-03 21:18:22 +00:00
Jeremiah Willcock 761f792ed4 Applied new patch from #6033 from Jan Hazla; fixes #6033
[SVN r77186]
2012-03-03 20:06:15 +00:00
Jeremiah Willcock c1b4a409a5 Changed to trampolined implementation of match() to avoid stack overflows, now passes test case in #6573 with 10000 sides; fixes #6573
[SVN r77185]
2012-03-03 20:02:27 +00:00
Jeremiah Willcock 2d41bea1c8 Fixed typo in documentation; fixes #6583
[SVN r77182]
2012-03-03 18:56:40 +00:00
Jeremiah Willcock ce88df48fd Changed property map uses to not use operator[]
[SVN r77074]
2012-02-19 20:06:15 +00:00
Aaron Windsor 0a31d3c76b Correcting a doc bug: order of vertices on the outer face of a graph should have been reversed in planar_face_traversal example
[SVN r77013]
2012-02-14 02:43:44 +00:00
Jeremiah Willcock cdef2804ea Fixed incorrect iterator type
[SVN r76868]
2012-02-04 05:12:58 +00:00
Jeremiah Willcock b42b71824b Removed unused parameter names
[SVN r76867]
2012-02-04 05:12:04 +00:00
Jeremiah Willcock cd1186205d Added links sent by David Doria to his new documentation files
[SVN r76783]
2012-01-29 21:36:23 +00:00
Jeremiah Willcock 9d353c53e2 Added documentation and examples from David Doria
[SVN r76779]
2012-01-29 21:08:40 +00:00
Jeremiah Willcock a1fc58cc93 Added directed_graph stub documentation from David Doria
[SVN r76778]
2012-01-29 19:04:46 +00:00
Jeremiah Willcock f63ebe9a8b Added example from David Doria
[SVN r76726]
2012-01-27 22:06:21 +00:00
Jeremiah Willcock 1c7c456e18 Changed another property map type to const_type
[SVN r76654]
2012-01-23 19:57:42 +00:00
Jeremiah Willcock e761a6b4d0 Fixed typo from #6435 plus others; fixes #6435
[SVN r76651]
2012-01-23 16:07:05 +00:00
K. Noel Belcourt cddab52a7b Fix astar_search graph test.
[SVN r76648]
2012-01-23 02:52:23 +00:00
Jeremiah Willcock 3af4b053be Fixed issue with printing const graphs
[SVN r76588]
2012-01-19 16:35:28 +00:00
Jeremiah Willcock 210e7857b2 Removed redundant function_requires in test case
[SVN r76537]
2012-01-15 23:59:39 +00:00
Jeremiah Willcock a4dc3d7b23 Merged r75066, r75067, r75124, r75140, r75165, r75861, r75862, r75863, r75878, r75906, r75970, r75973, r75974, and r76394 from trunk
[SVN r76536]
2012-01-15 23:52:45 +00:00
Jeremiah Willcock 4b95dcfbe9 Merged r76050, r75547, r75891, r76049, r76083, and r76439 from trunk (reverse_graph bug fixes and fix for #6293); refs #6293
[SVN r76535]
2012-01-15 23:32:09 +00:00
Jeremiah Willcock f761059ecd Applied some fixes from #6313; fixes #6313
[SVN r76439]
2012-01-12 20:27:31 +00:00
Jeremiah Willcock a439c48425 Applied patch from #6371; fixes #6371
[SVN r76394]
2012-01-10 01:29:38 +00:00
Jeremiah Willcock 99f7ed91af Applied patch from bug #6306; fixes #6306
[SVN r76083]
2011-12-20 18:49:09 +00:00
Jeremiah Willcock cd1fee5f7d Applied fixed version of patch from #6293; fixes #6293
[SVN r76050]
2011-12-18 21:09:34 +00:00
Jeremiah Willcock 231bb5dbfb Added documented way to get underlying edge descriptor from a reverse_graph; changed name of member to prevent future use
[SVN r76049]
2011-12-18 20:53:26 +00:00
Steven Watanabe 456f4006cb Remove unused library.
[SVN r75974]
2011-12-15 22:59:03 +00:00
Jeremiah Willcock 52d7bc8d5e Applied patch from Jens Muller
[SVN r75973]
2011-12-15 22:36:20 +00:00
Steven Watanabe 8f3dd3a4f9 Fix search for SDB and LEDA.
[SVN r75970]
2011-12-15 22:07:53 +00:00
Jeremiah Willcock 79573b5dbd Added another copy_graph hack for transpose_graph
[SVN r75906]
2011-12-11 21:09:33 +00:00
Jeremiah Willcock fc1619d91e Fixed copying of reverse_graphs to compensate for new reverse_edge_descriptor class
[SVN r75891]
2011-12-11 07:19:19 +00:00
Jeremiah Willcock 17f92dd61e Added include of <stack>; fixes #6246
[SVN r75878]
2011-12-09 17:53:43 +00:00
Jeremiah Willcock 2a5874c7b9 Fixed typo
[SVN r75863]
2011-12-08 02:00:04 +00:00
Jeremiah Willcock 03193c2fb4 Added documentation for edge_predecessor_recorder and fixed several typos in other doc pages
[SVN r75862]
2011-12-08 01:59:21 +00:00
Jeremiah Willcock 345a6b964b Removed debugging output; fixes #6239
[SVN r75861]
2011-12-08 01:43:39 +00:00
Jeremiah Willcock 366cd32060 Added comparison operators; fixes #6137
[SVN r75547]
2011-11-18 20:06:07 +00:00
Jeremiah Willcock a88250f76f Merged change r75431 from trunk; refs #6112
[SVN r75471]
2011-11-13 06:10:55 +00:00
Jeremiah Willcock 2b2f2d464e Qualified more calls to tie; fixes #6112
[SVN r75431]
2011-11-10 15:04:27 +00:00
Jeremiah Willcock 3619e54948 Fixed degree_vertex_invariant::max; fixes #5881
[SVN r75165]
2011-10-29 06:11:02 +00:00
Jeremiah Willcock d6643f50f3 Added missing "end for"; fixes #6061
[SVN r75140]
2011-10-27 19:51:37 +00:00
Jeremiah Willcock 63249fa231 Removed hash<void*> specialization
[SVN r75124]
2011-10-27 01:17:35 +00:00
Jeremiah Willcock 6f91f83d2e Removed incorrect != 0 test on boost::optional; fixes #6044
[SVN r75074]
2011-10-20 21:32:45 +00:00
Jeremiah Willcock 2edbcb500f Fixed strange use of pred map, and changed algorithm to be more similar to Tarjan paper cited in bibliography; fixes #6033
[SVN r75067]
2011-10-19 20:03:54 +00:00
Jeremiah Willcock ffff89b1a2 Refactored and added test graph from Andre Dau
[SVN r75066]
2011-10-19 20:03:00 +00:00
Jeremiah Willcock 3a546c9418 Merged r72747, r74075, r74094, r74232, r74357, r74602, and r74783 from trunk
[SVN r74862]
2011-10-09 20:33:56 +00:00
Jeremiah Willcock 27e5672047 Fixed typo
[SVN r74783]
2011-10-07 21:28:22 +00:00
Jeremiah Willcock 4a19d6d288 Applied patch from #5919; fixes #5919
[SVN r74602]
2011-09-28 19:04:30 +00:00
Jeremiah Willcock 4778a4b359 Fixed link
[SVN r74357]
2011-09-12 15:01:25 +00:00
Jeremiah Willcock fd37deb67b Added requirement to link to Boost.Regex
[SVN r74232]
2011-09-04 18:47:27 +00:00
Jeremiah Willcock 90678ab0fa Fixed inspection report issues
[SVN r74094]
2011-08-27 19:35:05 +00:00
Jeremiah Willcock 48b3020f7d Added parentheses around call to numeric_limits::max; fixes #5813
[SVN r74075]
2011-08-26 17:33:02 +00:00
Jeremiah Willcock 9f29ef1a83 Merged in BGL, enable_if, and related changes from trunk: r67035, r57559, r72837, r73010, r73026, r72960, r73425, r73424, r73009, r73998, r73997, r73006, r73630, r73631, r73999, r73422, r73423, r73996, r71221
[SVN r74023]
2011-08-23 18:26:46 +00:00
Jeremiah Willcock b156db0c9e Fixed traits class name
[SVN r73999]
2011-08-22 01:44:08 +00:00
Jeremiah Willcock 9c7f42c58a Changed to custom edge_descriptor type in reverse_graph to avoid ambiguities when using a std::pair edge_descriptor from an underlying graph
[SVN r73997]
2011-08-22 01:43:07 +00:00
Jeremiah Willcock c0bc3e3aea Fixed documentation based on issues found by Ragavendran Gopalakrishnan
[SVN r73996]
2011-08-22 01:42:12 +00:00
Jeremiah Willcock fee2e45a8c Fixed vertex count computation for case where number of vertices does not fit into an int
[SVN r73631]
2011-08-09 19:32:20 +00:00
Jeremiah Willcock f0343d2264 Fixed grid graph for case where VertexIndex is smaller than int
[SVN r73630]
2011-08-09 19:23:16 +00:00
Jeremiah Willcock fcf6446201 Removed calls to exit(); fixes #5185
[SVN r73425]
2011-07-29 01:44:48 +00:00
Jeremiah Willcock 1180386ac1 Applied patch from #5506; fixes #5506
[SVN r73424]
2011-07-29 01:30:53 +00:00
Jeremiah Willcock b021084901 Added caveat about PDF file; refs #5633
[SVN r73423]
2011-07-29 01:16:43 +00:00
Jeremiah Willcock c416132bfe Fixed HTML documentation for isomorphism algorithm; refs #5633
[SVN r73422]
2011-07-29 01:12:57 +00:00
Jürgen Hunold fec3bd2314 Merge 73299,73301,73308 from ^/trunk
------------------------------------------------------------------------
r73299 | jhunold | 2011-07-22 14:08:03 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73301 | jhunold | 2011-07-22 16:15:45 +0200 (Fr, 22 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------
r73308 | jhunold | 2011-07-23 11:24:35 +0200 (Sa, 23 Jul 2011) | 2 lines

Enable visibility support. Refs #2114.

------------------------------------------------------------------------


[SVN r73381]
2011-07-26 17:40:21 +00:00
Jürgen Hunold 8b4ac5cc39 Enable visibility support. Refs #2114.
[SVN r73308]
2011-07-23 09:24:35 +00:00
Jeremiah Willcock b6c54fa390 Weakened property map requirements further, removing uses of [] on property maps
[SVN r73026]
2011-07-13 01:04:47 +00:00
Jeremiah Willcock 6edd466d86 Weakened concept requirements
[SVN r73010]
2011-07-12 02:47:34 +00:00
Jeremiah Willcock f98a8afdd6 Fixed to work with graphs whose vertex_index maps are not the identity
[SVN r73009]
2011-07-12 01:26:09 +00:00
Jeremiah Willcock 9cf1345871 Added built-in reverse edge map for max-flow
[SVN r73006]
2011-07-11 19:54:19 +00:00
Jeremiah Willcock 55b82bd1f2 Applied patch from #5659, plus made similar changes to other algorithms that have inf parameters; did not add inf parameters to algorithms that did not already have them; fixes #5659
[SVN r72960]
2011-07-07 21:07:41 +00:00
Jeremiah Willcock 2c3505aec9 Fixed ith_bandwidth for directed graphs; changed bandwidth to use the graph edges rather than scanning the out edges of every vertex; other small fixes
[SVN r72837]
2011-07-01 19:36:08 +00:00
Jeremiah Willcock c5780610c6 Changed grid_graph to directed to match differing edge indices in documentation
[SVN r72747]
2011-06-24 22:49:29 +00:00
Jeremiah Willcock 081b1f90bf Merged r71166, r71238, r71300, r71489, r71704, and r71929 from trunk
[SVN r72334]
2011-06-01 16:58:36 +00:00
Jeremiah Willcock a4af894285 Changed to explicit stack as suggested by Aaron Windsor
[SVN r71929]
2011-05-13 23:50:01 +00:00
Jeremiah Willcock b407ea9309 Fixes
[SVN r71489]
2011-04-25 21:10:58 +00:00
Jeremiah Willcock 19b05b0cae Fixed typo
[SVN r71300]
2011-04-15 22:11:40 +00:00
Jeremiah Willcock 3131ffa454 Added note about broken example
[SVN r71238]
2011-04-14 02:30:56 +00:00
Jeremiah Willcock 1fa0cd9a26 Fixed C++0x array ambiguity
[SVN r71166]
2011-04-10 20:01:06 +00:00
Jeremiah Willcock 5a5b35b154 Merged r70875 from trunk
[SVN r70995]
2011-04-05 02:31:38 +00:00
Jeremiah Willcock 4b1c5fe438 Fixed types in bundled property docs; fixes #5410
[SVN r70875]
2011-04-02 18:43:03 +00:00
Jeremiah Willcock 03510b4a6e Merged more fixes from trunk; added is_sorted.hpp because that is needed for BGL fixes
[SVN r70704]
2011-03-29 19:07:16 +00:00
Jeremiah Willcock 30e9f22af4 Merged r67703-67704,68155,69263,69629,69726 from trunk
[SVN r70703]
2011-03-29 18:56:56 +00:00
Jeremiah Willcock 06bdbbcbba Changed concepts to use proper names for property types
[SVN r69726]
2011-03-08 20:53:50 +00:00
Jeremiah Willcock f52b7df417 Added includes of <utility> for Clang/libc++
[SVN r69629]
2011-03-07 19:28:34 +00:00
Jeremiah Willcock 2e4073a8b7 Merged bug fixes from trunk (r68781,r68949,r68972,r68979,r69021,r69404,r69430) for 1.46.1
[SVN r69502]
2011-03-03 00:29:41 +00:00
Jeremiah Willcock 516c833574 Removed superseded workaround from reverse_graph
[SVN r69430]
2011-03-01 03:20:29 +00:00
Jeremiah Willcock fd549fe0fa Made filtered_graph work with bundled graph properties by fixing bundle_type template; probably fixed other adapters as well
[SVN r69404]
2011-02-28 22:41:34 +00:00
Jeremiah Willcock b52d4724c2 Removed obsolete (and unused) file
[SVN r69263]
2011-02-25 06:37:46 +00:00
Jeremiah Willcock 66cd415568 Fixed typo as suggested by Shaun Jackman
[SVN r69021]
2011-02-19 04:17:48 +00:00
Jeremiah Willcock d44293d8a8 Fixed buffer overflow from parallel edges in isomorphism(); fixes #5175
[SVN r68979]
2011-02-17 23:00:20 +00:00
Jeremiah Willcock a0c90983ab Fixed escaping using patch from #5199; fixes #5199
[SVN r68972]
2011-02-17 20:02:58 +00:00
Jeremiah Willcock bb1ce866f8 Applied second patch from #5180; fixes #5180
[SVN r68949]
2011-02-16 16:35:42 +00:00
Jeremiah Willcock ac4b12107f Changed "continue" to "break" in remove_edge_if; fixes #5181
[SVN r68781]
2011-02-11 18:39:11 +00:00
Steven Watanabe a4452c3539 Revert [67111] (addition of boost/detail/iomanip.hpp) and all the commits that depend on it. ([68137], [68140], [68141], [68154], and [68165]).
[SVN r68168]
2011-01-15 08:11:51 +00:00
Bryce Adelstein-Lelbach 074277924a Replacing the use of <iomanip> with <boost/detail/iomanip.hpp> across Boost.
On Linux, GNU's libstdc++, which is the default stdlib for icc and clang,
cannot parse the <iomanip> header in version 4.5+ (which thankfully neither
compiler advises the use of yet), as it's original C++98-friendly
implementation has been replaced with a gnu++0x implementation.
<boost/detail/iomanip.hpp> is a portable implementation of <iomanip>, providing
boost::detail::setfill, boost::detail::setbase, boost::detail::setw,
boost::detail::setprecision, boost::detail::setiosflags and
boost::detail::resetiosflags. 



[SVN r68140]
2011-01-14 02:35:58 +00:00
Jeremiah Willcock 6e73c470a4 Removed BOOST_FILESYSTEM_VERSION setting from test cases and removed Filesystem v2 workaround
[SVN r68001]
2011-01-11 22:19:57 +00:00
Jeremiah Willcock 1963179514 Removed Boost.Test #defines from test case
[SVN r67971]
2011-01-11 19:00:35 +00:00
Jeremiah Willcock bd69c0c5cf Merged r66528,66559,66960,67010,67012,67033,67035,67038,67040,67069,67086,67723,67914 from trunk
[SVN r67970]
2011-01-11 18:52:51 +00:00
Jeremiah Willcock dcd9920780 Updated removal version
[SVN r67968]
2011-01-11 18:19:59 +00:00
Jeremiah Willcock 8b4eb672e0 Merged r67041,67084,67110,67705-67706,67722,67724,67764 (bug fixes) from trunk, plus allowed Boost.Filesystem v2 to be used in boost/distributed/adjlist/serialization.hpp
[SVN r67967]
2011-01-11 18:17:40 +00:00
Jeremiah Willcock ec5f6a655c Fixed URL
[SVN r67914]
2011-01-10 15:20:55 +00:00
Jeremiah Willcock e5341acc43 Changed to StringAlgo for replace operation rather than Xpressive
[SVN r67764]
2011-01-07 21:36:01 +00:00
Jeremiah Willcock 19679d3851 Simplifying code for VC++ 7.1
[SVN r67724]
2011-01-06 16:30:58 +00:00
Jeremiah Willcock 3624e74d13 Fixed typo
[SVN r67723]
2011-01-06 16:24:56 +00:00
Jeremiah Willcock ae33127eed Added disambiguation of regex_replace() overloads for VC++ 7.1
[SVN r67722]
2011-01-06 16:08:05 +00:00
Jeremiah Willcock 43386bca5c Fixed assert inspection issues in sequential BGL
[SVN r67705]
2011-01-06 02:08:41 +00:00
Jeremiah Willcock 287529480f Removed deprecated code and docs
[SVN r67704]
2011-01-06 02:00:35 +00:00
Jeremiah Willcock 6fb2f7edec Removed deprecated file
[SVN r67703]
2011-01-06 01:51:16 +00:00
Jeremiah Willcock 4a5c105654 Applied patch from #4966 to fix self-loop insertion; fixes #4966
[SVN r67110]
2010-12-08 18:11:52 +00:00
Jeremiah Willcock f132fd060f Using incantation from Boost.Math (test_laplace.cpp) to try to get Boost.Test linking to work
[SVN r67086]
2010-12-07 17:35:24 +00:00
Jeremiah Willcock 595b9abbdc Simplified code for VC++ 7.1
[SVN r67084]
2010-12-07 17:20:55 +00:00
Jeremiah Willcock 0415ceffe0 Removed dynamic linking to Boost.Test
[SVN r67069]
2010-12-06 18:20:16 +00:00
Jeremiah Willcock 4000bccb3d Fixed typo
[SVN r67040]
2010-12-05 20:43:45 +00:00
Jeremiah Willcock 2e5db3d026 Testing more example codes
[SVN r67038]
2010-12-05 20:39:59 +00:00
Jeremiah Willcock ff1775df18 Removed <boost/pending/integer_range.hpp> and a few more uses of it; fixes #4642
[SVN r67035]
2010-12-05 20:38:44 +00:00
Jeremiah Willcock b76015210d Turned off VC++ auto-linking
[SVN r67033]
2010-12-05 20:24:28 +00:00
Jeremiah Willcock cf1943fb84 Merged r67031 from trunk
[SVN r67032]
2010-12-05 20:21:37 +00:00
Jeremiah Willcock 086a94c8a5 Applied patch from Matthias Walter
[SVN r67031]
2010-12-05 20:17:48 +00:00
Jeremiah Willcock 0ec513eab1 Merged r67014 from trunk
[SVN r67015]
2010-12-04 20:51:15 +00:00
Jeremiah Willcock 10b41afc0f Fixed uninitialized variables
[SVN r67014]
2010-12-04 20:49:49 +00:00
Jeremiah Willcock c3aad6b27e Merged r67011 from trunk
[SVN r67013]
2010-12-04 20:46:50 +00:00
Jeremiah Willcock cc07f4c201 Moved #define up
[SVN r67012]
2010-12-04 20:45:42 +00:00
Jeremiah Willcock 904b4cc924 Forcing filesystem version 3
[SVN r67011]
2010-12-04 20:45:09 +00:00
Jeremiah Willcock e864071546 Put in more checks to avoid seg faults
[SVN r67010]
2010-12-04 20:39:00 +00:00
Jeremiah Willcock 979e02a617 Merged r67008 from trunk
[SVN r67009]
2010-12-04 20:33:36 +00:00
Jeremiah Willcock 9bcc1b9a69 Changed to Boost.Filesystem v3
[SVN r67008]
2010-12-04 20:31:33 +00:00
Jeremiah Willcock 11d2d38a51 Merged r66286, r66707, r66900, and r66907 from trunk
[SVN r67007]
2010-12-04 20:21:20 +00:00
Jeremiah Willcock db812aa773 Fixed complexity of Dijkstra's algorithm; fixes #4852
[SVN r66960]
2010-12-01 20:15:41 +00:00
Jeremiah Willcock 6c48845da8 Fixed up computation of property types; fixes #1021
[SVN r66907]
2010-11-30 18:16:29 +00:00
Jeremiah Willcock fb567057df Fixed bundled graph properties in filtered_graph; fixes #4914
[SVN r66900]
2010-11-30 17:48:33 +00:00
Jeremiah Willcock 8e365de488 Applied patch from #4887 -- thank you for the bug report and patch; fixes #4887
[SVN r66707]
2010-11-24 01:23:42 +00:00
Jeremiah Willcock a934539462 Fixed typo; fixes #4851
[SVN r66559]
2010-11-13 15:04:24 +00:00
Jeremiah Willcock f5b408ef7f Removed access to (unused) edge id attribute, also making that attribute optional; fixes #4843
[SVN r66528]
2010-11-12 15:34:20 +00:00
Jeremiah Willcock 7d02f7dd6b Applied patch from Daniel Trebbien
[SVN r66286]
2010-10-30 20:16:17 +00:00
Daniel James dbd5774482 Merge documentation fixes to release.
[SVN r66285]
2010-10-30 17:34:45 +00:00
Daniel James 11187e5a25 Link fixes.
[SVN r66273]
2010-10-30 14:32:50 +00:00
Jeremiah Willcock aef49c1b8b Merged r66203 and r66204 from trunk; refs #4793
[SVN r66206]
2010-10-26 20:37:31 +00:00
Jeremiah Willcock 55dec7c079 Fixed signature of copy_one_vertex(); refs #4793
[SVN r66204]
2010-10-26 18:37:29 +00:00
Jeremiah Willcock a3786d7f7e Repaired copy_component() using suggestion from Christopher Alfeld; fixes #4793
[SVN r66203]
2010-10-26 18:24:01 +00:00
Jeremiah Willcock 94b48cea30 Merged r66097, r66098, and r66099 from trunk; refs #4758, #4752, #4753, #4631
[SVN r66100]
2010-10-19 16:13:47 +00:00
Jeremiah Willcock 822fc80494 Merged patch from #4631 and made appropriate doc changes; fixes #4631
[SVN r66099]
2010-10-19 16:00:15 +00:00
Jeremiah Willcock 24a2de892f Fixed remove_edge_if and clear_vertex for subgraphs; commented out remove_vertex; refs #4752; fixes #4753
[SVN r66098]
2010-10-19 15:55:27 +00:00
Jeremiah Willcock 61d37fe743 Repeating edge insertions (up to a limit) when they fail in generate_random_graph; fixes #4758
[SVN r66097]
2010-10-19 15:46:00 +00:00
Jeremiah Willcock 43ff6aef6d Merged changes r65193, r65939, r65963, and r65964 from trunk; refs #4731, #4737
[SVN r66093]
2010-10-19 15:28:37 +00:00
Jeremiah Willcock 7ba05ec487 Clarified docs further; fixes #4731
[SVN r65964]
2010-10-14 19:02:03 +00:00
Jeremiah Willcock f66d119969 Fixed documentation of distance map; fixes #4737
[SVN r65963]
2010-10-14 18:58:00 +00:00
Andrew Sutton adc6eb0f0d Clarifying references to MST in Dijkstra's SP algorithm.
[SVN r65939]
2010-10-13 13:47:23 +00:00
Jeremiah Willcock 4673c796aa Merged r65836 (fix for #4715) from trunk; refs #4715
[SVN r65839]
2010-10-08 18:06:41 +00:00
Jeremiah Willcock 7b97cbf393 Fixed const issue on VC++ 8; fixes #4715
[SVN r65836]
2010-10-08 17:32:57 +00:00
Jeremiah Willcock e13fcab1e8 Merged r64064 (quote fix in example) from trunk
[SVN r65769]
2010-10-05 18:08:27 +00:00
Jeremiah Willcock f095156c22 Merged r64065 (fixes to implicit_graph example), r65199 and r65386 (documentation fixes), plus copied test_graphs.cpp from trunk
[SVN r65768]
2010-10-05 18:06:09 +00:00
Jeremiah Willcock 2aeecada2a Merged r64209 (addition to users list), r64223 (fix to users list), r64763 (improved interfaces to smallest_last_ordering), r65593 (patches to stoer_wagner_min_cut) from trunk
[SVN r65767]
2010-10-05 17:53:09 +00:00
Jeremiah Willcock 00d076b2f8 Merged r64074, r64645, r64935, r65198, r65385, r65764 (all related to bundled graph properties as far as I remember)
[SVN r65766]
2010-10-05 17:42:47 +00:00
Jeremiah Willcock b71896f622 Merged changes r64063 (W. P. McNeill examples), r65590 (stoer_wagner_min_cut from Daniel Trebbien), 64187 (DIMACS reader updates), and 64762 (DIMACS reader updates)
[SVN r65751]
2010-10-04 18:50:40 +00:00
Jeremiah Willcock 89cd3d8a8a Added patch from Daniel Trebbien
[SVN r65593]
2010-09-26 02:29:42 +00:00
Jeremiah Willcock bada2e9b7a Added Stoer-Wagner min-cut algorithm submitted by Daniel Trebbien
[SVN r65590]
2010-09-25 18:52:41 +00:00
Andrew Sutton 7e2b915b14 Adding documentation for bundled graph properties.
[SVN r65386]
2010-09-11 14:33:38 +00:00
Andrew Sutton ff2980b121 Fixing #4642.
Added a deprecation warning to to pending/integer_range.hpp. Replaced all
BGL inclusions with range/irange, which defines the same type.


[SVN r65385]
2010-09-11 14:05:41 +00:00
Jeremiah Willcock 3a01fc7f4e Added new info about needing to build a library to get GraphML reading; fixes #4556
[SVN r65199]
2010-09-02 20:05:58 +00:00
Jeremiah Willcock 17af2e739a Fixed clearing of vertices with self-loop edges; fixes #4622
[SVN r65198]
2010-09-02 18:24:17 +00:00
Andrew Sutton 4963f676dc Adding graph properties to CSR graph. Updating tests.
[SVN r64935]
2010-08-20 12:35:20 +00:00
Jeremiah Willcock 2ba8f21b13 Added simplified interfaces
[SVN r64763]
2010-08-12 17:36:40 +00:00
Jeremiah Willcock c6399e2baf Added problem type support to DIMACS reader
[SVN r64762]
2010-08-12 17:35:06 +00:00
Andrew Sutton c07518f7d1 Implementing bundled properties for graph properties.
The initial checkin supports bundled properties for adjacency list,
matrix, undirected and directed graphs, the labeled graph adaptor
and the reverse graph adaptor. All tests updated, passed.

Documentation should be updated, but isn't yet.


[SVN r64645]
2010-08-06 18:13:16 +00:00
Jeremiah Willcock 80378ca2dc Fixed link
[SVN r64223]
2010-07-21 16:03:11 +00:00
Jeremiah Willcock 0f78fd6710 Added OpenCog
[SVN r64209]
2010-07-20 19:28:19 +00:00
Jeremiah Willcock b3809b0910 Added min-cut support to dimacs reader
[SVN r64187]
2010-07-20 03:52:58 +00:00
Jeremiah Willcock 398ea401df Disabled edge_range() for adjacency list graphs that do not guarantee equal_range() to work on their out edge lists; cleaned up edge() for all adjacency lists
[SVN r64074]
2010-07-16 18:12:29 +00:00
Jeremiah Willcock 3edc92eebc Copied over new version of implicit_graph.cpp from Github
[SVN r64065]
2010-07-16 04:27:33 +00:00
Jeremiah Willcock 286c831903 Fixed non-ASCII quote issue
[SVN r64064]
2010-07-16 01:50:03 +00:00
Jeremiah Willcock 590f8fca52 Added implicit_graph and astar_maze examples from W. P. McNeill
[SVN r64063]
2010-07-16 01:43:08 +00:00
Jeremiah Willcock 8a38567538 Merged r64017 and r64023 (documentation bug fixes) from trunk
[SVN r64051]
2010-07-15 16:01:00 +00:00
Jeremiah Willcock 862c7637cd Merged r64025 and r64030 (detail qualification on override_const_property) from trunk
[SVN r64049]
2010-07-15 15:52:14 +00:00
Jeremiah Willcock bd4c4438ba Merged r64024 (astar_search named parameter stuff and related changes to named parameters in general) from trunk
[SVN r64048]
2010-07-15 15:47:31 +00:00
Jeremiah Willcock a84b41c331 Merged r64026 (adding unordered_set to set_contains) from trunk
[SVN r64047]
2010-07-15 15:41:18 +00:00
Jeremiah Willcock eae116a598 Merged r64016 and r64035 (both on filtered_graph.hpp) from trunk
[SVN r64046]
2010-07-15 15:37:46 +00:00
Jeremiah Willcock 53edba6e31 Simplified property map handling
[SVN r64035]
2010-07-15 02:12:18 +00:00
Jeremiah Willcock 892677e57e Fixed more detail::override_const_property calls
[SVN r64030]
2010-07-14 23:56:49 +00:00
Jeremiah Willcock 8d013dc58a Added unordered_set to set_contains
[SVN r64026]
2010-07-14 22:59:20 +00:00
Jeremiah Willcock c573261f24 Qualified calls properly
[SVN r64025]
2010-07-14 22:45:39 +00:00
Jeremiah Willcock c44888396b Changed to new-style named parameters for A* code; added named parameters for astar_search_no_init()
[SVN r64024]
2010-07-14 22:15:48 +00:00
Jeremiah Willcock 724773b517 Fixed various bugs in docs
[SVN r64023]
2010-07-14 20:34:02 +00:00
Jeremiah Willcock 7c0a0f2da7 Added warnings about subclassing BGL graph types and fixed a typo
[SVN r64017]
2010-07-14 18:57:45 +00:00
Jeremiah Willcock 954b8066bc Fixed spelling
[SVN r64016]
2010-07-14 18:47:16 +00:00
Jeremiah Willcock 88a4583d32 Merged more changes from trunk
[SVN r63665]
2010-07-05 16:48:15 +00:00
Jeremiah Willcock ea9d3f00eb Merged more changes from trunk, including r63643 (new patches for LLP64)
[SVN r63664]
2010-07-05 16:40:23 +00:00
Jeremiah Willcock 3233baf282 Merged various changes from trunk
[SVN r63662]
2010-07-05 16:17:38 +00:00
Jeremiah Willcock a942726d30 Merged r63630 from trunk
[SVN r63660]
2010-07-05 15:48:17 +00:00
Jeremiah Willcock d4865f0d49 Merged r63657 from trunk
[SVN r63658]
2010-07-05 15:38:37 +00:00
Jeremiah Willcock 57cb8046b1 Removed using namespace that may be triggering ambiguity errors
[SVN r63657]
2010-07-05 15:37:30 +00:00
Jeremiah Willcock 08f2f509b0 Merged r63654 and r63655 from trunk
[SVN r63656]
2010-07-05 15:21:33 +00:00
Jeremiah Willcock 0d4b7e6b7b Fixed warning syntax
[SVN r63655]
2010-07-05 15:20:19 +00:00
Jeremiah Willcock 367e31c08b Fixed random spanning tree issues from regression tests
[SVN r63654]
2010-07-05 15:08:08 +00:00
Jeremiah Willcock 4d852e33af Refactored color map generation code to make it more broadly usable
[SVN r63630]
2010-07-04 20:14:41 +00:00
Jeremiah Willcock 835b65bd17 Merged r63557 from trunk
[SVN r63559]
2010-07-03 19:56:35 +00:00
Jeremiah Willcock e6576abc28 Changed random_spanning_tree to use named parameters; removed separate function name for weighted version; allowed user to specify spanning tree root; added exception for some cases of stuck loop-erased random walks; added documentation for random_spanning_tree()
[SVN r63557]
2010-07-03 19:50:49 +00:00
Jeremiah Willcock 326b4ab542 Fixed typo
[SVN r63556]
2010-07-03 19:11:13 +00:00
Jeremiah Willcock 06f8e40a12 Merged r62693, r62932, r62933, r62998, r62999, r63000, r63002, r63048, r63049, r63084, r63189, r63190, r63227, r63234, r63241, r63244, r63268, r63269, r63329, r63332, r63333, r63334, r63335, r63405, r63466, r63472, r63511, r63530, r63535, r63536, r61796, and r61841 from trunk
[SVN r63554]
2010-07-03 18:37:39 +00:00
Jeremiah Willcock 51d0b63c54 Added commented out new exe line
[SVN r63536]
2010-07-03 01:22:22 +00:00
Jeremiah Willcock 783d79bba3 Changed BGL Graphviz writer to use Xpressive to avoid need to link to libboost_regex
[SVN r63535]
2010-07-03 01:14:58 +00:00
Jeremiah Willcock f86b056a60 Changed to using const reference for input graphs; added Incidence Graph requirements to documentation; fixes #4386
[SVN r63530]
2010-07-02 19:30:52 +00:00
Jeremiah Willcock b383f407a6 Fixed broken link
[SVN r63511]
2010-07-02 01:07:19 +00:00
Jeremiah Willcock 1f2789531e Removed unnecessary declarations
[SVN r63472]
2010-07-01 14:04:29 +00:00
Jeremiah Willcock 9ff5074af0 Fixed various BGL documentation bugs; fixes #4386
[SVN r63466]
2010-07-01 04:46:09 +00:00
Jeremiah Willcock fab9ffcb37 Applied patch from #4384; fixes #4384
[SVN r63405]
2010-06-28 13:21:08 +00:00
Jeremiah Willcock 6e96d8e2f4 Made identity_property_maps typed
[SVN r63335]
2010-06-26 02:18:06 +00:00
Jeremiah Willcock e896bf8a41 Added (undocumented) functions for loop-erased random walk and random generation of spanning trees
[SVN r63334]
2010-06-26 00:43:33 +00:00
Jeremiah Willcock 033b0735eb Added default constructors to some function objects
[SVN r63333]
2010-06-26 00:42:34 +00:00
Jeremiah Willcock 4e1009cac7 Fixed header inclusion order
[SVN r63332]
2010-06-26 00:42:15 +00:00
Jeremiah Willcock 78c4cc350b Fixed typo
[SVN r63329]
2010-06-25 23:44:26 +00:00
Jeremiah Willcock 97f72f10fe Added more quoting
[SVN r63269]
2010-06-23 20:51:30 +00:00
Jeremiah Willcock 0b69e667f0 Made Graphviz writer quote and escape output strings properly; added linkage to boost_graph in test program; added note about needing -lboost_regex in documentation
[SVN r63268]
2010-06-23 20:46:22 +00:00
Jeremiah Willcock 753900a4a0 Added boost:: to all uses of tie() to disambiguate from std version
[SVN r63244]
2010-06-22 18:02:43 +00:00
Jeremiah Willcock 6e72c1f445 Boykov-Kolmogorov max-flow updates and some small typo fixes
[SVN r63241]
2010-06-22 15:38:02 +00:00
Jeremiah Willcock b474768cd0 Disambiguated boost::tie
[SVN r63234]
2010-06-22 14:38:45 +00:00
Andrew Sutton b6161b1cb2 Fixed some missing name changes in the documentation.
[SVN r63227]
2010-06-22 13:11:03 +00:00
Andrew Sutton ac874068dd Adding new bk_maxflow reference to the ToC.
[SVN r63190]
2010-06-21 15:43:42 +00:00
Andrew Sutton 26f16eb0e2 Renaming kolmogorov_max_flow to boykov_kolmogorov_max_flow.
At the request of the authors of the published algorithm, the header
and all associated functions, data types, tests, examples, and docs
should be renamed to boykov_kolmogorov. Branched all of the necessary
documents and renamed all such functions and data types.

Added deprecation warnings to the kolmogorov_max_flow.hpp and to the
kolmogorov_max_flow.html.


[SVN r63189]
2010-06-21 15:35:42 +00:00
Daniel James b90204bf75 Update various libraries' documentation build.
Mostly to use the images and css files under doc/src instead of
doc/html, usually be deleting the settings in order to use the defaults.
Also add 'boost.root' to some builds in order to fix links which rely on
it.

[SVN r63146]
2010-06-20 18:00:48 +00:00
Jeremiah Willcock 6d7c351c5b Qualified calls to boost::tie to disambiguate from std::tr1 version
[SVN r63084]
2010-06-18 20:30:30 +00:00
Jeremiah Willcock f562f8061f Made OSPF example run correctly
[SVN r63049]
2010-06-17 17:46:46 +00:00
Jeremiah Willcock 4078644f3a Updated OSPF example to use now GraphViz interfaces
[SVN r63002]
2010-06-15 21:08:36 +00:00
Jeremiah Willcock 6e86b10353 Changed write_graphviz dynamic_properties overloads to write_graphviz_dp to disambiguate them, plus removed more obsolete GraphViz reader stuff
[SVN r63000]
2010-06-15 21:07:22 +00:00
Jeremiah Willcock 9196ee6cfd Added OSPF to example list to compile automatically
[SVN r62999]
2010-06-15 21:01:37 +00:00
Jeremiah Willcock 75a0bd67a0 Reverted r62693 (order of discover_vertex and examine_edge); refs #3137
[SVN r62998]
2010-06-15 20:59:42 +00:00
Jeremiah Willcock 917fb11348 Fixed graph construction; fixes #4342
[SVN r62933]
2010-06-14 15:37:53 +00:00
Jeremiah Willcock 90a71f990e Fixed missing variables; fixes #4343
[SVN r62932]
2010-06-14 15:36:12 +00:00
Jeremiah Willcock 7330452212 Swapped order of visitor calls; fixes #3137
[SVN r62693]
2010-06-09 21:11:43 +00:00
Jeremiah Willcock 706f23a02d Added fixes and tests for CSR in_edge_iterator; fixes #4310, #4311
[SVN r62592]
2010-06-08 19:07:52 +00:00
Jeremiah Willcock d6eb198e36 Fixed comment; fixes #4285
[SVN r62406]
2010-06-03 15:46:58 +00:00
Jeremiah Willcock cb2d8619c5 Added include guard; fixes #4284
[SVN r62405]
2010-06-03 15:46:26 +00:00
Jeremiah Willcock a0d982cdb4 Fixed spelling typo
[SVN r62099]
2010-05-19 23:07:11 +00:00
Jeremiah Willcock c048688bfa Removed third condition from list of preconditions; fixes #3807 again
[SVN r62098]
2010-05-19 16:57:47 +00:00
Jeremiah Willcock 87b7eb047d Removed use of fraction_tolerance to match new Boost.Test interfaces
[SVN r62046]
2010-05-16 21:22:27 +00:00
Douglas Gregor d6a48882b1 Merge standards-conformance fixes for Boost.Graph to trunk
[SVN r61869]
2010-05-09 01:53:28 +00:00
Jeremiah Willcock 3db3c55bf4 Added proper size for disjoint_sets structure
[SVN r61841]
2010-05-07 17:18:44 +00:00
Jeremiah Willcock e98b1efd21 Applied patch from #4197 to fix copy constructor; fixes #4197
[SVN r61824]
2010-05-06 16:58:19 +00:00
Jeremiah Willcock 1a51b383ff Fixed various bugs in incremental_components and its example, plus made that example build by default
[SVN r61796]
2010-05-05 18:49:40 +00:00
Jeremiah Willcock b1e8eeacd7 Fixed documentation of edge()
[SVN r61795]
2010-05-05 18:40:47 +00:00
Jeremiah Willcock 61109b6b34 Added canonical_ordering to list of built examples
[SVN r61794]
2010-05-05 18:37:37 +00:00
Jeremiah Willcock b99db562e3 Patched unqualified calls to tie() using patch in #4190; fixes #4190
[SVN r61793]
2010-05-05 18:28:39 +00:00
Jeremiah Willcock 725a5910d7 Fixed warnings from Clang
[SVN r61769]
2010-05-04 17:34:00 +00:00
Jeremiah Willcock 6af93735fd Disambiguated RNG
[SVN r61748]
2010-05-03 20:40:48 +00:00
Douglas Gregor 21c9b6e553 Various standards-conformation fixes for Boost.Graph. Fixes #4157
[SVN r61666]
2010-04-29 00:42:35 +00:00
Eric Niebler 53842df1cb Merged revisions 61263 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r61263 | jewillco | 2010-04-13 17:16:21 -0700 (Tue, 13 Apr 2010) | 1 line
  
  Disambiguated begin and end;
........


[SVN r61633]
2010-04-27 22:56:23 +00:00
Jeremiah Willcock 00dcf87246 Fixed ambiguity errors from regression tests
[SVN r61543]
2010-04-24 16:49:39 +00:00
Jeremiah Willcock 69fb3ed70c Merged r61245 (VC++ 10 error and warning fixes) from trunk
[SVN r61522]
2010-04-24 01:13:43 +00:00
Jeremiah Willcock 71ecfa425e Switched to property maps and get/put for most internal data structures
[SVN r61367]
2010-04-18 17:50:20 +00:00
Jeremiah Willcock eb36987fec Merged r61326 (small bug fix) from trunk
[SVN r61359]
2010-04-18 14:46:58 +00:00
Jeremiah Willcock e9fcb04d9f Fixed wrong number of arguments in call to target() in edge()
[SVN r61326]
2010-04-16 19:49:48 +00:00
Jeremiah Willcock e66d822b25 Added test case names to try to get better output on failures
[SVN r61275]
2010-04-14 14:19:38 +00:00
Jeremiah Willcock a74dac8d15 Fixed error from regression tests
[SVN r61274]
2010-04-14 14:18:44 +00:00
Jeremiah Willcock 0dd699a355 Disambiguated begin and end; fixes #4099
[SVN r61263]
2010-04-14 00:16:21 +00:00
Jeremiah Willcock c19fbafcf6 Fixed VC10 errors and warnings in subgraph tests; fixes #4093
[SVN r61245]
2010-04-13 13:55:20 +00:00
Jeremiah Willcock ce5aba9799 Merged r61231 and r61232 from trunk
[SVN r61233]
2010-04-12 21:08:02 +00:00
Jeremiah Willcock 904819f886 Cleaned up BGL layout docs, split topology docs into separate file
[SVN r61232]
2010-04-12 21:00:24 +00:00
Jeremiah Willcock a3fa432c9f Fixed fr_layout example and added it to Jamfile
[SVN r61231]
2010-04-12 20:07:26 +00:00
Jeremiah Willcock 0c75ddee03 Added more diagnostics
[SVN r61085]
2010-04-05 21:23:35 +00:00
Jeremiah Willcock ae1242ca4a Changed to Boost.Range for duplicate algorithms, merging the rest of r60919 from trunk
[SVN r61084]
2010-04-05 21:16:50 +00:00
Neil Groves b13d8ec429 Fix duplication of algorithms by delegating to the specific Boost.Range algorithm header files.
This avoids pulling in any more names than necessary for maximum backward compatibility.
Also the old algorithms that are not duplicated have been reinstated again to maximize backward compatibility.

[SVN r61049]
2010-04-04 19:19:58 +00:00
Jeremiah Willcock 7b548b372f Applied changes r58876, r59133, r59134, r59628, r60078, r60079, r60126, r60127, r60196, r60197, r60198, r60365, r60366, r60384, r60385, r60472, r60485, r60610, r60611, r60651, r60769, r60770, r60899, r60900, r60916, r60919, r60920, r60958, r60998, r60999, r61000 from trunk, except for changes to <boost/detail/algorithm.hpp> which are waiting for Boost.Range algorithms to be merged; added find_if to <boost/detail/algorithm.hpp>
[SVN r61001]
2010-04-02 15:25:11 +00:00
Jeremiah Willcock 14a8a21105 Applied another patch (unordered_equal_range_dispatch.2.patch) from #3972; fixes #3972
[SVN r60999]
2010-04-02 15:06:13 +00:00
Jeremiah Willcock 109cdf39be Fixed VC++ warning
[SVN r60998]
2010-04-02 15:05:44 +00:00
Jeremiah Willcock 1a52f5132f Added vertex_bundle and edge_bundle property maps, plus fixed some property map allocation bugs
[SVN r60958]
2010-03-30 17:50:27 +00:00
Jeremiah Willcock a9e93bfe92 Removed unused iota function, changed the two uses of any_if to use find_if instead, using Boost.Range for the other algorithms to avoid redundancies
[SVN r60919]
2010-03-29 17:30:52 +00:00
Jeremiah Willcock 373aabbf5b Added printout of successful tests to try to debug mingw problem
[SVN r60916]
2010-03-29 16:40:56 +00:00
Jeremiah Willcock 1d882adf30 Added missing include
[SVN r60900]
2010-03-28 18:32:05 +00:00
Jeremiah Willcock 3ca99558ff Added preconditions on graph listed in #3807; fixes #3807
[SVN r60899]
2010-03-28 18:16:51 +00:00
Jeremiah Willcock 1ba64f82ec Re-enabled Spirit-based parser (but not by default) and cleaned up Graphviz reader implementation
[SVN r60770]
2010-03-22 19:16:38 +00:00
Jeremiah Willcock 0f4d9c80a1 Fixed warning (and probable bug) in test case
[SVN r60769]
2010-03-22 18:33:00 +00:00
Jeremiah Willcock b76090ad8d Fixed typo
[SVN r60651]
2010-03-16 18:00:27 +00:00
Andrew Sutton fad45bcb1b Addressing #3816. Moved array_binary tree to top-level boost namespace,
which seems to be where most basic data structures. The change introduces
no name collisions, since its only user is mutable_queue. This change
deprecates the use of adstl::array_binary_tree for all users.


[SVN r60611]
2010-03-15 11:22:16 +00:00
Andrew Sutton dababea605 Reviewed and applied patch from #4004. Removed one ", which" change since
the resulting change made the trailing clause read as if it applied to
the wrong type.



[SVN r60610]
2010-03-15 11:00:35 +00:00
Jeremiah Willcock c03ffc7c3e Added bipartite graph algorithms from Matthias Walter
[SVN r60485]
2010-03-11 16:56:01 +00:00
Jeremiah Willcock 8dc3d67377 Updated broken link
[SVN r60385]
2010-03-09 18:11:08 +00:00
Jeremiah Willcock 319cbc4947 Fixed tabs
[SVN r60384]
2010-03-09 18:11:00 +00:00
Jeremiah Willcock 205d3176a7 Changed to use property_traits in preparation for SFINAE-enabled property_traits
[SVN r60365]
2010-03-08 19:43:09 +00:00
Jeremiah Willcock 32d2dd1124 Added in container_traits and adjacency_list patches to fix unordered container issues (patch from #3972); fixes #3972
[SVN r60198]
2010-03-05 18:27:43 +00:00
Jeremiah Willcock 63bca89427 Fixed typo
[SVN r60197]
2010-03-05 18:13:48 +00:00
Jeremiah Willcock 5e3a6a954a Added property_put class from Matthias Walter
[SVN r60196]
2010-03-05 17:44:16 +00:00
Jeremiah Willcock 19a0adaf64 Removed unnecessary BOOST_STATIC_ASSERTs
[SVN r60127]
2010-03-03 18:50:48 +00:00
Jeremiah Willcock c1164d8bb9 Workaround for GCC 3.4 and 4.0 bug
[SVN r60126]
2010-03-03 18:44:42 +00:00
Jeremiah Willcock c793b7a9ec Changed to allow characters that are not 8-bit; added one-bit-per-color color map
[SVN r60079]
2010-03-02 19:53:47 +00:00
Jeremiah Willcock 6810d4167d Applied patch from Andy Tompkins in #3917; fixes #3917
[SVN r59628]
2010-02-10 22:10:10 +00:00
Jeremiah Willcock 5e9cac2ed6 Fixed bookmark errors
[SVN r59133]
2010-01-18 18:31:13 +00:00
Jeremiah Willcock afab978e75 Merged r59005 from trunk, commenting out debugging code
[SVN r59031]
2010-01-15 10:30:32 +00:00
Jeremiah Willcock c170e069ae Commented out debugging code
[SVN r59005]
2010-01-14 17:06:30 +00:00
Jeremiah Willcock 6d19c10ed6 Changed to BOOST_THROW_EXCEPTION (except in one test case)
[SVN r58876]
2010-01-10 18:54:01 +00:00
Jeremiah Willcock aec5b30a0f Merged r58783 from trunk, fixing doc typo
[SVN r58784]
2010-01-07 00:17:39 +00:00
Jeremiah Willcock b5138b89ac Fixed typo
[SVN r58783]
2010-01-07 00:15:38 +00:00
Jeremiah Willcock 9d0640b614 Merged changes from trunk that are going into 1.42.0
[SVN r58554]
2009-12-29 03:50:53 +00:00
Jeremiah Willcock 1917131f0f Split enum definition and object definition to work around issue in GCC 3.2; fixes #3795
[SVN r58531]
2009-12-26 20:30:58 +00:00
Jeremiah Willcock 93b0fbf23e Added link to Parallel BGL docs
[SVN r58427]
2009-12-17 13:44:08 +00:00
Jeremiah Willcock c0b6e0933d Added note about swapped parameters
[SVN r58400]
2009-12-15 18:38:22 +00:00
Jeremiah Willcock 8cccc3c027 Removed obsolete settings, added regex to requirements for users
[SVN r58219]
2009-12-07 14:11:42 +00:00
Jeremiah Willcock 2eca482bec Changed to property_tree copy of encode_char_entities
[SVN r58180]
2009-12-06 03:53:14 +00:00
Jeremiah Willcock f3af4d1a4e Factored out declspec code; added BOOST_GRAPH_SOURCE where necessary
[SVN r58179]
2009-12-06 03:51:08 +00:00
Jeremiah Willcock 4a3a1b5b70 Fixed Template Parameters section to mention bidirectionalS
[SVN r58124]
2009-12-03 18:16:39 +00:00
Jeremiah Willcock 77be6de60e Made traits classes into structs to fix access control errors
[SVN r58114]
2009-12-03 15:40:50 +00:00
Jeremiah Willcock 744a588308 Made vertex_property_type and edge_property_type traits lazier in filtered_graph
[SVN r58090]
2009-12-01 20:25:18 +00:00
Jeremiah Willcock 0737b42364 Changed to Boost.Unordered to fix deprecation warnings
[SVN r58089]
2009-12-01 19:57:23 +00:00
Jeremiah Willcock 0ccfbb5754 Fixed another linkage issue
[SVN r58087]
2009-12-01 19:42:56 +00:00
Jeremiah Willcock 97e1916248 Removed uses of abort() and fixed DLL linkage issues for Windows Mobile
[SVN r58086]
2009-12-01 19:38:49 +00:00
Jeremiah Willcock ba2d8eeffc Added missing #include
[SVN r58061]
2009-11-30 17:17:45 +00:00
Jeremiah Willcock a4af699063 Removed Expat condition since it is no longer required
[SVN r58039]
2009-11-29 21:03:01 +00:00
Jeremiah Willcock 10135eeab5 Removed Expat stuff since it is no longer needed
[SVN r58038]
2009-11-29 20:51:20 +00:00
Jeremiah Willcock dd07cb4c5a Added fix from bug 3695; fixes #3695
[SVN r58037]
2009-11-29 20:43:51 +00:00
Jeremiah Willcock e5aebbcc97 Rewrote GraphML parser to use Boost.PropertyTree; fixes #3300
[SVN r58035]
2009-11-29 20:35:25 +00:00
Jeremiah Willcock d00948cef3 Fixed missing #endif
[SVN r58005]
2009-11-28 15:22:48 +00:00
Jeremiah Willcock 8431fde428 Added lookup_edge() function as wrapper for graphs that do not model AdjacencyMatrix; changed functions to use it instead of edge(); added is_adjacency_matrix traits class; updated docs to reflect Adjacency Matrix requirements and suggestions; fixes #3266
[SVN r57928]
2009-11-25 21:56:36 +00:00
Jeremiah Willcock e47d3c4c5a Added note about parallel edges to docs
[SVN r57914]
2009-11-24 22:34:25 +00:00
Jeremiah Willcock fa50529664 Loosened up what can be passed as an edge property to add_edge(); fixes #3521
[SVN r57913]
2009-11-24 22:11:27 +00:00
Jeremiah Willcock 4124f2c7ff Changed several functions to work on root subgraphs; fixes #575
[SVN r57911]
2009-11-24 21:43:43 +00:00
Jeremiah Willcock 1d018bbeab Fixed graph property constness issues
[SVN r57910]
2009-11-24 21:35:30 +00:00
Jeremiah Willcock 08d4597f35 Fixed issues with property map types in reverse_graph; fixes #447
[SVN r57909]
2009-11-24 21:26:06 +00:00
Jeremiah Willcock 616543e629 Removed code left in by mistake
[SVN r57907]
2009-11-24 21:00:16 +00:00
Jeremiah Willcock ab3e981794 Added vertex() function
[SVN r57903]
2009-11-24 20:31:40 +00:00
Jeremiah Willcock 2d7c00159e Fixed uses of undocumented members of graph types; fixes #1021; fixes #2072
[SVN r57902]
2009-11-24 20:17:54 +00:00
Jeremiah Willcock 09496c3696 Removed obsolete file
[SVN r57901]
2009-11-24 19:43:16 +00:00
Jeremiah Willcock b2636ec3ea Removed old CSR interface; fixes #3135
[SVN r57898]
2009-11-24 18:38:28 +00:00
Jeremiah Willcock 5478788f98 Added extra casts to fix VC++ warnings; fixes #3562
[SVN r57895]
2009-11-24 17:08:17 +00:00
Jeremiah Willcock dfb0e1ab90 Changed vertex_iterator to have vertex_descriptor rather than vertices_size_type as its value type
[SVN r57894]
2009-11-24 17:07:49 +00:00
Jeremiah Willcock 88cc021588 Changed warning syntax for VC++; fixes #3629
[SVN r57892]
2009-11-24 16:33:49 +00:00
Jeremiah Willcock 770ce8cf86 More rearrangement
[SVN r57613]
2009-11-12 19:36:27 +00:00
Jeremiah Willcock f9cc40283c Fixed issues in docs, especially ToC; refs #3615
[SVN r57601]
2009-11-12 19:11:58 +00:00
Jeremiah Willcock 42cf78c555 Changed to boost::unordered_* containers instead of compiler-specific ones; made hashed containers enabled always
[SVN r57560]
2009-11-11 02:59:25 +00:00
Jeremiah Willcock bf679e7e19 Fixed warnings
[SVN r57559]
2009-11-11 02:57:44 +00:00
Jeremiah Willcock 9355c68e52 Fixed warnings
[SVN r57544]
2009-11-10 16:54:01 +00:00
Jeremiah Willcock c1f12a21b0 Removed /GR- option for VC++ 8.0
[SVN r57433]
2009-11-06 08:07:28 +00:00
Jeremiah Willcock e553d1acf8 Merged r57412 (Removed obsolete LICENSE file) from trunk
[SVN r57414]
2009-11-05 17:44:05 +00:00
Jeremiah Willcock 4279beb707 Removed obsolete LICENSE file (no longer used by any source files)
[SVN r57412]
2009-11-05 17:38:01 +00:00
Jeremiah Willcock 76083c7e67 Fixed bind ambiguity; fixes #3569
[SVN r57177]
2009-10-27 18:05:50 +00:00
Troy D. Straszheim b237a6ee82 rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back
[SVN r56942]
2009-10-17 02:07:38 +00:00
Troy D. Straszheim 6a287972d4 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
Andrew Sutton bc3a645196 Merging r56922 from trunk. Removes FP comparison to avoid asserts when they're
inaccurate.


[SVN r56923]
2009-10-16 15:15:52 +00:00
Andrew Sutton dced37cf67 Removed assertions that may depend on FP precision.
[SVN r56922]
2009-10-16 14:57:15 +00:00
Jeremiah Willcock 801a11bf4a Merged in changes from trunk for Boost.Graph and Boost.PropertyMap. Includes
r56013, r56014, r56015, r56016, r56017, r56089, r56097, r56116, r56117, r56126,
r56127, r56128, r56140, r56147, r56300, r56301, r56339, r56360, r56454, r56473,
r56563, r56651, r56654, r56658, r56682, r56732, r56796, r56855, r56856, r56868,
r55667, r56860, r55473, r55507, r55528, r55749, r56147, r55723, r56109, r56859,
and r55780.


[SVN r56881]
2009-10-15 20:40:46 +00:00
Jeremiah Willcock e5936c730d Removed unnecessary include of Phoenix 2; fixes #3524
[SVN r56868]
2009-10-15 15:21:21 +00:00
Jeremiah Willcock f41358a7ee Fixed numlocalverts bug
[SVN r56856]
2009-10-14 23:41:53 +00:00
Jeremiah Willcock 93fae3dece Flipped order in convertibility test, fixes #3523 accidentally introduced in r52110
[SVN r56855]
2009-10-14 23:27:51 +00:00
Jeremiah Willcock a880fcbde7 Small wording changes
[SVN r56797]
2009-10-13 19:28:05 +00:00
Jeremiah Willcock 07671f91e3 Merged c56654 from trunk
[SVN r56791]
2009-10-13 16:40:37 +00:00
Jeremiah Willcock f2d850e4f9 Fixed bugs in F-R layout
[SVN r56732]
2009-10-12 15:01:29 +00:00
Jeremiah Willcock 53221f13ab Removed old parameters from test code
[SVN r56682]
2009-10-09 20:15:09 +00:00
Jeremiah Willcock 1d66d04fc1 Fixed duplicate base class problem
[SVN r56658]
2009-10-08 19:42:53 +00:00
Jeremiah Willcock ab16f809a0 Fixed up origin and extent computations in Fruchterman-Reingold layout
[SVN r56654]
2009-10-08 17:57:19 +00:00
Jeremiah Willcock 51182ecec6 Changed to use pointer to underlying RNG
[SVN r56651]
2009-10-08 16:19:23 +00:00
Jeremiah Willcock 0899a49611 Changed from Vertex() to null_vertex() in examples; refs #3506
[SVN r56563]
2009-10-04 01:48:16 +00:00
Jeremiah Willcock d2d80c64da Another attempt at a CSR edges() fix
[SVN r56473]
2009-09-29 16:33:35 +00:00
Jeremiah Willcock 5c1a27890c Fixed bug in CSR edges() function
[SVN r56454]
2009-09-28 15:40:24 +00:00
Jeremiah Willcock 5810b885a7 Made some members public to appease various gcc versions
[SVN r56339]
2009-09-21 16:15:21 +00:00
Jeremiah Willcock 35a3b60e5d Fixed name qualification problem
[SVN r56300]
2009-09-18 20:11:50 +00:00
Jeremiah Willcock fe10254f0c Added fixes to grid graph from Michael Hansen
[SVN r56147]
2009-09-11 17:52:43 +00:00
Jeremiah Willcock 1768443b87 Added information about bidirectional support to CSR documentation
[SVN r56140]
2009-09-10 17:36:35 +00:00
Jeremiah Willcock 454cc349a1 Refactored and added bidirectional CSR support; fixes #3386
[SVN r56128]
2009-09-09 21:29:17 +00:00
Jeremiah Willcock f0d4890326 Fixed deprecated header file
[SVN r56127]
2009-09-09 21:28:25 +00:00
Jeremiah Willcock 818124bc40 Fixed tab
[SVN r56126]
2009-09-09 21:13:29 +00:00
Jeremiah Willcock c12358b15b Changed directedS case to a specialization
[SVN r56117]
2009-09-08 23:36:49 +00:00
Jeremiah Willcock 50bc92b159 Refactored CSR graph code to get ready for bidirectional support
[SVN r56116]
2009-09-08 22:55:05 +00:00
Jeremiah Willcock 722e0c6cc6 Applied unapplied parts of bug 3426; fixes #3426
[SVN r56109]
2009-09-08 17:13:10 +00:00
Jeremiah Willcock b1231d3469 Removed unused variable due to comment from Gordon Smith
[SVN r56097]
2009-09-07 22:27:06 +00:00
Jeremiah Willcock a7a18787e9 Applied fixes for bugs; fixes #3409, #3414, #3415, #3416
[SVN r56089]
2009-09-07 14:55:38 +00:00
Jeremiah Willcock f9341ebe86 Added edge() function for new interface of CSR graph, enabling it to work with the Kolmogorov max-flow algorithm
[SVN r56017]
2009-09-04 15:08:02 +00:00
Jeremiah Willcock 8258ae5b51 Added qualification to has_no_vertices in cuthill_mckee_ordering; fixes #3376
[SVN r56016]
2009-09-04 14:54:24 +00:00
Jeremiah Willcock 4e015739c4 Added fixes to and a test for incremental_components from Michael Hansen; fixes #3250
[SVN r56015]
2009-09-04 14:49:24 +00:00
Jeremiah Willcock 5fe4310658 Stopped requiring vertex() function for graphs being copied into CSR format
[SVN r56014]
2009-09-04 14:47:57 +00:00
Andrew Sutton a04721f0ed Added partial content for edge_list.
Considering alternative documentation structure for adjacency_list.


[SVN r55997]
2009-09-03 13:44:54 +00:00
Andrew Sutton e54ede1993 Working on quickbook docs.
Restructuring parts of the user's guide.
Removed some concepts and fixed issues with others.
Added (incomplete) adjacency_matrix docs.


[SVN r55976]
2009-09-02 14:23:27 +00:00
Jeremiah Willcock 027f256b52 Added copyright and license info from Michael Hansen
[SVN r55780]
2009-08-25 20:55:22 +00:00
Jeremiah Willcock ab7510ba75 Added more name qualifications for VC 7.1
[SVN r55749]
2009-08-24 02:34:39 +00:00
Jeremiah Willcock 02891de03f Added doc updates from Michael Hansen
[SVN r55723]
2009-08-22 20:54:16 +00:00
Jeremiah Willcock f20a8aa9b5 Fixed edge doubling for copying from an undirected graph to a CSR graph; fixes #3357
[SVN r55667]
2009-08-19 20:54:42 +00:00
Jeremiah Willcock c9c6f4b631 Added extra space to work around buggy preprocessors
[SVN r55528]
2009-08-11 16:36:11 +00:00
Jeremiah Willcock 1ef53b2d50 Fixed missing headers (merged over from trunk)
[SVN r55508]
2009-08-10 17:57:42 +00:00
Jeremiah Willcock 600bb3f37c Spelling fixes from Michael Hansen
[SVN r55507]
2009-08-10 17:51:53 +00:00
Jeremiah Willcock 1a4e9ef4ad Copied over fixed docs from trunk
[SVN r55506]
2009-08-10 17:35:22 +00:00
Jeremiah Willcock f87613ea1b Added grid graph from Michael Hansen
[SVN r55473]
2009-08-08 18:58:07 +00:00
Jeremiah Willcock 20fd0bef2d Fixed broken lines
[SVN r55472]
2009-08-08 18:54:13 +00:00
Jeremiah Willcock 24c0b6db9d Fixed missing includes
[SVN r55471]
2009-08-08 18:53:56 +00:00
Jeremiah Willcock 33af3494f7 Merged in changes from trunk
[SVN r55467]
2009-08-08 18:19:53 +00:00
Jeremiah Willcock fd3a5f46f5 Changed include guard
[SVN r55464]
2009-08-08 17:45:56 +00:00
Jeremiah Willcock a1d6cf2106 Merged r55265, r55266, r55355, and r55356 from trunk, hopefully fixing VC++ problems; removed VC++ from csr_graph_test known failures for regression tests
[SVN r55357]
2009-08-02 02:46:12 +00:00
Jeremiah Willcock c748a400e9 Removed #if 0ed out code
[SVN r55356]
2009-08-02 02:43:20 +00:00
Jeremiah Willcock 4af9462b74 Merged in r55353 from trunk
[SVN r55354]
2009-08-02 02:25:44 +00:00
Jeremiah Willcock 5eee5fa952 Added missing property iterator update
[SVN r55353]
2009-08-02 02:06:53 +00:00
Jeremiah Willcock 3b3977cd3e Commented out (probably) redundant code
[SVN r55266]
2009-07-29 16:48:50 +00:00
Jeremiah Willcock 2566623af3 Changing to explicit property specializations for vertex_index_t and edge_index_t to try to work around VC++ bugs
[SVN r55265]
2009-07-29 16:33:59 +00:00
Jeremiah Willcock eede6c1338 Added assertion that input file was opened correctly
[SVN r55258]
2009-07-29 12:49:44 +00:00
Jeremiah Willcock 27e1fe603f Used filename from argument list rather than hard-coded name to fix regression test problems
[SVN r55257]
2009-07-29 12:49:27 +00:00
Jeremiah Willcock 1acdecb32f Merged in r55156 from trunk; fixes to ER generator for large-scale graphs
[SVN r55157]
2009-07-25 23:30:30 +00:00
Jeremiah Willcock 483310f08a Changed to use Boost.Iterator, and fixed precision and overflow issues in the sorted generator
[SVN r55156]
2009-07-25 19:41:01 +00:00
Jeremiah Willcock 30d0e0ea2a Applied r55027 from trunk, except cycle_ratio_example.cpp which was already fixed
[SVN r55045]
2009-07-20 15:07:14 +00:00
Jeremiah Willcock 0b53b0b00a Fixed tab issues found by inspect tool
[SVN r55027]
2009-07-19 15:32:27 +00:00
Andrew Sutton 083d6b83aa Integrated new implementation of howard's cycle ratio algorithm. It's an
optimization and cleanup from the older version. Note that this breaks
source compatability in one instance.


[SVN r54999]
2009-07-17 14:56:19 +00:00
Andrew Sutton 925fd6a2d6 Adding edge-list requirements to write-grapviz function(s) and documentation,
fixing #3259.


[SVN r54995]
2009-07-17 13:02:17 +00:00
Jeremiah Willcock 9a9bd728e7 Added note about bug in component_index; refs #3250
[SVN r54846]
2009-07-09 23:21:58 +00:00
Andrew Sutton 0b60534904 Changed the default probability to the sorted_erdos_renyi_generator to 0.5
in order to avoid assertion.
Fixed a couple of warnings in rmat and small_world generators.


[SVN r54769]
2009-07-07 13:02:32 +00:00
Andrew Sutton 06c0e7e505 Merged doc fix. Addressing #3191.
[SVN r54766]
2009-07-07 12:31:50 +00:00
Andrew Sutton 883beb8102 Added a link to the adjacency matrix concept in the ToC.
[SVN r54765]
2009-07-07 12:20:30 +00:00
Jeremiah Willcock 7552f02d05 Merged patches from messages 55-57 of #3134, plus r54737; refs #3134
[SVN r54738]
2009-07-07 00:32:10 +00:00
Nicholas Edmonds 394757f512 Added add_vertices and add_edges calls with global-to-local maps and resolved ambiguous overloads resulting from the new forms.
[SVN r54737]
2009-07-07 00:21:15 +00:00
Jeremiah Willcock cdcb54e084 Made add_vertex and add_vertices work with new CSR interface; fixed add_edges stuff to work with edge properties; refs #3134
[SVN r54703]
2009-07-06 04:21:48 +00:00
Jeremiah Willcock 38dd3d15fa Added add_edges() function with edge properties; refs #3134
[SVN r54684]
2009-07-05 20:35:44 +00:00
Jeremiah Willcock d4078044ad Added customizable source data type; refs #3134
[SVN r54596]
2009-07-02 20:17:27 +00:00
Jeremiah Willcock b0e4e9fa01 Merged patches mentioned in comments 34-53 from ticket 3134 into release branch; refs #3134
[SVN r54540]
2009-06-30 17:08:49 +00:00
Jeremiah Willcock 2e70900dce Fixed typo; refs #3134
[SVN r54539]
2009-06-30 16:57:26 +00:00
Jeremiah Willcock de12ad6911 Allowed use of reserve_count_for_single_pass with old interface; refs #3134
[SVN r54538]
2009-06-30 16:55:07 +00:00
Nicholas Edmonds 414f2b1af0 Added a check to make sure edge source indices are in range for in-place CSR ctor
refs #3134



[SVN r54514]
2009-06-30 00:46:16 +00:00
Jeremiah Willcock 82c88cb90e Added global-to-local maps to all filtered constructors; refs #3134
[SVN r54415]
2009-06-27 19:57:58 +00:00
Nicholas Edmonds 30602358e9 Changed default VertexProperty and EdgeProperty from void to no_property so that indexed_edge_property doesn't try to form references to void.
refs #3134



[SVN r54412]
2009-06-27 19:37:06 +00:00
Nicholas Edmonds 1645bd1bb9 Changed all instances of inherited_edge_properties::edge_property_type to inherited_edge_properties::edge_bundled as edge_property_type is always no_property for CSR.
refs #3134



[SVN r54389]
2009-06-26 23:52:13 +00:00
Jeremiah Willcock 2641f77ab6 Added global, filtered CSR constructors from sorted edge sets
[SVN r54386]
2009-06-26 23:06:38 +00:00
Jeremiah Willcock b1554dfafb Fixed VC++ issue; refs #3134
[SVN r54378]
2009-06-26 16:08:15 +00:00
Jeremiah Willcock c1979501bb Added McGregor algorithm to ToC; patch from Michael Hansen; refs #3134
[SVN r54344]
2009-06-25 17:05:50 +00:00
Jeremiah Willcock d5e29e90c1 Added doc fixes from Michael Hansen; refs #3134
[SVN r54343]
2009-06-25 16:59:38 +00:00
Jeremiah Willcock 5a01455ca3 Added example for McGregor algorithm from Michael Hansen; refs #3134; fixes #694
[SVN r54342]
2009-06-25 16:51:17 +00:00
Jeremiah Willcock 9574e5a490 Added documentation from Michael Hansen; refs #3134
[SVN r54341]
2009-06-25 16:29:57 +00:00
Jeremiah Willcock 90a8d79f4d Added patches from Michael Hansen; refs #3134
[SVN r54337]
2009-06-25 16:24:20 +00:00
Jeremiah Willcock 71830942e6 Added capability to add sorted edge/property sets to CSR graphs; refs #3134
[SVN r54316]
2009-06-24 20:44:53 +00:00
Jeremiah Willcock 8be1112040 Added McGregor updates from Michael Hansen; refs #3134
[SVN r54315]
2009-06-24 20:31:50 +00:00
Jeremiah Willcock 8ca5d4e494 Fixed min/max issue using patch from Michael; refs #3134
[SVN r54278]
2009-06-23 14:18:24 +00:00
Jeremiah Willcock 3a4213ff02 Added test case for McGregor algorithm from Michael; refs #3134
[SVN r54216]
2009-06-22 19:40:39 +00:00
Jeremiah Willcock 5f402c0c31 Added changes from Michael; refs #3134
[SVN r54214]
2009-06-22 19:33:05 +00:00
Jeremiah Willcock 84a790d954 Added new code from Michael Hansen; refs #3134
[SVN r54069]
2009-06-18 22:21:12 +00:00
Jeremiah Willcock 872308b277 Merged in commits on trunk mentioned in comments 1-32 of #3134, plus r54059 not listed there; refs #3134
[SVN r54064]
2009-06-18 19:34:25 +00:00
Nicholas Edmonds 5a3490da07 Removed x87 floating point precision workarounds as this was moved to boost/graph/relax.hpp in r54044.
This commit refs ticket #3134 as it will need to be merged to the release branch.



[SVN r54059]
2009-06-18 18:29:53 +00:00
Jeremiah Willcock 711e647fd2 Fixed relax() to avoid floating point precision issues
[SVN r54044]
2009-06-18 01:21:10 +00:00
Jeremiah Willcock fdfba32734 Added incremental add_edges function to new interface; refs #3134
[SVN r54023]
2009-06-17 21:05:06 +00:00
Jeremiah Willcock 9d5036e580 Added extra named parameters for McGregor maximal common subgraph algorithm; contributed by Michael Hansen; refs #3134
[SVN r53984]
2009-06-16 21:02:14 +00:00
Jeremiah Willcock c5e0a6acd0 Fixed warnings; refs #3134
[SVN r53941]
2009-06-15 18:24:59 +00:00
Jeremiah Willcock a5bbe074a6 Added header include to fix error; refs #3134
[SVN r53938]
2009-06-15 16:55:33 +00:00
Jeremiah Willcock 78a0de9f63 Turned off bundled properties for Sun CC due to compiler bug; refs #3134
[SVN r53913]
2009-06-15 00:55:35 +00:00
Jeremiah Willcock c21d244bbb Added newline to end of file; refs #3134
[SVN r53912]
2009-06-15 00:24:55 +00:00
Jeremiah Willcock eacf5f1c6d Reverted r53870 (unnecessary patch); refs #3134
[SVN r53911]
2009-06-15 00:19:08 +00:00
Jeremiah Willcock d380695958 Changed sort_pair to try to appease VC++; refs #3134
[SVN r53870]
2009-06-13 16:22:20 +00:00
Jeremiah Willcock 6d6048c9a1 Added constructors from multi-pass unsorted, filtered edge lists; refs #3134
[SVN r53837]
2009-06-12 23:40:53 +00:00
Jeremiah Willcock c523b99ddf Added more special constructors for distributed CSR; refs #3134
[SVN r53836]
2009-06-12 21:07:38 +00:00
Jeremiah Willcock 4a03e4c700 Added constructors from unsorted single-pass ranges for CSR graph by caching data in vectors; refs #3134
[SVN r53835]
2009-06-12 20:56:54 +00:00
Jeremiah Willcock cdf526c24d Changed function types to enums and removed include of iostream; refs #3134
[SVN r53834]
2009-06-12 20:25:46 +00:00
Jeremiah Willcock d249df4521 Made sort_pair a correct Strict Weak Ordering; refs #3134
[SVN r53829]
2009-06-12 18:40:10 +00:00
Jeremiah Willcock 012d41e6a5 Reduced test sizes and turned off result printing
[SVN r53826]
2009-06-12 14:58:07 +00:00
Jeremiah Willcock 37f5ad4a5f Made random graph test size configurable and reduced the regression test size to avoid timeout errors on slow machines; refs #3134
[SVN r53825]
2009-06-12 14:43:41 +00:00
Jeremiah Willcock 97e86ebe5f Fixed asserts and probability updates to handle floating point rounding errors better; refs #3134
[SVN r53806]
2009-06-12 02:02:07 +00:00
Jeremiah Willcock 84c7f22f11 Merged r53803 from release branch and rebuilt HTML docs from RST using script from that checkin
[SVN r53804]
2009-06-12 00:42:04 +00:00
Jeremiah Willcock d819683bf3 Rebuilt docs from RST files with correct path to rst.css; added script to do this; removed unused copy of RST stylesheet
[SVN r53803]
2009-06-12 00:36:21 +00:00
Jeremiah Willcock 5d033cb991 Sped up out_degree() and related functions for new interface
[SVN r53786]
2009-06-10 14:43:12 +00:00
Jeremiah Willcock cef1982db1 Fixed issues from ticket 3155; fixes #3155, refs #3134
[SVN r53778]
2009-06-09 18:04:26 +00:00
Jeremiah Willcock 9daa48bff4 Fixed issues from ticket #3151 (some using the patch there and some in other ways); fixes #3151, refs #3134
[SVN r53761]
2009-06-08 21:06:13 +00:00
Jeremiah Willcock dd5da5d657 Merged over Parallel BGL from trunk, merged over many BGL and property map changes from trunk
[SVN r53753]
2009-06-08 15:45:46 +00:00
Jeremiah Willcock 54d8958f9c Copied over character escaping code from property_tree since that library is not stable yet
[SVN r53750]
2009-06-08 14:16:06 +00:00
Jeremiah Willcock 217e527cb3 Fixed syntax of copyright entities
[SVN r53749]
2009-06-08 13:45:46 +00:00
Jeremiah Willcock e006f8ff04 Fixed inline stylesheet
[SVN r53748]
2009-06-08 13:45:08 +00:00
Andrew Sutton 016779276c Removing experimental headers. To be worked on later.
[SVN r53717]
2009-06-07 11:32:51 +00:00
Jeremiah Willcock 93dc2b2c0d Changed to shared_array_property_map
[SVN r53656]
2009-06-05 20:09:23 +00:00
Jeremiah Willcock 43b99f3fbe Reverted old version of CSR graph for compatibility, with a #define to switch between the modes; cleaned up interface of new CSR graph; fixed tests and docs accordingly
[SVN r53655]
2009-06-05 18:21:42 +00:00
Jeremiah Willcock 77b148e6db Applied patches from ticket #900; fixes #900
[SVN r53650]
2009-06-05 01:47:37 +00:00
Andrew Sutton 3d07d486b2 Re-added the exterior property labeling framework under a different name
[SVN r53556]
2009-06-01 21:44:35 +00:00
Jeremiah Willcock ee35a986a7 Changed new-style named parameter code for BGL to use shared_array_property_map, greatly simplifying interface
[SVN r53481]
2009-05-31 04:20:52 +00:00
Jeremiah Willcock 8b185359ef Fixed links to property_map library
[SVN r53475]
2009-05-31 01:32:55 +00:00
Jeremiah Willcock c9ac66d0d8 Fixed warnings
[SVN r53404]
2009-05-29 18:12:24 +00:00
Jeremiah Willcock 360e769758 Changed template parameter name to un-confuse VC 10
[SVN r53399]
2009-05-29 17:20:15 +00:00
Jeremiah Willcock c4715738db Fixed warning by removing unused variables
[SVN r53397]
2009-05-29 16:53:09 +00:00
Jeremiah Willcock b35856b2f3 Added patch from Michael Hansen
[SVN r53396]
2009-05-29 16:52:58 +00:00
Andrew Sutton dafc6fbb2b Finished basic support for local/global property references for old-style
properties. Actually adding the test file today.


[SVN r53369]
2009-05-28 22:20:48 +00:00
Jeremiah Willcock 1a184e4e2e Added more changes from Michael Hansen
[SVN r53349]
2009-05-28 17:17:49 +00:00
Andrew Sutton f789831ba9 Removing subgraph props from build.
[SVN r53341]
2009-05-28 11:35:12 +00:00
Jeremiah Willcock dfb88dedb4 Fixed conversion of parameters after end-of-list marker, as used in strong_components
[SVN r53329]
2009-05-27 22:37:56 +00:00
Jeremiah Willcock 686376231a Added more updates, docs, and tests from Michael Hansen
[SVN r53327]
2009-05-27 20:54:24 +00:00
Andrew Sutton 791a5f0e72 Augmenting property lookup strategies for subgraphs.
[SVN r53289]
2009-05-26 22:22:55 +00:00
Jeremiah Willcock 863b976726 Fixed bug in default for distance_combine
[SVN r53287]
2009-05-26 19:28:31 +00:00
Andrew Sutton f72b7b9d1d Modifications to subgraph, graph testing framework.
[SVN r53286]
2009-05-26 20:06:07 +00:00
Jeremiah Willcock bec5451742 Fixed bad syntax
[SVN r53284]
2009-05-26 16:11:25 +00:00
Jeremiah Willcock f8960081b2 Added no-color-map Dijkstra to test
[SVN r53283]
2009-05-26 16:10:45 +00:00
Jeremiah Willcock 186d6baaaa Added no-color-map version of Dijkstra's algorithm from Michael Hansen
[SVN r53282]
2009-05-26 15:42:40 +00:00
Jeremiah Willcock e7054fb090 Fixed handling of lex errors at end of input
[SVN r53269]
2009-05-26 01:13:36 +00:00
Jeremiah Willcock e9709979de Added support for HTML identifiers
[SVN r53268]
2009-05-26 01:08:48 +00:00
Jeremiah Willcock c5bcc31f22 Fixed strict graph support
[SVN r53265]
2009-05-26 00:10:22 +00:00
Jeremiah Willcock 1b46340737 Added backslash-newline as a form of whitespace outside strings
[SVN r53264]
2009-05-25 23:59:45 +00:00
Jeremiah Willcock 8dd497a9f1 Changed new GraphViz parser to be less generic (so it can be built as a binary); fixed subgraph issues by doing a lot of tests on GraphViz itself and restructuring a lot of the parser; made docs only point to new parser and made old one not build by default (although it is not removed)
[SVN r53237]
2009-05-25 05:38:56 +00:00
Jeremiah Willcock 39eda77bb0 Changed to Boost.Parameter for DFS as a test but kept old interface; added a lot of helper code to make that easier
[SVN r53226]
2009-05-24 05:41:32 +00:00
Jeremiah Willcock 0fe3f9f7d7 Used macros to simplify code
[SVN r53222]
2009-05-24 00:31:52 +00:00
Jeremiah Willcock 025ae1f7b1 Changed to standard Boost reference_wrapper rather than wrap_ref
[SVN r53221]
2009-05-23 23:30:31 +00:00
Jeremiah Willcock 268d57b5f8 Added graph properties to adjacency_matrix; fixed constructors to match documentation; fixes #875
[SVN r53217]
2009-05-23 18:07:02 +00:00
Jeremiah Willcock 5279b7e743 Fixed typos
[SVN r53216]
2009-05-23 17:32:43 +00:00
Jeremiah Willcock e18f677885 Changed GraphML writer to escape strings; added test of this; fixes #2567
[SVN r53213]
2009-05-23 17:16:20 +00:00
Jeremiah Willcock 615f47676b Reduced graph sizes to decrease test run time; fixes #2308
[SVN r53210]
2009-05-23 16:22:14 +00:00
Jeremiah Willcock bdf6e6c832 Fixed typos in BGL index; fixes #3063 and #3065
[SVN r53191]
2009-05-22 21:33:16 +00:00
Andrew Sutton be6033bbb8 Added overloads to subgraph to work with const bundled property map.
[SVN r53174]
2009-05-22 12:50:07 +00:00
Andrew Sutton c2b83032f8 Deprecated use of graph_detail::is_same. Removed usage from visitors
header, and tagged the defining file with the #warning.


[SVN r53151]
2009-05-21 14:33:18 +00:00
Jeremiah Willcock f925853bb5 Fixed almost all tab and min/max issues found by inspect tool
[SVN r53142]
2009-05-20 19:41:20 +00:00
Andrew Sutton 00211e9135 Redistributing mutability traits specializations to specific files in order
to avoid unnecessary includes.


[SVN r53136]
2009-05-20 17:07:49 +00:00
Andrew Sutton 5080ba19df Added concept checks to the interface testing harness.
[SVN r53135]
2009-05-20 16:54:46 +00:00
Andrew Sutton 6fd494aec2 Added a test to verify a bug from Dmitry Bufistov. Built in some output to
help debug the graph testing framework.


[SVN r53134]
2009-05-20 16:06:13 +00:00
Andrew Sutton 72769b9017 Whitespace and commenting. Added mutability traits to subgraph.
[SVN r53133]
2009-05-20 16:05:05 +00:00
Andrew Sutton 71c8ff92a2 Added copyright/licence.
[SVN r53129]
2009-05-20 14:41:03 +00:00
Jürgen Hunold 31b9be10a4 Suppress "unused variable" warning,
[SVN r53114]
2009-05-19 19:15:46 +00:00
Jeremiah Willcock 754f3b92ed Fixed redefinition error from bug #3048
[SVN r53109]
2009-05-19 14:43:02 +00:00
Andrew Sutton a1d00ed07b Fixing bug in labeled graph.
[SVN r53103]
2009-05-19 00:11:08 +00:00
Andrew Sutton c4167010e3 Added copyright/licence infor to files.
[SVN r53102]
2009-05-18 23:55:22 +00:00
Jeremiah Willcock 92e58bf5eb Changed names of some property maps to match code; fixes #2320
[SVN r53093]
2009-05-18 17:30:27 +00:00
Jeremiah Willcock c9fc501377 Added new Graphviz parser (recursive descent); does not support subgraphs in edges yet
[SVN r53092]
2009-05-18 17:27:15 +00:00
Jeremiah Willcock cf6051cbfe Replaced broken example in docs with working version from example directory, fixes #3016
[SVN r52994]
2009-05-14 14:50:20 +00:00
Andrew Sutton 3808741d30 Updated labeled graph test to new labeled graph interface.
[SVN r52987]
2009-05-14 12:41:55 +00:00
Andrew Sutton 3217880ec2 Removing example from build.
[SVN r52982]
2009-05-14 00:42:13 +00:00
Jeremiah Willcock f1c6d7b56f Added <stdio.h>, fixes #3024
[SVN r52980]
2009-05-13 22:22:47 +00:00
Andrew Sutton 6365853620 Removing missing file from build.
[SVN r52978]
2009-05-13 21:57:42 +00:00
Andrew Sutton ebc735f49e Added missing labeled graph file.
[SVN r52964]
2009-05-13 11:49:42 +00:00
Jeremiah Willcock acfe2b5d90 Added docs for in-place construction
[SVN r52940]
2009-05-12 17:20:55 +00:00
Jeremiah Willcock c0baa8282c Corrected name of sorting algorithm used
[SVN r52939]
2009-05-12 17:05:45 +00:00
Jeremiah Willcock 827270f597 Added in-place construction of CSR graphs from separate, mutable vectors of sources and targets
[SVN r52938]
2009-05-12 17:01:09 +00:00
Andrew Sutton da1172f268 Cleaning up some build issues in the imoprted examples.
[SVN r52918]
2009-05-11 17:45:47 +00:00
Andrew Sutton 21526c830a Added a function to help debugging during testing.
[SVN r52917]
2009-05-11 17:44:17 +00:00
Andrew Sutton ecdbf602d9 Added missing test file
[SVN r52916]
2009-05-11 17:43:48 +00:00
Andrew Sutton c192807ea7 Added a legitimate graph testing framework.
[SVN r52915]
2009-05-11 17:43:24 +00:00
Andrew Sutton 817f324a13 Added a new labeled graph adaptor that maps vertices to user-defined
key types.


[SVN r52914]
2009-05-11 17:42:10 +00:00
Andrew Sutton c8f3f9b06b Fixing a number of bugs with the declaration of graph parameters.
Fixed an edge-counting bug in directed_graph::remove_vertex.


[SVN r52912]
2009-05-11 17:40:00 +00:00
Andrew Sutton d119620775 WS cleanup
[SVN r52911]
2009-05-11 17:39:08 +00:00
Andrew Sutton 863b23408c WS cleanup.
[SVN r52910]
2009-05-11 17:37:47 +00:00
Andrew Sutton f6b51a43a2 Abstracted a set of metafunctions that can be used to deduce vertex
and edge property types for graph adaptors.


[SVN r52909]
2009-05-11 17:37:16 +00:00
Andrew Sutton c09fa80aca Better integrating the null map.
[SVN r52908]
2009-05-11 17:36:18 +00:00
Andrew Sutton 7ade369d3e Added a new traits framework fro determining the mutability of graph
types. This is used extensively in the new testing framework.


[SVN r52907]
2009-05-11 17:35:03 +00:00
Andrew Sutton c6f5a9b984 Added a (large) number of graph traits or metafunctions that can be used for
tag dispatching or determining ct properties of graphs.


[SVN r52906]
2009-05-11 17:33:26 +00:00
Andrew Sutton b43a2ff6cc Added a metafunction to determine if a property is no_property.
[SVN r52905]
2009-05-11 17:32:13 +00:00
Andrew Sutton e7914b3b7a Added a specialization of retag_property_list that will correctly retag
bundled properties given in "property form".


[SVN r52902]
2009-05-11 12:58:37 +00:00
Jeremiah Willcock f8f08b8d46 Added boost:: qualifications to next, using patch from bug 3013, fixing #3013
[SVN r52890]
2009-05-11 01:17:25 +00:00
Andrew Sutton 450b60114c Added missing typedef for graph_property_type to adjacency_matrix class.
[SVN r52563]
2009-04-23 15:33:34 +00:00
Andrew Sutton 534e7f6acd Added preliminary version of transitive_reduction. This has no test or
documentation, and needs to be thoroughly reviewed.


[SVN r52562]
2009-04-23 14:19:19 +00:00
Andrew Sutton 23058f4e1c Merging performance update from Jongsoo Park into release (r52506, r52512).
[SVN r52561]
2009-04-23 14:04:59 +00:00
Jeremiah Willcock 16e79e3bc5 Changed to BSL (per email from Michael Drexl), fixing last inspection issue in BGL
[SVN r52539]
2009-04-22 14:35:06 +00:00
Jeremiah Willcock 8e7b8bb95c Merged in changes from trunk (fixed HTML comment syntax, added entry for r_c_shortest_paths)
[SVN r52537]
2009-04-22 13:22:55 +00:00
Jeremiah Willcock ce04079e62 Changed bogus HTML comment syntax
[SVN r52530]
2009-04-21 20:15:59 +00:00
Andrew Sutton ee18592d0f Reordering headers.
[SVN r52512]
2009-04-20 14:58:50 +00:00
Andrew Sutton 549db6db29 Importing null (no-op) property map from SOC/2007.
[SVN r52510]
2009-04-20 14:49:29 +00:00
Andrew Sutton c57722a10f Migrating all examples into example directory
[SVN r52509]
2009-04-20 14:34:59 +00:00
Andrew Sutton a18ee8efa5 Adding copyright information.
[SVN r52508]
2009-04-20 13:50:25 +00:00
Jeremiah Willcock 6995f7fb7e Added license and copyright information
[SVN r52507]
2009-04-20 13:45:08 +00:00
Andrew Sutton d0aeb0072c Applied performance patch from Jongsoo Park.
[SVN r52506]
2009-04-20 13:43:43 +00:00
Jeremiah Willcock 5e86165add Fixed tab
[SVN r52476]
2009-04-19 01:56:03 +00:00
Jeremiah Willcock b4b0ec400b "Mike Jackson" -> "Michael Jackson" in copyright messages
[SVN r52475]
2009-04-18 23:59:45 +00:00
Jeremiah Willcock 2b2061df1d Renamed file to avoid problems with inspect tool
[SVN r52471]
2009-04-18 17:53:12 +00:00
Jeremiah Willcock 7895ca9e8f Relicensed files/added copyright info based on permissions from file authors
[SVN r52470]
2009-04-18 16:17:36 +00:00
Jeremiah Willcock 9b25481ac8 Trying to fix VC++ issue with overloading
[SVN r52443]
2009-04-17 15:40:34 +00:00
Andrew Sutton 704e2a0894 Added missing copyright info for test files.
[SVN r52403]
2009-04-15 12:24:21 +00:00
Jeremiah Willcock 01b30ee264 Fixed inspection problems
[SVN r52336]
2009-04-11 17:01:34 +00:00
Jeremiah Willcock 519192a2b8 Merged in code and docs from Parallel BGL; CMake-based build system for tests and examples and docs is not working; src and doc can be built with bjam
[SVN r52313]
2009-04-11 01:33:02 +00:00
Jeremiah Willcock 44a6ffef17 Trying to fix CSR constructor
[SVN r52303]
2009-04-10 18:55:45 +00:00
Jeremiah Willcock a836552002 Trying to fix CSR constructor
[SVN r52302]
2009-04-10 18:51:48 +00:00
Jeremiah Willcock faeb40f7c4 Merged headers and source files (but not examples, tests, or docs) from Parallel BGL
[SVN r52300]
2009-04-09 21:10:55 +00:00
Jeremiah Willcock f09e7ab08c Fixed use of undefined function log2
[SVN r52297]
2009-04-09 15:41:38 +00:00
Jeremiah Willcock 0d65535a49 Fixed broken link
[SVN r52296]
2009-04-09 15:29:14 +00:00
Jeremiah Willcock e674c8b9c7 Replaced non-ASCII names with ASCII approximations
[SVN r52295]
2009-04-09 15:27:50 +00:00
Jeremiah Willcock 954100837b Merged more changes (to Dijkstra dispatching) from PBGL
[SVN r52276]
2009-04-09 03:03:44 +00:00
Jeremiah Willcock 809904f268 Added construction of CSR graph from an unsorted list of edges; removed property that targets of out-edges of a single vertex are sorted; removed edge and edge_range functions because they are not supportable under that model; changed tests and docs accordingly
[SVN r52275]
2009-04-09 00:50:23 +00:00
Jeremiah Willcock 39ffc159eb Added dot product
[SVN r52274]
2009-04-09 00:48:56 +00:00
Jeremiah Willcock 0f708da558 Changed some uses of operator[] to get() to reduce property map requirements
[SVN r52273]
2009-04-09 00:48:35 +00:00
Jeremiah Willcock cbbfe23b81 Added METIS reader test from Nick Edmonds
[SVN r52244]
2009-04-07 21:05:25 +00:00
Jeremiah Willcock cd2f3a3a5c Applied change from Dementyev Maxim, fixes #2920
[SVN r52230]
2009-04-07 16:08:58 +00:00
Jeremiah Willcock 03532e0d20 Fixes #402
[SVN r52229]
2009-04-07 16:06:02 +00:00
Jeremiah Willcock 0cb233c412 Fixed types from bug #2480
[SVN r52228]
2009-04-07 15:53:05 +00:00
Jeremiah Willcock 8d4c3cc7d6 Moved property map library into property_map/ directory; made old files into stubs with #warnings; converted uses and docs of property map library to use new names
[SVN r52226]
2009-04-07 01:28:38 +00:00
Jeremiah Willcock a2843c2352 Added copyright and license info
[SVN r52220]
2009-04-06 20:48:42 +00:00
Jeremiah Willcock 1c52b10253 Fixed spelling
[SVN r52219]
2009-04-06 17:09:50 +00:00
Jeremiah Willcock 0960281a15 Fixed documentation
[SVN r52218]
2009-04-06 17:05:00 +00:00
Jeremiah Willcock 891cf5584c Fixed bug
[SVN r52217]
2009-04-06 16:59:52 +00:00
Jeremiah Willcock 0dfbf04a75 Added generator_test from Nick Edmonds
[SVN r52216]
2009-04-06 16:59:38 +00:00
Jeremiah Willcock 0185fdf67e Added enable_if to match PBGL
[SVN r52215]
2009-04-06 16:53:08 +00:00
Jeremiah Willcock aec4a0f301 Removed include of distributed generator and blank line
[SVN r52214]
2009-04-06 16:52:47 +00:00
Jeremiah Willcock cdde244b46 Made some things public for VisualAge C++
[SVN r52213]
2009-04-06 15:19:56 +00:00
Jeremiah Willcock 63fae9d658 Fixed regression test errors and warnings
[SVN r52172]
2009-04-04 20:02:25 +00:00
Jeremiah Willcock 803a8be664 Fully qualifying std::sqrt to fix compile errors, and removing "using" statements that are never used
[SVN r52158]
2009-04-03 14:57:27 +00:00
Jeremiah Willcock 43eed0a3ba Trying to fix Sun CC 5.9 error by fully qualifying root_two
[SVN r52157]
2009-04-03 14:55:01 +00:00
Jeremiah Willcock f1677c439a Fixed float->int warnings
[SVN r52156]
2009-04-03 14:54:10 +00:00
Jeremiah Willcock 8803f55af9 Merged in more changes from Parallel BGL
[SVN r52149]
2009-04-03 00:23:42 +00:00
Jeremiah Willcock 3e3b80e5c1 Fixed min/max inspection reports
[SVN r52140]
2009-04-02 19:22:38 +00:00
Jeremiah Willcock bae3f3950a Removed tabs
[SVN r52139]
2009-04-02 18:49:28 +00:00
Jeremiah Willcock c6035b97e6 Removed uses of drand48() in Fruchterman-Reingold layout
[SVN r52138]
2009-04-02 18:17:38 +00:00
Jeremiah Willcock 5b53e4e6e8 Generalized layout algorithms to use extended version of topology objects from Gursoy-Atun layout; Kamada-Kawai now supports 3-D; random layout supports arbitrary topologies
[SVN r52137]
2009-04-02 17:59:22 +00:00
Jeremiah Willcock 7ce44fc213 Removed #if 0 code
[SVN r52117]
2009-04-01 18:49:52 +00:00
Jeremiah Willcock cef7692b91 Merged more changes from Parallel BGL
[SVN r52116]
2009-04-01 18:07:00 +00:00
Jeremiah Willcock 5a3b472a50 First batch of merges from Parallel BGL
[SVN r52110]
2009-04-01 16:03:21 +00:00
Jeremiah Willcock eaf4275c61 Renamed some functions to work better on some compilers
[SVN r52108]
2009-04-01 16:01:43 +00:00
Daniel James a5a3991c22 Merged revisions 45283,48266 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r45283 | danieljames | 2008-05-11 14:49:20 +0100 (Sun, 11 May 2008) | 1 line
  
  Quote href values - our tools don't support unquoted values.
........
  r48266 | danieljames | 2008-08-20 20:32:23 +0100 (Wed, 20 Aug 2008) | 1 line
  
  Fix the link to the limits documentation.
........


[SVN r51902]
2009-03-22 17:30:02 +00:00
Jürgen Hunold dd5aff7029 Fix: Avoid compiler warning if BOOST_NO_HASH is already defined.
[SVN r51550]
2009-03-03 07:56:36 +00:00
Andrew Sutton 71e23c2304 Fixing doc build, updating doc headers
[SVN r51252]
2009-02-14 14:26:02 +00:00
Andrew Sutton d7e37c7b56 Importing examples from SOC 2007
[SVN r51251]
2009-02-14 13:56:37 +00:00
Andrew Sutton 7777457d50 Importing quickbook docs from SOC 2007
[SVN r51250]
2009-02-14 13:53:55 +00:00
Andrew Sutton 670d4d5029 Updating core_numbers from David Gleich.
[SVN r51249]
2009-02-14 13:29:07 +00:00
Jürgen Hunold 7a9822f533 Fix: gcc -pedantic -Werror: remove extra ";".
[SVN r51193]
2009-02-11 08:27:58 +00:00
Jürgen Hunold e26020a782 Fix: add missing #include <boost/shared_array.hpp>
[SVN r51192]
2009-02-11 08:18:06 +00:00
Jeremiah Willcock b9d8262153 Fixed error when popping the last element from the heap
[SVN r51190]
2009-02-10 22:08:39 +00:00
Andrew Sutton 0767d8a8bb Imported clustering coefficient, eccentricity and core numbers algorithms.
There is no test for core_numbers yet.


[SVN r51101]
2009-02-08 15:57:41 +00:00
Andrew Sutton 288af2017a Importing geodesic distance module from SOC.
[SVN r51100]
2009-02-08 15:40:33 +00:00
Andrew Sutton 6f50bbc49d Integrated degree centrality and test.
[SVN r51099]
2009-02-08 15:34:25 +00:00
Andrew Sutton 4358d99cb0 Integrating exterior property maps and closeness centraility.
[SVN r51098]
2009-02-08 15:28:54 +00:00
Andrew Sutton 6a7fc39328 Importing exterior_property framework and associated property map helpers.
Integrating closeness_centrality algorithm.


[SVN r51097]
2009-02-08 15:28:31 +00:00
Andrew Sutton 4f9ff68348 Importing tests for all_cliques, all_cycles, and an eventual graph testing framework
[SVN r51095]
2009-02-08 14:52:35 +00:00
Andrew Sutton aed5fa9949 Importing all_cliques, all_cycles algorithms
[SVN r51094]
2009-02-08 14:51:58 +00:00
Andrew Sutton 77d5bf7b80 Integrating SOC 2007 code
[SVN r51092]
2009-02-08 14:25:32 +00:00
Andrew Sutton 6671008f35 Integrating SOC 2007 code
[SVN r51091]
2009-02-08 14:25:06 +00:00
Andrew Sutton 0596637103 Added a test for undirected graphs
[SVN r51090]
2009-02-08 14:23:16 +00:00
Andrew Sutton 70d7e52335 Added a test for undirected graphs
[SVN r51089]
2009-02-08 14:22:14 +00:00
Andrew Sutton afa1569043 Whitespace cleanup
[SVN r51086]
2009-02-08 13:23:09 +00:00
Jürgen Hunold 292aea9404 Fix gcc compile error due to "undefined variable 'index'".
[SVN r51035]
2009-02-05 20:07:08 +00:00
Jeremiah Willcock 8a9558f06f Added ability to check whether an element is in the heap, and do conditional insert/update operations based on that
[SVN r51021]
2009-02-04 21:01:27 +00:00
Jeremiah Willcock bac69f84de Changed to two_bit_color_map by default
[SVN r51020]
2009-02-04 20:58:15 +00:00
Jeremiah Willcock 78b6d375a7 Default color map to white, and fixed some warnings
[SVN r51019]
2009-02-04 20:57:04 +00:00
Jeremiah Willcock 17f6ae8dbb Trying to fix another qcc problem
[SVN r51015]
2009-02-04 19:32:05 +00:00
Jeremiah Willcock 23e75246cb Fixed qcc errors
[SVN r51014]
2009-02-04 19:28:31 +00:00
Jeremiah Willcock 6600277899 Fixed broken link
[SVN r50970]
2009-02-02 17:53:20 +00:00
Jeremiah Willcock 4520906847 Ported bug fixes over from trunk
[SVN r50933]
2009-01-31 20:06:23 +00:00
Andrew Sutton e27b8977b4 Fixed doc typo.
[SVN r50901]
2009-01-30 14:14:10 +00:00
Jeremiah Willcock 2ed4a27395 Applied patch from #2132, closes #2132
[SVN r50823]
2009-01-27 21:18:02 +00:00
Jeremiah Willcock 83e3ee4b6c Reverted r14604 to test handling of unconnected vertices, and fixed up formatting of output grid
[SVN r50821]
2009-01-27 21:12:42 +00:00
Jeremiah Willcock 50fba1d79f Tightened handling of inf in example to try to catch problems like #732 in the future
[SVN r50816]
2009-01-27 20:19:55 +00:00
Jeremiah Willcock 9572d48a03 Changed Johnson ASSP algorithm to use combine rather than + to do reweighting (did not change -, though); fixes #732
[SVN r50815]
2009-01-27 20:19:29 +00:00
Jeremiah Willcock 51d8d9f6be Fixed comment syntax
[SVN r50814]
2009-01-27 20:18:33 +00:00
Jeremiah Willcock b0e70a45d0 Changed template parameter names to match removal of Vertex List Graph requirement
[SVN r50813]
2009-01-27 20:07:25 +00:00
Jeremiah Willcock 4b61796e41 Changed Dijkstra shortest path algorithm to use d-ary heap by default, and to use a vector_property_map when the graph does not model VertexListGraph (only supported for dijkstra_shortest_paths_no_init); fixes #708
[SVN r50812]
2009-01-27 19:59:40 +00:00
Jeremiah Willcock 4844c47f6a Documented dijkstra_shortest_paths_no_init, fixed other small issues
[SVN r50811]
2009-01-27 19:58:18 +00:00
Jeremiah Willcock 968edbe972 Changed closed_plus to match inf_plus from floyd_warshall_test, changed test to use closed_plus, fixed comments in documentation and replaced std::plus with closed_plus to match implementation, fixes #1164
[SVN r50808]
2009-01-27 18:48:09 +00:00
Jeremiah Willcock 69d72805be Fixing two parts of #2658; not sure about point 3 of that report
[SVN r50806]
2009-01-27 18:03:03 +00:00
Jeremiah Willcock 1eba2f9cc5 Fixed typo (missing semicolon)
[SVN r50805]
2009-01-27 17:58:45 +00:00
Jeremiah Willcock 6641c154ac Added information on implicit graphs and no_init version of astar_search, plus fixed invalid comment syntax
[SVN r50804]
2009-01-27 17:56:57 +00:00
Jeremiah Willcock 6fdfca7d38 Fixed astar_search_no_init to work on implicit graphs
[SVN r50803]
2009-01-27 17:53:59 +00:00
Troy D. Straszheim 4a3510bbf9 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Jeremiah Willcock 62427b821f Fixed "anonymous type" bug from regression tests
[SVN r50748]
2009-01-23 16:50:15 +00:00
Jeremiah Willcock 4a16dd2717 Hopefully fixed PGI regression test failure
[SVN r50733]
2009-01-22 20:51:52 +00:00
Jeremiah Willcock 9a15c9fb1e Changed some enums from local to global to fix regression test problems on Sandia-gcc gcc-4.0.1
[SVN r50729]
2009-01-22 16:06:21 +00:00
Jeremiah Willcock 86fb16b3b8 Fixed inspection report problems
[SVN r50706]
2009-01-21 18:59:38 +00:00
Jeremiah Willcock db5bab4b99 Fixed some regression test failures
[SVN r50704]
2009-01-21 17:21:06 +00:00
Jeremiah Willcock aff71f6147 Added d-ary heap implementation, changed Dijkstra performance test to use that rather than binary heap, changed m_decreased member in dijkstra_visitor to a local variable
[SVN r50692]
2009-01-20 21:37:31 +00:00
Jeremiah Willcock 275e1cb92b Fixed include directives and namespaces to match new versions of Spirit and Phoenix (using backward compatibility headers)
[SVN r50677]
2009-01-19 19:43:16 +00:00
Andrew Sutton a3ee4eb038 Patch from Dmitry Bufistov for getting bundled property maps from subgraphs.
[SVN r50534]
2009-01-10 14:46:36 +00:00
Andrew Sutton af7369b6b0 Addressing the problem of subgraphs (not) working with bundled properties.
Added some comments, documentation, and a new test.


[SVN r50533]
2009-01-10 14:22:54 +00:00
Andrew Sutton 06562ff825 Resyncing with trunk, merging a couple of missing patches.
[SVN r50439]
2009-01-02 14:45:11 +00:00
Andrew Sutton 9a6339df8d Rolling back CMake-oriented patches
[SVN r50331]
2008-12-20 19:11:41 +00:00
Andrew Sutton 8c22a6d531 Selectively merging changes from 47269:HEAD. Changes herein fix or address
the following tickets: #1622 (r50206), #2550 (r50191), #416 (r50137),
#2460 (r49563), #2392 (r49254), #2209 (r49000), #1700 (r48611). Also adds
metric_tsp_approx algorithm.



[SVN r50330]
2008-12-20 19:07:58 +00:00
Andrew Sutton b49cda6f03 Merging r48999, r49000 to fix #2209 and the use of MAXINT instead of
numeric_limits.


[SVN r50317]
2008-12-18 14:07:51 +00:00
Andrew Sutton 3fbb14a5cf Make metric_tsp_approx test return 0, even if run incorrectly
[SVN r50315]
2008-12-18 13:37:52 +00:00
Andrew Sutton 372c7e5740 Removing missing include header
[SVN r50314]
2008-12-18 13:35:31 +00:00
Andrew Sutton 70e103d1b9 Updating the adjacency list invalidation table.
[SVN r50234]
2008-12-10 16:17:19 +00:00
Andrew Sutton 6b4635c403 Fixing the graph type for listS tests.
[SVN r50233]
2008-12-10 16:12:39 +00:00
Andrew Sutton b2724beb09 Added some comments about a peculiar condition in the testing.
[SVN r50232]
2008-12-10 15:56:02 +00:00
Andrew Sutton a6daa83472 Added tests for out edge and adjacency components under add_vertex.
For some reason, adjacency_iterators seem to remain valid if no operations
on other graph types are executed prior to their use, which is completely
at odds with what I would expect.


[SVN r50231]
2008-12-10 15:46:05 +00:00
Andrew Sutton 7f9306dec9 Added a small test framework for experimenting with invalidating iterators
and descriptors. Not part of the test suite.


[SVN r50230]
2008-12-10 14:28:25 +00:00
Andrew Sutton 9ad0c6a23c Fixed #1622. A viable solution relies on the fact that incident edges in a
loop are stored adjacently in the out edge list of the vertex. A simple
modification of the global edge erasing loop for undirected graphs will
skip the next iterator if both the current and next contain the same iterator.


[SVN r50206]
2008-12-08 19:03:20 +00:00
Andrew Sutton 3fdea479bd Fixing #2550. Added a check for this condition in the test files.
[SVN r50191]
2008-12-08 15:22:32 +00:00
Andrew Sutton 4a2994c9d7 Removing GCC check for hash_set/hash_map so we don't automatically break any
code. Added a section of workarounds to the documentation.


[SVN r50189]
2008-12-08 15:06:55 +00:00
Andrew Sutton bc707a8f67 Whitespace cleanup.
[SVN r50188]
2008-12-08 15:06:05 +00:00
Jürgen Hunold 38aa3f34d8 Merged revisions 49256 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r49256 | jhunold | 2008-10-10 21:38:48 +0200 (Fri, 10 Oct 2008) | 2 lines
  
  Add missing BOOST_GRAPH_DECL macro.
........


[SVN r50154]
2008-12-06 09:23:01 +00:00
Jürgen Hunold 2555c89f91 Fix #416
Merged revisions 42984,50137 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r42984 | noel_belcourt | 2008-01-26 19:35:59 +0100 (Sat, 26 Jan 2008) | 7 lines
  
  Fixes #416
  
  Fixed spelling of Jack Edmonds name and renamed files
  where necessary.  Updated the documentation as well.
  Tested changes by building/running tests in libs/graph/test.
........
  r50137 | jhunold | 2008-12-05 18:53:22 +0100 (Fri, 05 Dec 2008) | 3 lines
  
  Add deprecation header for wrong-spelled Edmonds-Karp-Max-Flox.
  Preparaion to fix #416
........


[SVN r50153]
2008-12-06 09:10:20 +00:00
Jürgen Hunold 597d89ead2 Add deprecation header for wrong-spelled Edmonds-Karp-Max-Flox.
Preparaion to fix #416


[SVN r50137]
2008-12-05 17:53:22 +00:00
Michael A. Jackson bafd8ea248 Updating dependency information for modularized libraries.
[SVN r49628]
2008-11-07 17:05:27 +00:00
Michael A. Jackson 4f9ce0c88d Updating CMake files to latest trunk. Added dependency information for regression tests and a few new macros for internal use.
[SVN r49627]
2008-11-07 17:02:56 +00:00
Andrew Sutton 5c899afa22 Include correct headers for read_dimacs.hpp, fixing #2460. Added a compile
test (just a stub for now) to ensuer that the file will compile without
any additional includes.


[SVN r49563]
2008-11-03 15:50:29 +00:00
Andrew Sutton 1562d2b1ab Added metric_tsp_approx by Matt Egahazy. Import includes the algorithm,
documentation and tests. Integrated the test into the unit tests, and
the documentation into the TOC under a new subsection named Paths and Tours.
Also added a new bad_graph exception in exception.hpp.


[SVN r49561]
2008-11-03 15:35:58 +00:00
Andrew Sutton 8bde5765ab Fixed warnings about conversion from c-str literals to char*.
[SVN r49558]
2008-11-03 15:22:52 +00:00
Andrew Sutton 2fbbd52a0e Fixed a compiler warning that complained about parentheses in a do loop.
[SVN r49557]
2008-11-03 15:21:06 +00:00
Andrew Sutton 10d71f2365 Added a compiler check to adjacency_list.hpp that checks for GCC >= 4.3 and
defines BOOST_NO_HASH. Closes #2444.


[SVN r49554]
2008-11-03 15:03:13 +00:00
Michael A. Jackson 7db8d06fbf Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor
[SVN r49510]
2008-11-01 13:15:41 +00:00
Aaron Windsor ebde55caab Patch from David Gleich to fix underflow and overflow that can happen when computing vertex positions in chroback_payne_straight_line_drawing
[SVN r49358]
2008-10-16 12:02:37 +00:00
Vladimir Prus 0e63ef5f89 Merge from trunk
[SVN r49354]
2008-10-16 08:54:57 +00:00
John Maddock a9a49a55b7 Merge fixes from Trunk.
Fixes #2392.

Change includes of <cmath> to <boost/config/no_tr1/config.hpp>.

Previously if Boost.TR1 was in the include path then including <cmath> pulls in all the new TR1 math functions, which in turn also requires linking to an external library. With auto-linking support this requires that library to have been built and be present in the library search path, even if the actual library under use is header only. 

[SVN r49314]
2008-10-13 09:00:03 +00:00
Jürgen Hunold 71f20dd7b6 Add missing BOOST_GRAPH_DECL macro.
[SVN r49256]
2008-10-10 19:38:48 +00:00
John Maddock b267aee59c Change includes of <cmath> to <boost/config/no_tr1/config.hpp>.
Previously if Boost.TR1 was in the include path then including <cmath> pulls in all the new TR1 math functions, which in turn also requires linking to an external library.  With auto-linking support this requires that library to have been built and be present in the library search path, even if the actual library under use is header only.

Fixes #2392.


[SVN r49254]
2008-10-10 16:10:00 +00:00
Douglas Gregor b7a5fe292b Remove accidental commit
[SVN r49248]
2008-10-10 13:24:44 +00:00
Douglas Gregor 33640c6bf3 Minor fixes for named graph changes
[SVN r49179]
2008-10-08 15:05:33 +00:00
Douglas Gregor f7585c91af Add support for named vertices in adjacency_list
[SVN r49178]
2008-10-08 14:51:11 +00:00
Douglas Gregor 9b902b614d Fix reverse_graph adaptor to work with user-defined graph types
[SVN r49176]
2008-10-08 12:38:44 +00:00
Aaron Windsor 7218c1ba66 Fix for a bug in BGL's is_straight_line_drawing - adding necessary additional comparisons during the planar sweep to detect intersections.
[SVN r49132]
2008-10-04 22:49:18 +00:00
Vladimir Prus 19dd79f771 Don't emit warnings about GraphML support if not actually building Boost.Graph.
[SVN r49008]
2008-09-29 15:38:37 +00:00
Andrew Sutton e9d6adeab1 Resolving ticket #2209.
[SVN r49000]
2008-09-29 12:42:26 +00:00
Andrew Sutton 3a894a9a5f Removed define and usage of MAXINT, replaced with numeric_limits max.
This was discussed on the boost list, but there's no ticket filed.


[SVN r48999]
2008-09-29 12:27:03 +00:00
Douglas Gregor 8cbf7d89aa Merge fix for infinite weights in Floyd-Warshall
[SVN r48612]
2008-09-05 14:00:40 +00:00
Douglas Gregor 424e529aba Fix handling of infinite weights in Floyd-Warshall algorithm. Fixes #1700
[SVN r48611]
2008-09-05 13:59:12 +00:00
Douglas Gregor d73b792b6c Make graphml_test.cpp accept the name of its input file on the command line, Jamfile.v2 provide the input file (both thanks to Dave A), and make the input XML well-formed. Fixes #2267.
[SVN r48583]
2008-09-04 19:49:49 +00:00
Douglas Gregor b39dd26509 Make reverse_graph work with non-class graph types
[SVN r47930]
2008-08-01 14:20:59 +00:00
Douglas Gregor 7e088fd0ec Link against shared expat.
[SVN r47720]
2008-07-23 15:24:17 +00:00
Douglas Gregor 415b79eabc Link against shared expat. Fixes #2123
[SVN r47719]
2008-07-23 15:23:53 +00:00
Douglas Gregor 3ea25dc783 Merged fix for ticket #2131 from trunk
[SVN r47710]
2008-07-23 14:00:21 +00:00
Douglas Gregor 6d2a97d97c Fix Cuthill-McKee documentation typos. Fixes #2131
[SVN r47709]
2008-07-23 13:58:30 +00:00
Douglas Gregor f94d5a9530 Support BOOST_NO_EXCEPTIONS in Boost.Graph, from Brian Barrett
[SVN r47270]
2008-07-09 15:00:11 +00:00
Douglas Gregor f9dcab79b2 Support BOOST_NO_EXCEPTIONS in Boost.Graph, from Brian Barrett
[SVN r47269]
2008-07-09 14:59:46 +00:00
Ronald Garcia 3644e4d51a Initial Revision. Based on read_graphviz.cpp.
[SVN r47240]
2008-07-08 17:24:20 +00:00
Douglas Gregor d1ae2658f9 Merged topological_sort doc fix from trunk
[SVN r47139]
2008-07-06 19:14:39 +00:00
Douglas Gregor ae53d6cbbc Fix missing IncidenceGraph requirement in topoogical_sort. Fixes #1986
[SVN r47138]
2008-07-06 18:55:34 +00:00
Daniel James c6c6be7ae0 Quote href values - our tools don't support unquoted values.
[SVN r45283]
2008-05-11 13:49:20 +00:00
Douglas Gregor 1533e730ae Merge fix for #870 to release branch
[SVN r44892]
2008-04-29 18:35:03 +00:00
Douglas Gregor b98298ab98 Correct erroneous call to is_reachable from is_connected. Fixes #870
[SVN r44891]
2008-04-29 18:34:28 +00:00
Douglas Gregor cf6006d528 Merge Boost.Graph fix from mainline
[SVN r44890]
2008-04-29 18:19:07 +00:00
Douglas Gregor ccf09ceddf Remove names of unused variables. Fixes #1832 and fixes #1865
[SVN r44889]
2008-04-29 18:18:01 +00:00
Douglas Gregor bb1977b17a Resource-constrained shortest paths, from Michael Drexl
[SVN r44717]
2008-04-22 12:24:25 +00:00
Jurko Gospodnetić 476e8dd7d1 Corrected the documentation related to installing new internal property types.
[SVN r44481]
2008-04-17 00:27:30 +00:00
Douglas Gregor 23e8514ac7 Merge MPI/Graph documentation fixes from trunk
[SVN r43700]
2008-03-18 13:20:44 +00:00
Douglas Gregor ecedcaa5a3 Fix some documentation issues. Fixes #1655, fixes #1660
[SVN r43680]
2008-03-17 17:34:46 +00:00
Daniel James aa97fdc26a Merged revisions 43206,43208-43213 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r43206 | danieljames | 2008-02-10 09:55:03 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Fix some broken links.
........
  r43209 | danieljames | 2008-02-10 14:56:22 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Link to people pages on the website, as they've been removed from the download.
........
  r43210 | danieljames | 2008-02-10 15:02:17 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Point links to the pages that used to be in 'more' to the site.
........
  r43212 | danieljames | 2008-02-10 16:10:16 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Fix links on the home page as well.
........
  r43213 | danieljames | 2008-02-10 16:21:22 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Generated documentation which is no longer generated.
........


[SVN r43214]
2008-02-10 16:39:38 +00:00
Daniel James 07eee8a2a1 Point links to the pages that used to be in 'more' to the site.
[SVN r43210]
2008-02-10 15:02:17 +00:00
Daniel James e45cfb0ee3 Link to people pages on the website, as they've been removed from the download.
[SVN r43209]
2008-02-10 14:56:22 +00:00
Douglas Gregor f865d6209e Merge fix for add_vertex in compressed_sparse_row with properties
[SVN r43167]
2008-02-07 21:29:02 +00:00
Douglas Gregor 231f4c3573 Fix add_vertex and add_vertices when the CSR graph has vertex properties
[SVN r43117]
2008-02-05 20:51:23 +00:00
K. Noel Belcourt 40af610e8f Fixes #416
Fixed spelling of Jack Edmonds name and renamed files
where necessary.  Updated the documentation as well.
Tested changes by building/running tests in libs/graph/test.



[SVN r42984]
2008-01-26 18:35:59 +00:00
Beman Dawes 751f8b5b7c Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
Beman Dawes 73f24694dd Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
Beman Dawes 5255835126 config, detail, filesystem, system, tools, at 41278.
[SVN r41316]
2007-11-23 17:03:14 +00:00
Aaron Windsor 341a685ff1 Cleaning up #includes to avoid errors on gcc 4.1 and above.
[SVN r41227]
2007-11-19 15:28:26 +00:00
Aaron Windsor 6365afac60 Shortening file name of a graph test to < 32 characters
[SVN r40864]
2007-11-07 02:30:38 +00:00
Aaron Windsor c28a996668 Renaming planar graph test files to under 32 characters each.
[SVN r40836]
2007-11-06 13:55:05 +00:00
Douglas Gregor 23ca414964 Merge in Boost.Graph changes from RC_1_34_0 branch
[SVN r40813]
2007-11-05 21:43:24 +00:00
Douglas Gregor c09b24159b Removed ancient BGL-Python code
[SVN r40812]
2007-11-05 21:25:10 +00:00
Douglas Gregor eb60f8c235 Add copyright, 1.34.1 history
[SVN r40809]
2007-11-05 21:20:23 +00:00
Dave Abrahams 3884b842c6 Updated Concept Check library documentation.
Changed BOOST_CONCEPT_WHERE to BOOST_CONCEPT_REQUIRES to be more
consistent with the current C++0x proposal, which now uses a
"requires" keyword in lieu of "where."

Factored GCC workarounds into the BOOST_CONCEPT_USAGE macro.


[SVN r40769]
2007-11-05 03:54:19 +00:00
Douglas Gregor 05a4441935 Fix for Borland/CodeGear, from JongSoo Park
[SVN r40673]
2007-11-02 03:07:24 +00:00
Douglas Gregor 8e5d48c839 Use unsigned long long for the path count to avoid overflows. Fixes #1398
[SVN r40645]
2007-11-01 16:16:30 +00:00
Vladimir Prus da3b568cb4 Make sure every library can be installed by using
bjam stage|install

in libs/<library>/build.


[SVN r40475]
2007-10-26 09:04:25 +00:00
Aaron Windsor e9747c0143 Un-asserted two function calls - this was causing the function calls to turn into no-ops when the example was compiled with debugging off.
[SVN r40167]
2007-10-19 00:16:36 +00:00
Aaron Windsor e54f2934e1 Trying to clear some errors from Sun CC.
[SVN r39871]
2007-10-10 02:18:37 +00:00
Aaron Windsor c691ac49f7 Adding some missing typenames
[SVN r39773]
2007-10-07 23:49:07 +00:00
Aaron Windsor fa42d8aa92 Fix config issue for cycle ratio tests - the path to the input file used in the test should be relative to the graph test subdirectory.
[SVN r39767]
2007-10-07 18:43:16 +00:00
Aaron Windsor 40ffa294a2 Fixing some errors and warnings on the planar graph tests coming from Sun compilers.
[SVN r39763]
2007-10-07 16:52:39 +00:00
Beman Dawes b2be8e3dfc Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
Ronald Garcia 98d0755817 Made the output of the example program more realistic.
[SVN r39524]
2007-09-25 15:36:35 +00:00
Ronald Garcia 2f99e5b87f Initial Revision. Stolen from the write-graphviz.html docs.
[SVN r39523]
2007-09-25 15:32:23 +00:00
Aaron Windsor 1cc2f6e13a Some fixes for errors and warnings on HP cxx.
[SVN r39480]
2007-09-22 17:41:18 +00:00
Ronald Garcia 2006d41573 small html and grammar fixes.
[SVN r39442]
2007-09-21 12:33:31 +00:00
Ronald Garcia 4bda985420 A little note to minimize confusion (I know I was confused).
[SVN r39435]
2007-09-20 23:22:46 +00:00
Douglas Gregor 666a919f70 Fix the cycle ratio tests for real
[SVN r39286]
2007-09-14 21:17:06 +00:00
Douglas Gregor 03560ab9ae Teach cycle_ratio_tests to find its input files during regression testing
[SVN r39246]
2007-09-13 19:41:27 +00:00
Aaron Windsor a86a446429 Modified odd_components_counter to fix signed/unsigned mismatch on Sandi pgi-6.1 tests.
[SVN r39112]
2007-09-03 15:04:05 +00:00
Aaron Windsor 8dfc1ad52c merging planar graph algorithms into the BGL
[SVN r38956]
2007-08-25 21:11:06 +00:00
Douglas Gregor dcb43119d5 Revert inadvertent changes to csr_graph_test.cpp
[SVN r38741]
2007-08-17 14:57:54 +00:00
Vladimir Prus aa79cb6919 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Douglas Gregor 9d3d4e9a44 Pointless change
[SVN r38493]
2007-08-07 13:05:43 +00:00
Douglas Gregor 5461181e7f relaxed_heap.hpp:
- Use boost::none in all the right places. Fixes #1072. Big thanks to
    David Gleich!


[SVN r38330]
2007-07-31 21:58:36 +00:00
Douglas Gregor d0432740ef Maximum and minimum cycle ratio
[SVN r38308]
2007-07-30 13:01:16 +00:00
Douglas Gregor e6cd5bc377 Fix minor typo
[SVN r38287]
2007-07-25 20:23:19 +00:00
nobody 148c441158 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
Ronald Garcia a080a480ce Fixed an inconsistency between explicit graph properties and implicit
(without a "graph" keyword and brackets).


[SVN r38049]
2007-06-21 16:12:46 +00:00
Ronald Garcia 1dfcd0e6fb Fixed up the testing for graph names.
[SVN r38048]
2007-06-21 16:12:05 +00:00
Ronald Garcia f3c29e22d2 Added a test case to make sure that the contents of c-strings are not
subject to whitespace skipping.


[SVN r38045]
2007-06-20 16:28:50 +00:00
Ronald Garcia f6a8e8c66e Fixed a bug in c-style string parsing...need to turn whitespace
skipping off using lexeme_d.


[SVN r38044]
2007-06-20 16:24:06 +00:00
Aaron Windsor 54ff05ca06 added named parameters for vertex_invariant1, vertex_invariant2, and vertex_max_invariant, from isomorphism.hpp
[SVN r37995]
2007-06-15 12:38:13 +00:00
Aaron Windsor 1b69ebe5b5 documented the named parameters vertex_invariant1, vertex_invariant2, and vertex_max_invariant
[SVN r37994]
2007-06-15 12:34:32 +00:00
Thomas Witt efcb9317fc Patches from Trac #583.
[SVN r37846]
2007-06-01 16:12:08 +00:00
Douglas Gregor 96f923a52e Rename/remove some detail algorithms to avoid a conflict with the string algorithms library
[SVN r37828]
2007-05-31 12:14:31 +00:00
Douglas Gregor 45d0f1331b Fix handling of overflow in shortest-path algorithms
[SVN r37814]
2007-05-29 16:53:05 +00:00
Douglas Gregor 9445aff028 Fix overflow handling with negative values as reported in http://lists.boost.org/boost-users/2007/05/28205.php
[SVN r37812]
2007-05-29 15:22:29 +00:00
Jeremy Siek f65f09bba9 added preprocessor guards
[SVN r37432]
2007-04-13 16:05:53 +00:00
Douglas Gregor 43f0e01be5 Add include of <climits>
[SVN r37414]
2007-04-10 23:05:46 +00:00
Aaron Windsor 7fdb4af8f6 a few more bug fixes
[SVN r37222]
2007-03-18 16:21:46 +00:00
Douglas Gregor 660107b872 Pick up Aaron Windsor's fixes
[SVN r37191]
2007-03-15 14:12:41 +00:00
Douglas Gregor ee9b816984 Remove broken Fibonacci heap
[SVN r37190]
2007-03-15 14:03:06 +00:00
Stephan Diederich e79c27b97b changed coloring to be consistent with edmunds_karp_max_flow
[SVN r37167]
2007-03-11 11:56:10 +00:00
Dave Abrahams 3125c8577d Correct testing bugs:
either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST
    (in my code only)

    or adding "return boost::report_errors();" where it was clearly
    missing (and a pure bug, in anyone's code).

    or changing BOOST_TEST to BOOST_CHECK where the integer library
    was clearly using Boost.Test and not returning report_errors().


[SVN r37063]
2007-02-25 15:28:02 +00:00
Dave Abrahams b2bc98e410 Correct testing bugs:
either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST
    (in my code only)

    or adding "return boost::report_errors();" where it was clearly
    missing (and a pure bug, in anyone's code).


[SVN r37057]
2007-02-24 22:40:59 +00:00
Douglas Gregor 4c8c2403c8 Use simple string operations rather than the string algorithms library
[SVN r36909]
2007-02-08 04:13:07 +00:00
Douglas Gregor 02cdd5c0f8 Fix adjacency list and property map serialization
[SVN r36895]
2007-02-05 22:16:58 +00:00
Douglas Gregor 1f84c5b232 Remove old graphviz parser
[SVN r36842]
2007-01-29 22:16:07 +00:00
Douglas Gregor 78d2fd885f GraphML parser, from Tiago de Paula Peixoto
[SVN r36841]
2007-01-29 22:14:41 +00:00
Douglas Gregor efa2fe286f Adjacency list serialization fixes, from David Keller
[SVN r36838]
2007-01-29 19:54:47 +00:00
Douglas Gregor 45a2d06d94 Improvements to LEDA adaptors, from Jens Mueller
[SVN r36836]
2007-01-29 19:29:06 +00:00
Daniel James 55d57690f1 Remove a tab.
[SVN r36645]
2007-01-07 22:21:57 +00:00
Douglas Gregor 3f97161db1 Change library name to boost_graph
[SVN r36471]
2006-12-20 19:17:16 +00:00
Aaron Windsor 0f49c8dcb2 merged bug fix
[SVN r36462]
2006-12-20 01:22:24 +00:00
Ronald Garcia fcf80df5f9 Removed old dead code. dynamic_bitset supercedes these.
[SVN r36454]
2006-12-18 15:48:56 +00:00
Douglas Gregor 85dd95cf77 Remove none algorith, which is unused and conflicts with none.hpp
[SVN r36409]
2006-12-15 21:44:53 +00:00
Douglas Gregor 1d8d4322d2 Remove none algorith, which is unused and conflicts with none.hpp
[SVN r36409]
2006-12-15 21:44:53 +00:00
Douglas Gregor 15d8e1dc21 Remove makefile gooP
[SVN r36408]
2006-12-15 21:19:02 +00:00
Douglas Gregor 99a56222da Fix file dependency example
[SVN r36407]
2006-12-15 21:07:14 +00:00
Douglas Gregor 3bec282dbd Finish renaming bgl-viz to boost_graph
[SVN r36404]
2006-12-15 13:35:08 +00:00
Douglas Gregor 3d5661096c Handle temporaries passed to filtered_graph
[SVN r36403]
2006-12-15 13:17:58 +00:00
Douglas Gregor dfb49e339d Fix criterion
[SVN r36400]
2006-12-15 12:58:54 +00:00
Douglas Gregor b493c0ea47 Remove Python gook, rename library to boost_graph
[SVN r36399]
2006-12-15 12:55:36 +00:00
Aaron Windsor c4a7c8cd37 fixed a bug caused by parent pointers not being updated when two heaps are merged
[SVN r36398]
2006-12-15 02:26:08 +00:00
Aaron Windsor 64b6038f92 renaming sorted_erdos_renyi_generator.html and lengauer_tarjan_dominator_tree.htm so inspection reports won't complain
[SVN r36374]
2006-12-14 02:20:34 +00:00
Aaron Windsor 9d8f8ce0cd renaming sorted_erdos_renyi_generator.html and lengauer_tarjan_dominator_tree.htm so inspection reports won't complain
[SVN r36374]
2006-12-14 02:20:34 +00:00
Aaron Windsor fbd5c5120f merged file name changes from HEAD to RC_1_34_0
[SVN r36373]
2006-12-14 02:12:42 +00:00
nobody 46ae2cb6c1 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r36372]
2006-12-14 02:08:05 +00:00
Aaron Windsor 83e26c7109 renaming sorted_erdos_renyi_generator.html and lengauer_tarjan_dominator_tree.htm so inspection reports won't complain
[SVN r36371]
2006-12-14 02:08:04 +00:00
Aaron Windsor d83d611b18 merging fix due to renaming maximum_cardinality_matching.hpp from HEAD to RC_1_34_0
[SVN r36370]
2006-12-14 01:06:01 +00:00
Aaron Windsor 4af336e307 fix due to renaming maximum_cardinality_matching.hpp
[SVN r36369]
2006-12-14 01:01:26 +00:00
Aaron Windsor e53d23d7d7 merging fix due to renaming maximum_cardinality_matching.hpp from HEAD to RC_1_34_0
[SVN r36368]
2006-12-14 00:59:19 +00:00
Aaron Windsor 401165fe0c merging filename fix for maximum_cardinality_matching.hpp from HEAD to RC_1_34_0
[SVN r36367]
2006-12-14 00:51:26 +00:00
Aaron Windsor 7e7359b330 changing name of maximum_cardinality_matching.hpp
[SVN r36366]
2006-12-14 00:49:22 +00:00
Aaron Windsor a728a94caa merged filename change for maximum_cardinality_matching from HEAD to RC_1_34_0
[SVN r36365]
2006-12-14 00:45:34 +00:00
nobody 833169b3a0 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r36364]
2006-12-14 00:39:04 +00:00
Aaron Windsor 770cce09ef renaming maximum_cardinality_matching.hpp so inspection reports won't complain
[SVN r36363]
2006-12-14 00:39:03 +00:00
Ronald Garcia a237fb8cd9 Replaced uses of ct_if and friends (based on pending/ct_if.hpp) with
uses of mpl::if_ and friends.


[SVN r36269]
2006-12-04 23:23:08 +00:00
Andreas Huber 79a1ef7d8f Merged L & C issue fixes from trunk to branch.
[SVN r36225]
2006-12-01 11:34:43 +00:00
Andreas Huber dde01478fe Fixed license & copyright issues.
[SVN r36224]
2006-12-01 10:29:49 +00:00
Douglas Gregor 41051db37b Do not deduce Vertex in vertex function
[SVN r36202]
2006-11-29 20:30:27 +00:00
Douglas Gregor 0a8a6f0812 Do not deduce Vertex in vertex function
[SVN r36202]
2006-11-29 20:30:27 +00:00
Douglas Gregor 1cfa23497b Integrate Kolmogorov's max flow algorithm, from Stephan Diederich.
[SVN r36125]
2006-11-20 23:42:44 +00:00
Vladimir Prus 99d4f31d38 Merge from HEAD.
Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35990]
2006-11-10 19:59:52 +00:00
Vladimir Prus a86397fc34 Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35989]
2006-11-10 19:09:56 +00:00
Beman Dawes 2c884b70b7 Merged copyright and license addition
[SVN r35907]
2006-11-07 19:27:00 +00:00
Beman Dawes 3c852ac7a0 Add copyright, license
[SVN r35905]
2006-11-07 19:11:57 +00:00
Rene Rivera 0cb7bbf192 Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
Douglas Gregor a306a8119f Cleanup lots of inspection failures
[SVN r35826]
2006-11-03 19:17:56 +00:00
Douglas Gregor 88edab5b45 Remove old Python cruft
[SVN r35825]
2006-11-03 19:10:49 +00:00
Douglas Gregor b0474f1dd9 Clear up copyright/license problems
[SVN r35824]
2006-11-03 18:55:11 +00:00
Roland Schwarz 21b9a9f799 Applied a fix, that will skip the serialization test for compilers that do not provide spirit (and serialization in turn)
[SVN r35670]
2006-10-20 08:28:10 +00:00
Ronald Garcia 59ba89640e Squashed some bugs: attribute list commas are optional. '#' was not
behaving properly (especially inside quoted strings).


[SVN r35667]
2006-10-19 23:37:01 +00:00
Ronald Garcia d1c241d77e comment typo.
[SVN r35666]
2006-10-19 21:46:00 +00:00
Ronald Garcia 83e6c4a9c3 Added an example.
[SVN r35638]
2006-10-16 18:08:03 +00:00
Ronald Garcia 3ae3292696 Initial Revision.
[SVN r35637]
2006-10-16 18:03:28 +00:00
Ronald Garcia e0367b4a21 Added a conditional around some debugging code.
[SVN r35635]
2006-10-16 17:54:23 +00:00
Ronald Garcia f1257a09d1 updated docs. Case-sensitivity is supported. Subgraphs at the BGL level
are not.


[SVN r35603]
2006-10-14 01:25:56 +00:00
Ronald Garcia f4e0af95f1 Added support for graph properties.
[SVN r35602]
2006-10-14 01:13:39 +00:00
Ronald Garcia 4c5c2fc303 Added hooks into the grammar to possibly catch graph properties.
[SVN r35601]
2006-10-13 22:51:17 +00:00
Douglas Gregor 344dd6b155 Fix handling of empty graphs
[SVN r35420]
2006-09-29 15:33:12 +00:00
Douglas Gregor 392f5fa635 Fix handling of empty graphs
[SVN r35420]
2006-09-29 15:33:12 +00:00
Douglas Gregor bf2f7f86fa Fix parameter name
[SVN r35419]
2006-09-29 15:30:07 +00:00
Douglas Gregor cc4f49d760 Fix parameter name
[SVN r35419]
2006-09-29 15:30:07 +00:00
Douglas Gregor 0d2d95b2f2 Do the DLL import/export dance for the GraphViz reader
[SVN r35336]
2006-09-26 13:10:59 +00:00
Douglas Gregor 58e287d115 Do the DLL import/export dance for the GraphViz reader.
[SVN r35335]
2006-09-26 12:52:08 +00:00
Douglas Gregor e505bf99db Test and fix serialization code
[SVN r35257]
2006-09-21 17:02:14 +00:00
Douglas Gregor d34d447b68 Test and fix serialization code
[SVN r35257]
2006-09-21 17:02:14 +00:00
Douglas Gregor a03ed0e26d Work around compiler optimizer bugs
[SVN r35225]
2006-09-20 13:55:16 +00:00
Dave Abrahams 9233499dbc Take advantage of BOOST_CONCEPT_USAGE for defining usage requirements:
Using this macro is better than simply defining a destructor because
usage patterns will be tested whenever associated types are accessed.


[SVN r35199]
2006-09-19 13:41:30 +00:00
Douglas Gregor f4b0928c2d Work around Sun CC bug
[SVN r35100]
2006-09-13 20:49:10 +00:00
Douglas Gregor 04fea004d9 Work around Sun CC bug
[SVN r35100]
2006-09-13 20:49:10 +00:00
Douglas Gregor bc49236ccc Work around MSVC 6, 7 bug
[SVN r35099]
2006-09-13 20:41:28 +00:00
Jeremy Siek 73b6ddc2d4 fixed has_cycle_dfs
[SVN r35026]
2006-09-06 17:26:48 +00:00
Daniel James d4db30f9d3 Merge tab removal.
[SVN r34995]
2006-08-29 20:59:37 +00:00
Daniel James 3a07fe7c22 Remove tabs.
[SVN r34994]
2006-08-29 20:55:58 +00:00
Douglas Gregor a7c753ded9 Move initialize_vertex before setting properties
[SVN r34862]
2006-08-10 13:45:12 +00:00
Douglas Gregor ac847ac715 Move initialize_vertex before setting properties
[SVN r34862]
2006-08-10 13:45:12 +00:00
Douglas Gregor 47214f4fdc Move initialize_vertex after setting properties
[SVN r34861]
2006-08-10 13:41:30 +00:00
Douglas Gregor ec2dcfddbb Move initialize_vertex after setting properties
[SVN r34861]
2006-08-10 13:41:30 +00:00
Douglas Gregor ec7156274d Give bundle_property_map a default constructor
[SVN r34812]
2006-08-03 18:30:26 +00:00
Douglas Gregor 9badc94845 Give bundle_property_map a default constructor
[SVN r34811]
2006-08-03 18:29:44 +00:00
Douglas Gregor 39b29f3d79 Give bundle_property_map a default constructor
[SVN r34811]
2006-08-03 18:29:44 +00:00
Douglas Gregor 65f63fecc1 Documentation fixes, from David Baird
[SVN r34810]
2006-08-03 18:20:43 +00:00
Douglas Gregor 7c5f9daa62 Documentation fixes, from David Baird
[SVN r34810]
2006-08-03 18:20:43 +00:00
Gennaro Prota 62cc164059 (merge from head)
fixed almost all issues reported by the inspect tool in boost/graph/


[SVN r34732]
2006-07-25 23:12:38 +00:00
Gennaro Prota fc6ec3f791 fixed almost all issues reported by the inspect tool in boost/graph/
[SVN r34731]
2006-07-25 21:14:19 +00:00
Gennaro Prota 560f485326 (merge from head)
tab removal


[SVN r34730]
2006-07-25 14:27:40 +00:00
Gennaro Prota b47cf53fcb tab removal
[SVN r34729]
2006-07-25 14:19:27 +00:00
Gennaro Prota 5898cc5bae (merge from head)
removed unnamed namespace reported by inspect tool


[SVN r34716]
2006-07-24 21:58:09 +00:00
Gennaro Prota 0d30a51129 removed unnamed namespace reported by inspect tool
[SVN r34715]
2006-07-24 21:56:37 +00:00
Douglas Gregor 1035ddac56 Work around MSVC 7.0 bug
[SVN r34656]
2006-07-21 20:25:50 +00:00
Douglas Gregor ce0f796b84 Work around VC7 bugs
[SVN r34456]
2006-07-03 18:03:34 +00:00
Rene Rivera 1b3a6936a2 Don't build old viz parser unless explicitly asked for. (merge from head)
[SVN r34442]
2006-07-02 16:43:58 +00:00
Rene Rivera ad8a07eb09 Don't build old viz parser unless explicitly asked for.
[SVN r34441]
2006-07-02 16:39:51 +00:00
Douglas Gregor b659351ea7 Fix locations of default constructors
[SVN r34422]
2006-06-28 20:00:27 +00:00
Douglas Gregor ff7a5d1282 Deal with GCC problems in updated concepts library
[SVN r34418]
2006-06-27 15:01:14 +00:00
Douglas Gregor cfe0e0b552 Include a main function
[SVN r34417]
2006-06-27 15:00:29 +00:00
Douglas Gregor 50b1f74b93 Fix parameter to add_vertices
[SVN r34414]
2006-06-27 13:53:47 +00:00
Douglas Gregor bf73135721 Fix parameter to add_vertices
[SVN r34413]
2006-06-27 13:46:36 +00:00
Caleb Epstein 826f7a33d8 boost/graph/{king_ordering,cuthill_mckee_ordering}.hpp: Fix for typedef conflict with DS macro on Solaris (merge from RC_1_34_0)
[SVN r34356]
2006-06-19 14:50:30 +00:00
Caleb Epstein 1b468cb8aa boost/graph/{king_ordering,cuthill_mckee_ordering}.hpp: Fix for typedef conflict with DS macro on Solaris
[SVN r34355]
2006-06-19 14:49:21 +00:00
Douglas Gregor fcd3996f0e Be consistent about initialize_vertex calls
[SVN r34135]
2006-06-02 15:52:46 +00:00
Douglas Gregor 05a7299c0e Be consistent about initialize_vertex calls
[SVN r34135]
2006-06-02 15:52:46 +00:00
Douglas Gregor e5848fee44 directed_category need only be convertible to one of directed_tag or undirected_tag
[SVN r34133]
2006-06-02 14:27:15 +00:00
Douglas Gregor fb06d7e38e directed_category need only be convertible to one of directed_tag or undirected_tag
[SVN r34133]
2006-06-02 14:27:15 +00:00
Dave Abrahams ebb6697936 Strip off "Concept" suffix on concept checking classes.
[SVN r33908]
2006-05-02 15:06:06 +00:00
Dave Abrahams 77e5f0701d Make it so the test will actually test something in release mode builds.
[SVN r33872]
2006-04-30 03:42:14 +00:00
Dave Abrahams 53f5645393 Fixes for concept checking; use destructors for checking classes, misc cleanup.
[SVN r33862]
2006-04-29 20:27:14 +00:00
Jeremy Siek 6b24966483 added info about iterators
[SVN r33815]
2006-04-25 15:37:53 +00:00
Jeremy Siek ac1e867af4 added edges_size_type to adjacency_list_traits
[SVN r33767]
2006-04-22 13:41:55 +00:00
Jeremy Siek 62c6d9ef2f added edges_size_type and vertices_size_type to the adjacency_list_traits
[SVN r33766]
2006-04-22 13:35:32 +00:00
Jeremy Siek 69c5cf732c added comparison operators (<,etc.) to the edge class
[SVN r33765]
2006-04-22 13:19:48 +00:00
Douglas Gregor 0b1a337f52 Don't generate self edges when asked not to, from Johan Oudinet
[SVN r33644]
2006-04-10 20:09:33 +00:00
Douglas Gregor f44af6dd2f Don't generate self edges when asked not to, from Johan Oudinet
[SVN r33644]
2006-04-10 20:09:33 +00:00
Douglas Gregor 891ec4e4e3 Move enum out of GraphParse::operator()
[SVN r33642]
2006-04-10 19:27:23 +00:00
Douglas Gregor 96a3f1fa67 Move enum out of GraphParse::operator()
[SVN r33642]
2006-04-10 19:27:23 +00:00
Douglas Gregor 64428fc074 Move enum out of GraphParse::operator()
[SVN r33641]
2006-04-10 19:24:49 +00:00
Vladimir Prus 9a10195600 Merge from trunk
[SVN r33595]
2006-04-07 13:49:45 +00:00
Vladimir Prus fcf5d92ca6 Disable debug symbols for intel
[SVN r33591]
2006-04-07 13:38:53 +00:00
nobody 0d52712c3d This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
Aaron Windsor 5597592ff5 Look at vertices with minimum degree 0 first instead of starting with those with minimum degree 1 (fix courtesy of Roman Dementiev)
[SVN r33414]
2006-03-21 00:26:19 +00:00
Aaron Windsor dea8296e5b Added link to maximum_cardinality_matching
[SVN r33400]
2006-03-20 00:10:43 +00:00
Aaron Windsor bcb16ef822 Bug fix from Roman Dementiev: when updating the degree of a vertex in the BucketSorter, that vertex could be moved to the wrong bucket.
[SVN r33374]
2006-03-18 17:28:50 +00:00
Aaron Windsor ce0ec9e236 Added bug fix for smallest_last_ordering.hpp from Roman Dementiev
[SVN r33373]
2006-03-18 17:26:22 +00:00
Douglas Gregor 9e359134a1 Moved to the Boost Software License
[SVN r33324]
2006-03-12 15:01:03 +00:00
Douglas Gregor be9ad03abe Update to Boost Software License
[SVN r33312]
2006-03-10 15:08:31 +00:00
Jeremy Siek dbe744f6e2 added superscript notation
[SVN r33296]
2006-03-09 22:15:41 +00:00
Jeremy Siek 9084e6ce9b added time complexity
[SVN r33294]
2006-03-09 22:13:42 +00:00
Douglas Gregor a4a5a1a42b Add dummy Directed parameter to the CSR graph
[SVN r33291]
2006-03-09 20:06:23 +00:00
Douglas Gregor f9da93dbe2 Add two_bit_color_map
[SVN r33290]
2006-03-09 19:55:13 +00:00
Douglas Gregor a0919bdff6 Fix CSR properties
[SVN r33289]
2006-03-09 19:52:39 +00:00
Douglas Gregor 573f424452 Update to Boost Software License
[SVN r33288]
2006-03-09 18:34:18 +00:00
Douglas Gregor 4a159ba118 Don't call boost::get qualified
[SVN r33286]
2006-03-09 16:23:36 +00:00
Ronald Garcia 0d6c5bb4e2 Removed unused function warning.
[SVN r33285]
2006-03-09 16:18:05 +00:00
Ronald Garcia 6616bdba33 adjusted namespace imports to be more localized.
[SVN r33284]
2006-03-09 16:16:09 +00:00
Ronald Garcia 7a6a6fcbb6 Remove unused variable warnings.
[SVN r33282]
2006-03-09 15:37:52 +00:00
Dave Abrahams 11f9e9b044 Stop using assert() in tests
[SVN r33181]
2006-02-28 22:56:33 +00:00
Douglas Gregor 399aa3b28a Give vector_as_graph a default vertex_index property
[SVN r33173]
2006-02-28 14:33:14 +00:00
Douglas Gregor a9e4925167 Tests for EdgeListS=setS
[SVN r33159]
2006-02-27 18:18:47 +00:00
Douglas Gregor 3eadd82c6b Fixes for EdgeListS=setS and static_asserts for broken functionality when EdgeListS=vecS
[SVN r33158]
2006-02-27 18:17:56 +00:00
Douglas Gregor 779274575b Properly support bundled properties for members stored in base classes of the bundle
[SVN r33156]
2006-02-27 16:35:26 +00:00
Douglas Gregor 5f28b0237a Add support for compare, combine, inf, and zero in johnson_all_pairs_shortest_paths
[SVN r33148]
2006-02-27 15:38:18 +00:00
Douglas Gregor 29a09c1fc0 Use compare and zero properly
[SVN r33146]
2006-02-27 15:15:13 +00:00
Douglas Gregor 7465bc2c20 Remove bidir_vec_remove_edge
[SVN r33145]
2006-02-27 14:33:49 +00:00
Vladimir Prus 36656fda3d Update Jamfile.v2
[SVN r33068]
2006-02-21 16:02:26 +00:00
Douglas Gregor 0245e863c8 Add some tests
[SVN r33040]
2006-02-20 21:26:46 +00:00
Alisdair Meredith af44a9cfa5 patch for infinite looping on Borland compilers
[SVN r33014]
2006-02-19 17:39:52 +00:00
Douglas Gregor 22ca266765 Improvements to biconnected components, from Janusz Piwowarski
[SVN r32902]
2006-02-13 18:42:30 +00:00
Jeremy Siek 12aa017c9f fixed url
[SVN r32830]
2006-02-11 16:07:16 +00:00
Jeremy Siek bb6401e096 tt
[SVN r32829]
2006-02-11 16:06:38 +00:00
Jeremy Siek 6cff97469a added note about serialization
[SVN r32828]
2006-02-11 16:05:22 +00:00
Jeremy Siek 75100306fe added name tag
[SVN r32827]
2006-02-11 15:48:57 +00:00
Jeremy Siek da3078ed52 added docs for serialization
[SVN r32826]
2006-02-11 15:44:14 +00:00
Douglas Gregor 70bbfe664b Some improvements from Jeremiah Willcock
[SVN r32743]
2006-02-08 16:15:16 +00:00
Douglas Gregor 3f81217fad Don't assume that null_vertex is the same type as vertices_size_type
[SVN r32740]
2006-02-08 15:37:02 +00:00
Douglas Gregor 3d7d3eb428 Work around x86 floating-point roundoff problems
[SVN r32737]
2006-02-08 14:47:35 +00:00
Douglas Gregor 7f05dc489b erdos_renyi_generator.hpp:
- Keep geometric_distribution happy by passing a non-zero probability

compressed_sparse_row_graph.hpp:
  - Weaken precondition for the Parallel BGL


[SVN r32712]
2006-02-07 17:11:29 +00:00
Douglas Gregor 70e0dd2d23 Add documentation, static_asserts for Bidirectional Graph support in adjacency_matrix
[SVN r32706]
2006-02-07 13:15:35 +00:00
Douglas Gregor 654e43a7ed Make adjacency_matrix model the BidirectionalGraph concept
[SVN r32688]
2006-02-07 04:02:22 +00:00
Douglas Gregor 4f36d52ec3 Update license
[SVN r32680]
2006-02-06 22:19:19 +00:00
Douglas Gregor 174d0d2dff Update copyrights
[SVN r32679]
2006-02-06 22:12:57 +00:00
Aaron Windsor f7db7b7771 Clean up
[SVN r32591]
2006-02-05 17:01:37 +00:00
Douglas Gregor d0176ea39d Fix call to dijkstra_shortest_paths_no_init
[SVN r32385]
2006-01-23 20:57:32 +00:00
Douglas Gregor 42b9c97d31 boost/config/stdlib/libstdcpp3.hpp:
- libstdc++ has hashed containers and slist; they're just in a different place

boost/graph/graph_utility.hpp, boost/pending/container_traits.hpp,
boost/graph/adjacency_list.hpp:
  - Deal with weird placement of slist and hash_set


[SVN r32384]
2006-01-23 20:50:27 +00:00
Douglas Gregor 0e08ed3d80 constify adjacency list write routines
[SVN r32382]
2006-01-23 19:32:55 +00:00
Douglas Gregor 665b330286 Fix a typo
[SVN r32381]
2006-01-23 19:29:16 +00:00
Vladimir Prus f36e7b9170 Update Jamfile.v2
[SVN r32351]
2006-01-18 12:46:30 +00:00
Jeremiah Willcock 7815e65261 Fixes to uses of shared_ptr
[SVN r32289]
2006-01-11 21:18:26 +00:00
Douglas Gregor eddae97983 boost/pending/property_serialize.hpp:
- Moved serialization code here

boost/pending/property.hpp:
  - From here

boost/graph/adj_list_serialize.hpp:
  - Include the new property_serialization header


[SVN r32275]
2006-01-10 13:53:48 +00:00
Douglas Gregor e96148194d Don't try to use the serialization library on GCC 2.95.3
[SVN r32274]
2006-01-10 13:43:38 +00:00
Jeremy Siek c668929a24 changed std::map to std::vector
[SVN r32252]
2006-01-06 22:16:39 +00:00
Jeremy Siek e5a0f4f5fc blah
[SVN r32251]
2006-01-06 22:09:01 +00:00
Jeremy Siek efd6f46383 changed to be compatible with old properties
[SVN r32250]
2006-01-06 22:03:54 +00:00
Jeremy Siek 61c59d9c1d added support for serialization
[SVN r32249]
2006-01-06 22:03:18 +00:00
Jeremy Siek 727a9d994d minor edit
[SVN r32248]
2006-01-06 22:02:52 +00:00
Jeremy Siek f836ed2531 updated version of the kevin bacon example to use serialization
[SVN r32246]
2006-01-06 21:44:58 +00:00
Jeremy Siek 5b572a82a3 first draft of serialization for adjacency_list
[SVN r32245]
2006-01-06 21:28:29 +00:00
Jeremiah Willcock a1b7e1cd95 Undid commit of altered version of dominator_tree.hpp
[SVN r32243]
2006-01-06 19:22:34 +00:00
Jeremiah Willcock 9df2b90f56 Refactored indexed property code into separate file
[SVN r32242]
2006-01-06 19:20:38 +00:00
Douglas Gregor 183d88cfb6 Oops, fix non-bundled properties support
[SVN r32236]
2006-01-06 14:14:57 +00:00
Douglas Gregor 472dba30ed Bundled properties now work with adjacency_list I/O
[SVN r32235]
2006-01-06 14:01:55 +00:00
Douglas Gregor d8fc6477d7 Start fixing adjacency_list I/O with bundled properties
[SVN r32234]
2006-01-06 13:17:35 +00:00
Douglas Gregor 2a204d5482 Pull in std::floor
[SVN r32229]
2006-01-05 21:57:36 +00:00
Douglas Gregor db9796ddfd sqrt is in namespace std
[SVN r32197]
2006-01-01 17:20:32 +00:00
Vladimir Prus d629b74d98 Update Jamfile.v2
[SVN r32138]
2005-12-22 10:40:28 +00:00
Vladimir Prus 421842272a Update Jamfile.v2: also compile read_graphviz_spirit.
[SVN r32137]
2005-12-22 10:38:18 +00:00
Vladimir Prus c4d72905bf Remove a couple of "signed/unsigned comparison" warnings from gcc.
Note sure how it went unnoticed.


[SVN r32136]
2005-12-22 09:50:23 +00:00
Aaron Windsor f497c3d195 Modified the predicate used by filtered_graph to avoid errors caused by default-initializing iterator property maps uncovered by gcc in _GLIBCXX_DEBUG mode. Included <algorithm> header for std::sort.
[SVN r32127]
2005-12-22 00:09:22 +00:00
Douglas Gregor 86e4dd21af Documentation updates from JongSoo
[SVN r32126]
2005-12-21 15:28:48 +00:00
Douglas Gregor c8ffc289d9 Overhead calculation
[SVN r32120]
2005-12-20 23:04:16 +00:00
Douglas Gregor 5879c83284 Add sorted_erdos_renyi_iterator, from Jeremiah Willcock
[SVN r32119]
2005-12-20 21:59:51 +00:00
Douglas Gregor 8041171b33 Documentation for JongSoo Park's dominator tree implementation
[SVN r32115]
2005-12-20 16:55:11 +00:00
Jeremiah Willcock 1e416130db Removed redundant copy of erdos_renyi_iterator
[SVN r32082]
2005-12-16 21:48:33 +00:00
Douglas Gregor 2e318dccc1 Don't allow the use of the libstdc++ debug mode with this test
[SVN r32009]
2005-12-12 22:01:08 +00:00
Douglas Gregor 02f8dbe592 Initialization fixes for Dijkstra's single-source shortest paths and breadth-first search
[SVN r32000]
2005-12-12 15:53:50 +00:00
Jeremiah Willcock 18586182a1 Fixed bug when running with _GLIBCXX_DEBUG on
[SVN r31972]
2005-12-10 00:50:17 +00:00
Jeremiah Willcock 0d93784f95 Fixed bug in dominator tree code (trying to increment iterator which was erased)
[SVN r31971]
2005-12-09 23:19:38 +00:00
Jeremiah Willcock 9225f94c4b Added qualification to std::time to fix CodeWarrior test failure
[SVN r31970]
2005-12-09 22:54:11 +00:00
Jeremiah Willcock 69317c5bdc Fixed some CSR and Kruskal bugs, plus trying to get more tests to pass
[SVN r31963]
2005-12-09 06:20:49 +00:00
Jeremiah Willcock ada2d70c01 Added extra qualification to try to fix CW9.4 regression failure
[SVN r31959]
2005-12-08 20:44:12 +00:00
Jeremiah Willcock 5271a6bef6 Used different names for different types to try to fix or isolate VC8 regression failures
[SVN r31958]
2005-12-08 20:43:34 +00:00
Douglas Gregor 6937336a09 Merged from Version_1_33_1
[SVN r31949]
2005-12-08 03:23:02 +00:00
Jeremiah Willcock 9ba47b4b7b Changed log2 to log_base_2 because log2 is a macro on some platforms
[SVN r31905]
2005-12-04 18:50:40 +00:00
Jeremiah Willcock bb1fba7555 Attempted portability fixes
[SVN r31903]
2005-12-04 18:45:47 +00:00
Douglas Gregor e87ac08817 Work around min/max stupidities in Visual C++ headers
[SVN r31899]
2005-12-04 17:24:50 +00:00
Jeremiah Willcock cc60980341 Tried to fix VC8 compatibility problem
[SVN r31898]
2005-12-04 05:41:13 +00:00
Jeremiah Willcock 6fe01d0c4c Added more comprehensive CSR tests, and fixed a few m_last_source-related bugs
[SVN r31897]
2005-12-04 05:28:26 +00:00
Jeremiah Willcock 29d60b8e6a Fixed bug in edge_from_index() when used with partially constructed CSR graphs
[SVN r31894]
2005-12-03 22:24:28 +00:00
Jeremiah Willcock 0e2f464666 Added incremental construction functions to compressed_sparse_row_graph, along with tests and documentation
[SVN r31893]
2005-12-03 21:18:49 +00:00
Douglas Gregor 1e42266075 Dominator tree computation, from JongSoo Park
[SVN r31881]
2005-12-02 16:05:55 +00:00
Douglas Gregor aa3dcfb2e1 Add example for CSR graph
[SVN r31880]
2005-12-02 15:24:02 +00:00
Douglas Gregor 9be555c4f5 Do the complete Where Defined thing
[SVN r31879]
2005-12-02 14:13:52 +00:00
Douglas Gregor 8899a047d4 Discuss actual CSR format
[SVN r31878]
2005-12-02 14:12:44 +00:00
Douglas Gregor 6c93d9b187 Improve documentation for CSR graph
[SVN r31877]
2005-12-02 13:58:18 +00:00
Douglas Gregor a5c1c8d953 Improvements and documentation for compressed_sparse_row_graph
[SVN r31871]
2005-12-01 23:42:01 +00:00
Douglas Gregor 80147f664b Add support for internal properties to the CSR graph
[SVN r31869]
2005-12-01 20:55:37 +00:00
Douglas Gregor 7ae0a8d974 Move constructor parameter to match adjacency_list
[SVN r31866]
2005-12-01 18:28:51 +00:00
Douglas Gregor 549f85c80f Compressed sparse row graph type
[SVN r31865]
2005-12-01 18:24:00 +00:00
Rene Rivera 4df63cf4f3 Merge from RC_1_33_0.
[SVN r31706]
2005-11-19 20:40:20 +00:00
Rene Rivera 6466795448 Merge from RC_1_33_0.
[SVN r31704]
2005-11-19 19:56:13 +00:00
Douglas Gregor 4373b57677 Fix typos
[SVN r31147]
2005-09-29 13:36:46 +00:00
Douglas Gregor 97e891fee0 Use named parameters where appropriate
[SVN r31132]
2005-09-27 14:01:18 +00:00
Jeremy Siek cd346002ea changed some stuff, rearranged and added example
[SVN r31022]
2005-09-18 15:18:19 +00:00
Aaron Windsor 48577cde2f Added external vertex index maps to two function calls where they were missing.
[SVN r31015]
2005-09-17 16:00:55 +00:00
Jeremy Siek 0a4891fcf0 added notes about vertex_index default
[SVN r30998]
2005-09-15 15:38:21 +00:00
Jeremy Siek 91e1935e1d added note about default for vertex_index
[SVN r30997]
2005-09-15 15:21:04 +00:00
Jeremy Siek 8fe7018793 fixed range
[SVN r30995]
2005-09-15 14:22:23 +00:00
Douglas Gregor 85e1d7e344 Remove unnecessary typename
[SVN r30990]
2005-09-15 02:05:00 +00:00
Aaron Windsor ca5bbacc2e Made a few cosmetic changes to the code and simplified the loop that walks up blossoms to find nearest common ancestors.
[SVN r30987]
2005-09-14 16:53:18 +00:00
Douglas Gregor b48254406d Add visitor and named parameter support to biconnected_componnets, from Janusz Piwowarski
[SVN r30919]
2005-09-12 15:25:09 +00:00
Douglas Gregor 49ca29e905 Always use log2
[SVN r30916]
2005-09-12 14:58:37 +00:00
Douglas Gregor e10fef2660 Use an integer log2 instead of the double version
[SVN r30892]
2005-09-09 22:15:05 +00:00
Douglas Gregor fddbb9b66e Add matching_test
[SVN r30859]
2005-09-07 19:12:17 +00:00
Douglas Gregor 48867ed3ab Add bibliography entry for Edmonds maximum cardinality matching algorithm
[SVN r30858]
2005-09-07 18:01:43 +00:00
Douglas Gregor 75d3e89442 Add/fix entry for edmonds_maximum_cardinality_matching
[SVN r30850]
2005-09-07 15:45:27 +00:00
Douglas Gregor ba824058ef edmonds_maximum_cardinality_matching, from Aaron Windsor
[SVN r30848]
2005-09-07 15:39:03 +00:00
Stefan Slapeta fe508c8c46 Turn off debug info for layout_test on intel
[SVN r30745]
2005-08-31 08:23:59 +00:00
Douglas Gregor 73a5b07661 Workaround for GCC 2.95.3
[SVN r30646]
2005-08-24 14:25:37 +00:00
Jeremy Siek bbe399a2b0 added default initialization for property::m_value to quiet warning from gcc 4.0.1
[SVN r30629]
2005-08-22 14:47:48 +00:00
Douglas Gregor 786336804e Fully qualify detail namespace
[SVN r30619]
2005-08-22 01:53:37 +00:00
Jeremy Siek 869dab48ef member functions -> free functions
[SVN r30603]
2005-08-18 14:33:47 +00:00
Vladimir Prus b62baf4ec1 Support null_vertex for filtered_graph.
Thanks to Tiago de Paula Peixoto for the bug report.


[SVN r30583]
2005-08-15 06:13:19 +00:00
Douglas Gregor cf9d1521d8 Merged from 1.33.0 release
[SVN r30540]
2005-08-12 13:02:37 +00:00
Douglas Gregor 6df693c448 get_property fix for subgraph
[SVN r30220]
2005-07-22 19:22:00 +00:00
Douglas Gregor 64f732195e Make vertices and edges support len()
[SVN r30189]
2005-07-20 17:05:47 +00:00
Douglas Gregor 034950f993 pickle.cpp: Work around MSVC 7.1 bugs
[SVN r30180]
2005-07-19 16:27:00 +00:00
Douglas Gregor 309f243ea1 Adorn vertex_descriptor
[SVN r30020]
2005-07-12 18:44:02 +00:00
Douglas Gregor 9294975522 Fix blips in inspection report
[SVN r29996]
2005-07-12 03:10:33 +00:00
Douglas Gregor 50bd84a168 Example
[SVN r29995]
2005-07-12 02:37:50 +00:00
Douglas Gregor 7ce3496b77 basic_graph.cpp:
- Fix bugs pointed out by Apple's GCC 4.0.0

page_rank.cpp:
  - Make the "done" version actually work

visitor.hpp:
  - Undefine BGL_VISITOR_EVENT properly


[SVN r29931]
2005-07-07 14:02:32 +00:00
Douglas Gregor 6aca595636 Eliminate unused output_heap function
[SVN r29929]
2005-07-07 13:57:16 +00:00
Douglas Gregor eaffe5d5d0 Eliminate need for unistd.h, isatty
[SVN r29928]
2005-07-07 13:08:00 +00:00
Douglas Gregor 39868b1498 Cannot write to a vec_adj_list_vertex_id_map
[SVN r29915]
2005-07-07 03:33:44 +00:00
Douglas Gregor f11b29f1e7 Add some necessary defines
[SVN r29906]
2005-07-06 13:04:17 +00:00
Douglas Gregor ad169e0261 Eat carriage returns, too
[SVN r29903]
2005-07-05 21:39:51 +00:00
Douglas Gregor 6bc7f34a38 silence a useless MSVC warning
[SVN r29897]
2005-07-05 11:52:49 +00:00
Douglas Gregor ce4eb73bfa Try to turn off optimization for Intel compiler, because it ICEs the compiler
[SVN r29896]
2005-07-05 11:38:39 +00:00
Douglas Gregor 6864b4cb77 Do not use bracket syntax when we're only reading a property map
[SVN r29847]
2005-06-30 18:41:02 +00:00
Douglas Gregor 72ad366ad3 Work around stupid min/max macros, AGAIN
[SVN r29774]
2005-06-24 14:33:32 +00:00
Douglas Gregor c113d0c078 Make relax work when we're searching for longest paths
[SVN r29760]
2005-06-23 19:12:02 +00:00
Douglas Gregor 82e676d99f Fix main signature
[SVN r29740]
2005-06-22 18:25:59 +00:00
Douglas Gregor f11331b2f1 Pickle support
[SVN r29735]
2005-06-22 14:58:25 +00:00
Douglas Gregor 9934fd8da4 Fix constructor call
[SVN r29560]
2005-06-14 13:52:02 +00:00
Douglas Gregor d745a537bf Fix conversion of Python objects to strings
[SVN r29515]
2005-06-10 11:55:59 +00:00
Douglas Gregor 4e3c936503 Deal with macroized max
[SVN r29494]
2005-06-09 15:49:08 +00:00
Douglas Gregor 0e295d01c3 Fix depth_first_search root_vertex for Digraph
[SVN r29476]
2005-06-08 14:05:08 +00:00
Douglas Gregor b9a10e2861 Support root_vertex in depth_first_search
[SVN r29473]
2005-06-08 05:59:57 +00:00
Rene Rivera d76004af71 Fixes to make things compile for CW, and possibly others.
* Makefile; don't output "#line" info to prevent some errors parsing file names.
* *parser.cpp; Remove problematic "#line" directives until these files get regenerated from source.
* *parser.cpp; Add "using namespace std;" as free/malloc, possible others, are used and other fail on more conforming compilers.


[SVN r29347]
2005-06-01 15:32:06 +00:00
Victor A. Wagner Jr. 0fbae0aeff Changed - some double constants to floats to stop data-loss warnings
[SVN r29079]
2005-05-19 22:05:48 +00:00
Douglas Gregor 63a3c9ce83 Update parameter names in non-named parameter version to match those in the named parameter version
[SVN r28775]
2005-05-10 00:19:01 +00:00
Eric Niebler 656907543a min/max fixes
[SVN r28750]
2005-05-09 01:00:41 +00:00
Douglas Gregor 52507c33cf Don't dereference NULL pointers, even though the code will never run
[SVN r28654]
2005-05-04 14:42:38 +00:00
Douglas Gregor 862343d802 Fix some typos
[SVN r28582]
2005-05-02 15:53:01 +00:00
Douglas Gregor c1503a89a5 Edmunds-Karp also requires IncidenceGraph
[SVN r28580]
2005-05-02 15:39:23 +00:00
Douglas Gregor 87588dd9ff Support set_property and get_property
[SVN r28579]
2005-05-02 15:33:35 +00:00
Douglas Gregor c3ec244c89 Documentation and example patch from Andreas Scherer
[SVN r28578]
2005-05-02 15:16:34 +00:00
Douglas Gregor 38b526762a Document which compilers work well with the BGL-Python bindings
[SVN r28418]
2005-04-22 14:28:55 +00:00
Douglas Gregor 41ebb5fbc1 boost/graph/king_ordering.hpp:
- Try to get bind invocation working on vc7

libs/graph/test/bellman-test.cpp:
  - Just don't run parts of this test on vc7 or older

libs/graph/test/gursoy_atun_layout_test.cpp:
  - Pull in names from ::boost so that vc7 can find them.


[SVN r28416]
2005-04-22 14:18:24 +00:00
Douglas Gregor 0a589fd44a Work around broken standard libraries
[SVN r28414]
2005-04-22 13:58:23 +00:00
Douglas Gregor 430aef4b59 Apply Joel's workaround for VC++ 8.0 as well as 7.1
[SVN r28409]
2005-04-22 11:47:48 +00:00
Douglas Gregor 66e61339b1 Turn off debug symbols by default
[SVN r28397]
2005-04-22 02:25:07 +00:00
Douglas Gregor 90f1ec41a4 Jamfile: Use -GR- instead of /GR- to keep bjam from flipping the slash to a backslash
python\Jamfile: Default to linking against the Boost.Python DLL, although we'll have to fix stuff on Mac OS X


[SVN r28396]
2005-04-22 00:32:14 +00:00
Douglas Gregor 289715b159 Turn off optimization for the visualization lib
[SVN r28395]
2005-04-21 23:58:14 +00:00
Douglas Gregor b904a829b6 king_ordering.hpp: Access colors vector with index, not vertex
[SVN r28383]
2005-04-21 14:47:55 +00:00
Joel de Guzman e184561762 Workaround for VC7.1
[SVN r28363]
2005-04-21 05:20:51 +00:00
Douglas Gregor 34bc3a8786 doc/*: Document Python bindings
src/python/basic_graph.cpp src/python/basic_graph.hpp:
  - Add ability to record the names of vertices input via the adjacency list
    reader.

example/python/breadth_first_search.py: Building a better example


[SVN r28350]
2005-04-20 23:45:55 +00:00
Douglas Gregor efc05efebd Document all of the BGL algorithms that are available in the Python bindings.
In some cases, tweak the implementations where they didn't make sense.


[SVN r28344]
2005-04-20 20:08:35 +00:00
Douglas Gregor 9fe51b2a58 cuthill_mckee_ordering.hpp, king_ordering.hpp:
- Use 3-parameter make_iterator_property_map, for stupid compilers

graph_traits.hpp:
  - Work around partial specialization bugs in GCC 2.95.3 and, potentially,
    CodeWarrior <= 9.4

properties.hpp:
  - I think Intel <= 7.1 can handle bundled properties...


[SVN r28338]
2005-04-20 14:57:00 +00:00
Douglas Gregor 631d35bcc2 Started documenting Python bindings
libs/graph/src/python/basic_graph.cpp, libs/graph/src/python/basic_graph.hpp:
  - Allow one to build a graph from anything that looks like a Python list or
    tuple.


[SVN r28324]
2005-04-19 17:01:07 +00:00
Douglas Gregor 003e90151e Deal with local/global issues with subgraph bundled properties
[SVN r28307]
2005-04-18 03:20:16 +00:00
Douglas Gregor 4bc19a1621 boost/graph/cuthill_mckee_ordering.hpp, boost/graph/king_ordering.hpp:
- Remove use of connected components, so we need only one color map
    running around
  - Provide simple overloads, requiring only the graph and the output iterator.

boost/graph/detail/sparse_ordering.hpp:
  - Move out_degree_property_map here

boost/graph/fruchterman_reingold.hpp:
  - Fix enumeration of pairs in grid_force_pairs to repulse vertices in
    adjacent grid cells (in addition to the current cell), so we don't get
    vertices forming crosses on grid lines.
  - Round up the number of rows/columns.

libs/graph/doc/cuthill_mckee_ordering.html, libs/graph/doc/king_ordering.html:
  - Document new overloads

libs/graph/doc/gursoy_atun_layout.html:
  - Add missing semicolon

libs/graph/src/python/cuthill_mckee_ordering.cpp,
libs/graph/test/cuthill_mckee_ordering.cpp:
  - Test and use the new overloads

libs/graph/build/python/Jamfile, libs/graph/src/python/module.cpp,
libs/graph/src/python/king_ordering.cpp:
  - Support King's ordering algorithm from Python

libs/graph/example/python/vis.py:
  - By default, do a "progressive" Fruchterman-Reingold layout

libs/graph/test/king_ordering.cpp:
  - Test new overload


[SVN r28306]
2005-04-17 23:50:43 +00:00
Douglas Gregor ea6d11a47e Fix bundled properties support in filtered_graph adaptor and add it to reverse_graph adaptor
[SVN r28291]
2005-04-17 13:47:52 +00:00
Douglas Gregor 041f615cc3 boost/graph/filtered_graph.hpp, boost/graph/graph_traits.hpp,
boost/graph/subgraph.hpp:
  - Support bundled properties in graph adaptors

libs/graph/test/bundled_properties.cpp:
  - Test subgraph with bundled properties

libs/graph/doc/history.html:
  - Document what we did


[SVN r28265]
2005-04-15 07:23:47 +00:00
Douglas Gregor cfb03e5e10 Work around MSVC6 bugs
[SVN r28258]
2005-04-14 23:14:00 +00:00
Douglas Gregor 5220440e86 Copyright statement and a using directive
[SVN r28257]
2005-04-14 23:08:24 +00:00
Douglas Gregor 9915f79681 Work around bugs in Intel 7.1 compiler and VC6 library
[SVN r28255]
2005-04-14 22:55:14 +00:00
Douglas Gregor 2e67897926 Workaround for standard libraries without templated iterator constructors
[SVN r28254]
2005-04-14 22:22:38 +00:00
Douglas Gregor 1a6a672c6e Prune back the betweenness centrality test graph size
[SVN r28253]
2005-04-14 21:52:57 +00:00
Douglas Gregor 1420cc346d Work around a very picky Tru64 compiler whose asserts don't like to convert
[SVN r28252]
2005-04-14 21:50:09 +00:00
Vladimir Prus 6b15ae6041 Change lib name to match V1
[SVN r28240]
2005-04-14 11:32:36 +00:00
Douglas Gregor 6ae80231b2 Lots of portability fixes throughout the graph library
[SVN r27997]
2005-04-06 03:48:20 +00:00
Douglas Gregor 8d1a7de32f Support mixed-case keywords in GraphViz parser
[SVN r27948]
2005-04-04 02:27:36 +00:00
Douglas Gregor 66ee37fbf4 Test sparse matrix ordering
[SVN r27909]
2005-04-01 20:45:39 +00:00
Douglas Gregor cfc4c1b7d1 Add Sparse Matrix Ordering section, with King, Cuthill-McKee, and MMO algorithms
[SVN r27908]
2005-04-01 20:22:08 +00:00
Douglas Gregor 9eb9501c27 boost/graph/cuthill_mckee_ordering.hpp:
- Support for multiple components
  - Recast as invocation of breadth_first_search

boost/graph/king_ordering.hpp:
  - King's algorithm for sparse matrix ordering

boost/graph/detail/sparse_ordering.hpp:
  - Details for the sparse matrix ordering algorithms

libs/graph/example/king_ordering.cpp,
libs/graph/example/cuthill_mckee_ordering.cpp:
  - Usage examples for the sparse matrix ordering algorithms

libs/graph/doc/bibliography.html, libs/graph/doc/cuthill_mckee_ordering.html,
libs/graph/doc/king_ordering.html:
  - Updated documentation to reflect new implementations

libs/graph/doc/history.html, index_1_33_0.htm:
  - Announcements


[SVN r27907]
2005-04-01 20:18:45 +00:00
Douglas Gregor e3455c28eb src/python/graphviz.cpp, src/python/module.cpp:
- Export GraphViz exceptions to Python

src/python/module.cpp:
  - Support directed graphs

example/python/vis.py:
  - Support directed graphs


[SVN r27890]
2005-03-30 23:35:21 +00:00
Douglas Gregor 08119fe298 Work around floating-point inaccuracy failures
[SVN r27877]
2005-03-30 04:38:23 +00:00
Douglas Gregor bbb0b30dd3 Fix issues with separate compilation of GraphViz reader
[SVN r27870]
2005-03-29 18:36:31 +00:00
Douglas Gregor 2242193f11 Boost Software License conversion
[SVN r27869]
2005-03-29 18:04:18 +00:00
Douglas Gregor 3623623cf9 Converted to Boost Software License
[SVN r27802]
2005-03-24 15:10:49 +00:00
Douglas Gregor e75984a2fb Converted to Boost Software License
[SVN r27801]
2005-03-24 15:06:43 +00:00
Douglas Gregor 2577136447 Converted to Boost Software License
[SVN r27800]
2005-03-24 14:54:12 +00:00
Douglas Gregor 1fa1cd881b Default stylesheet
[SVN r27799]
2005-03-24 14:24:11 +00:00
Douglas Gregor 63be68e1cb Undo a misguided optimization
[SVN r27798]
2005-03-24 14:12:37 +00:00
Douglas Gregor 88c47b4995 Document requirements on property values
[SVN r27786]
2005-03-23 18:53:58 +00:00
Douglas Gregor baea51cfa6 Add random graph generators
[SVN r27785]
2005-03-23 18:45:15 +00:00
Douglas Gregor c6b23e89cf Compiled version of the GraphViz reader
[SVN r27784]
2005-03-23 18:41:06 +00:00
Douglas Gregor 6f84b0e9c8 Compile the GraphViz reader separately, for sanity's sake
[SVN r27783]
2005-03-23 18:40:03 +00:00
Douglas Gregor 1d25fe6892 Be sure to compile with optimization
[SVN r27768]
2005-03-22 20:24:25 +00:00
Douglas Gregor c4b48cd144 Provide typedefs for the adjacency_list selectors
[SVN r27738]
2005-03-18 19:22:50 +00:00
Douglas Gregor fb4e0aebd6 Remove-last-vertex optimization (Vikram Shrowty)
[SVN r27731]
2005-03-18 04:47:40 +00:00
Douglas Gregor 91ccce062e Make bundled properties type accessible
[SVN r27730]
2005-03-18 04:31:29 +00:00
Douglas Gregor 1f0e952ff2 No need to print the JAMUNAME
[SVN r27714]
2005-03-16 22:24:30 +00:00
Douglas Gregor ce4275cf9b Link against boost_python statically, because it's easier
[SVN r27713]
2005-03-16 22:18:30 +00:00
Douglas Gregor 15b83ced14 Sequential vertex coloring
[SVN r27708]
2005-03-16 15:38:35 +00:00
Douglas Gregor e2649f122f Vis stuff
[SVN r27704]
2005-03-16 14:19:09 +00:00
Douglas Gregor 0d9a96fec4 Fixes and tweaks
[SVN r27703]
2005-03-16 14:15:25 +00:00
Douglas Gregor 0e0507520b Add graph generators
[SVN r27678]
2005-03-15 22:44:11 +00:00
Douglas Gregor 65339366d3 Random graph generators
[SVN r27677]
2005-03-15 20:02:54 +00:00
Douglas Gregor 4f9118a1d5 Forward iterators, not input iterators
[SVN r27668]
2005-03-15 14:11:33 +00:00
Douglas Gregor 8f2516eefb Fix typo
[SVN r27653]
2005-03-14 16:53:00 +00:00
Douglas Gregor 6e4ed79c88 More algorithms
[SVN r27652]
2005-03-14 16:39:34 +00:00
Douglas Gregor 5ce0418131 Added is_directed member function
[SVN r27651]
2005-03-14 16:27:52 +00:00
Douglas Gregor 426d8e1244 Don't copy singular iterators
[SVN r27650]
2005-03-14 16:23:54 +00:00
Douglas Gregor 972743058e Add clear() member
[SVN r27649]
2005-03-14 16:16:03 +00:00
Douglas Gregor 8b8d0183dc Scope not1
[SVN r27648]
2005-03-14 15:15:18 +00:00
Douglas Gregor fb2a029e97 Fix for very small graphs
[SVN r27647]
2005-03-14 15:10:27 +00:00
Douglas Gregor 896ddc7d95 ReadablePropertyMap fixes
[SVN r27605]
2005-03-10 19:50:45 +00:00
Douglas Gregor 3ba84d959e Fixes for VC 7.1 and some new algorithms
[SVN r27604]
2005-03-10 19:48:18 +00:00
Vladimir Prus 3c045dd60e Fix the issue with dag_shortest_paths discussed in
http://article.gmane.org/gmane.comp.lib.boost.devel/111573/


[SVN r27596]
2005-03-10 11:19:12 +00:00
Douglas Gregor 76483e6dcc Fix digraph typo
[SVN r27584]
2005-03-08 20:32:48 +00:00
Douglas Gregor 9203aaf140 Compiler workarounds
[SVN r27583]
2005-03-08 20:29:29 +00:00
Douglas Gregor 0c1817ada1 More tests
[SVN r27581]
2005-03-08 19:34:53 +00:00
Douglas Gregor 3bb1276271 Added new algorithms
[SVN r27580]
2005-03-08 19:12:16 +00:00
Douglas Gregor d3d9fdc0e5 Lots of new algorithms and cleanups of old ones
[SVN r27579]
2005-03-08 18:54:45 +00:00
Douglas Gregor 760b7f6c45 Some trivial cleanups
[SVN r27575]
2005-03-08 13:14:18 +00:00
Douglas Gregor 77ca9c37ca Works in progress
[SVN r27561]
2005-03-05 14:59:32 +00:00
Douglas Gregor 1e359e31ed Input file for biconnected_components example
[SVN r27558]
2005-03-04 23:47:57 +00:00
Douglas Gregor f237b9feee Biconnected components support
[SVN r27557]
2005-03-04 23:47:10 +00:00
Douglas Gregor 4167abcb5d Use vertex index maps
[SVN r27556]
2005-03-04 23:45:08 +00:00
Douglas Gregor 852cc06c85 lowpt stores indices, not values
[SVN r27555]
2005-03-04 23:26:26 +00:00
Douglas Gregor 4a0081feb3 BSF and Dijkstra example and test
[SVN r27553]
2005-03-04 15:01:50 +00:00
Douglas Gregor 7c446ad0d4 Copyrightify and licensify
[SVN r27552]
2005-03-04 14:53:56 +00:00
Douglas Gregor a882494f03 Support color maps properly
[SVN r27548]
2005-03-03 21:09:05 +00:00
Douglas Gregor d31c4b5a04 Finalize BFS
[SVN r27547]
2005-03-03 20:40:06 +00:00
Douglas Gregor 961a7d09cc Add support for dijkstra_shortest_paths
[SVN r27546]
2005-03-03 20:11:12 +00:00
Douglas Gregor a8488328b1 Fullly generic BFS, comin' at ya
[SVN r27541]
2005-03-03 17:22:17 +00:00
Douglas Gregor 3cca66df9c PageRank implementation
[SVN r27538]
2005-03-03 14:27:59 +00:00
Douglas Gregor 6bf503fa56 Initial version
[SVN r27536]
2005-03-03 14:06:42 +00:00
Douglas Gregor e88397d209 PageRank for Python
[SVN r27535]
2005-03-03 14:05:12 +00:00
Douglas Gregor cdc7c6fcc8 Build bgl extension module
[SVN r27534]
2005-03-03 13:53:43 +00:00
Douglas Gregor 5754d6d866 Fix directed/undirected checks
[SVN r27531]
2005-03-01 22:52:26 +00:00
Douglas Gregor b9f793cefd Fix a typo
[SVN r27530]
2005-03-01 19:15:05 +00:00
Douglas Gregor 4ebce62921 More qualification to protect against accidentally getting boost::bind instead of phoenix::bind
[SVN r27529]
2005-03-01 19:12:22 +00:00
Douglas Gregor 03368b302f Trivial rearrangement to work around an Apple GCC Bug
[SVN r27528]
2005-03-01 19:11:46 +00:00
Rene Rivera 3390d77e28 Apply typo fixes from Julio M. Merino Vidal
[SVN r27513]
2005-02-27 17:28:24 +00:00
Douglas Gregor c0783b62c0 DFS-based biconnected components, from Janusz Piwowarski
[SVN r27442]
2005-02-20 01:08:11 +00:00
Douglas Gregor 85daa2c5c6 Proofreading fixes from Rich Morin
[SVN r27427]
2005-02-19 16:00:56 +00:00
Douglas Gregor 429f5c9d25 Fix a typo
[SVN r27418]
2005-02-18 15:36:53 +00:00
Douglas Gregor c154f4ff95 Joel is da MAN
[SVN r27298]
2005-02-10 04:14:42 +00:00
Douglas Gregor 1f33664599 Broken example...
[SVN r27276]
2005-02-09 15:26:07 +00:00
Douglas Gregor cc462f60ec write_graphviz supports dynamic_properties now
[SVN r27275]
2005-02-09 15:24:49 +00:00
Douglas Gregor 4864d12d0c New GraphViz example
[SVN r27274]
2005-02-09 15:05:58 +00:00
Douglas Gregor 121f9b26c3 Fix handling of double-quoted property values
[SVN r27256]
2005-02-08 21:04:24 +00:00
Douglas Gregor 414d9cfeee Use minimal test tools
[SVN r27251]
2005-02-08 19:11:20 +00:00
Douglas Gregor a6f984b406 Add Ron Garcia's new GraphViz parser.
[SVN r27250]
2005-02-08 18:58:24 +00:00
Douglas Gregor b02d2011a8 Fix clear
[SVN r27242]
2005-02-08 15:59:42 +00:00
Douglas Gregor 60e424c882 Permit empty attribute lists
[SVN r27241]
2005-02-08 14:52:29 +00:00
Stefan Slapeta 81703b0fb5 fixed some minor issues
[SVN r27240]
2005-02-08 12:46:40 +00:00
Stefan Slapeta 534b3efa0a replaced BOOST_TEST
[SVN r27239]
2005-02-08 12:33:07 +00:00
Stefan Slapeta 500be67439 Replaced BOOST_TEST
[SVN r27050]
2005-02-03 12:27:14 +00:00
Douglas Gregor bbd352bd57 Give queue a swap()
[SVN r27043]
2005-02-02 18:59:11 +00:00
Douglas Gregor 558b1a2fef Always include algorithm header, for swap
[SVN r26939]
2005-01-30 17:14:46 +00:00
Douglas Gregor 216a5a7f12 Do not use atoi, atof
[SVN r26938]
2005-01-30 17:12:45 +00:00
Douglas Gregor 7fecf688bc Reduce reliance on test lib
[SVN r26894]
2005-01-28 08:08:18 +00:00
Douglas Gregor ef5fdd8cc6 Document some known problems
[SVN r26892]
2005-01-28 07:44:25 +00:00
Douglas Gregor bc931e3286 Remove extra template parameters
[SVN r26887]
2005-01-28 07:06:18 +00:00
Douglas Gregor 48d9ef8f54 Deal with min/max issues on Windows
[SVN r26797]
2005-01-21 22:47:58 +00:00
Douglas Gregor 0dc01eca8c Do not use log2, which is C99-only
[SVN r26765]
2005-01-20 21:21:44 +00:00
Douglas Gregor 111151a177 Add umlaut
[SVN r26764]
2005-01-20 20:53:58 +00:00
Douglas Gregor 56bfe6f4b7 Fix node movement for weighted graphs and update documentation
[SVN r26763]
2005-01-20 20:52:46 +00:00
Douglas Gregor 01f0eb9ad3 Fixes from François Dumont
[SVN r26693]
2005-01-14 05:33:42 +00:00
Douglas Gregor 02635807ce Added contains() method to check if a heap contains a certain element
[SVN r26625]
2005-01-04 15:17:40 +00:00
Douglas Gregor 2ffc396f29 boost/pending/relaxed_heap.hpp:
- Relaxed heap data structure implementation

boost/graph/dijkstra_shortest_paths.hpp:
  - Use relaxed heap, with a debugging option allowing one to use the binary
    heap instead

libs/graph/test/relaxed_heap_test.cpp:
  - Comprehensive test of the relaxed heap

libs/graph/test/dijkstra_heap_performance.cpp:
  - Test the performance of the relaxed heap against the binary heap via
    Erdos-Renyi graphs.

libs/graph/test/Jamfile:
  - Introduce tests of relaxed heap

libs/graph/doc/dijkstra_shortest_paths.html:
  - Updated complexity to O(V log V), finally!
  - Cite relaxed heaps paper

libs/graph/doc/bibliography.html:
  - Added relaxed heap reference

index.htm, libs/graph/doc/history.html:
  - Announce introduction of relaxed heap


[SVN r26623]
2005-01-04 14:34:45 +00:00
Douglas Gregor 77ff4c53b8 Fixes for x86 Solaris
[SVN r26622]
2005-01-04 14:20:02 +00:00
Douglas Gregor f2a49988ce Work around bug in GCC 2.95.3 standard library
[SVN r26604]
2004-12-29 16:53:05 +00:00
Douglas Gregor 867851b81f Try to work around GCC 2.95.3 issue with min
[SVN r26603]
2004-12-29 16:41:15 +00:00
Douglas Gregor 5c155ac7a5 Blindly try to work around a CW bug
[SVN r26602]
2004-12-29 16:36:56 +00:00
Douglas Gregor bec9d1c8df Switch random generator to minstd_rand
[SVN r26569]
2004-12-21 20:17:18 +00:00
Douglas Gregor bf9af6d93a Gursoy-Atun layout
[SVN r26567]
2004-12-21 19:59:37 +00:00
Douglas Gregor e92cb8cf50 Better describe the result of add_edge
[SVN r26565]
2004-12-21 16:21:38 +00:00
Douglas Gregor 5b13bec33a Deal with stupid compilers that have min and max macros
[SVN r26564]
2004-12-21 13:48:29 +00:00
Victor A. Wagner Jr. 65f8821e60 Changed - all the \r only to \r\n on windows. CVS should get things all fixed up now
[SVN r26561]
2004-12-20 22:43:49 +00:00
Douglas Gregor dff6200ce2 Make num_edges/num_vertices behavior much more explicit
[SVN r26554]
2004-12-20 15:40:35 +00:00
Douglas Gregor 1d39ccd924 Deal with max when it is a macro
[SVN r26551]
2004-12-20 04:57:04 +00:00
Douglas Gregor 28a1a88128 Bibliography entry for sequential_vertex_coloring
[SVN r26535]
2004-12-16 21:54:19 +00:00
Douglas Gregor 610cecce12 Work around issue with get() and GCC 3.4.3
[SVN r26534]
2004-12-16 16:50:52 +00:00
Douglas Gregor 5604226901 Fixed, documented, and tested sequential_vertex_coloring
[SVN r26533]
2004-12-16 15:50:31 +00:00
Douglas Gregor f27670da66 Move remove_directed_edge_dispatch up, thanks to Jurgen Hunold
[SVN r26529]
2004-12-16 14:03:02 +00:00
Vladimir Prus fc3c19c664 Fix a typo
[SVN r26527]
2004-12-16 12:59:56 +00:00
Douglas Gregor 6b12a2813a Deal with min/max appropriately
[SVN r26520]
2004-12-15 21:57:13 +00:00
Douglas Gregor ba2a9304e8 Don't include sys/time.h
[SVN r26519]
2004-12-15 21:41:43 +00:00
Douglas Gregor a6d2c98a5f Add support for vertex_id parameter to write_graphviz
[SVN r26517]
2004-12-15 20:57:35 +00:00
Douglas Gregor 4ce0965553 Add Hyperworx platform
[SVN r26516]
2004-12-15 20:32:47 +00:00
Douglas Gregor eae6dc4a8e - Fixed remove_out_edge_if for undirected graphs.
- Make in_degree work for undirected graphs


[SVN r26515]
2004-12-15 20:32:23 +00:00
Ronald Garcia 6a4cc8e537 missing close tag for betweenness_centrality link.
[SVN r26499]
2004-12-14 14:49:49 +00:00
Douglas Gregor f1278dca9f Rearrange detail namespace to get rid of order dependencies in function lookup, I hope
[SVN r26441]
2004-12-06 04:14:40 +00:00
Douglas Gregor 30ef8f84ff Graphs with zero vertices have zero connected components
[SVN r26403]
2004-12-02 16:32:05 +00:00
Douglas Gregor 604e5a7a45 Minor fixes and better output
[SVN r26402]
2004-12-02 16:29:55 +00:00
Aleksey Gurtovoy 3ec6d263b8 merge RC_1_32_0 tab fixes
[SVN r26327]
2004-11-28 03:27:25 +00:00
Douglas Gregor 48a0aff91d Add type -> const_type conversion to the challenge list
[SVN r26289]
2004-11-25 07:52:43 +00:00
Douglas Gregor a1078197fd Use union_set, not link, in incremental_components
[SVN r26288]
2004-11-25 07:39:21 +00:00
Douglas Gregor 2d2a71f7aa Add missing include
[SVN r26287]
2004-11-25 06:44:10 +00:00
Douglas Gregor f2a278fad5 Fix parallel edge removal bug
[SVN r26286]
2004-11-25 06:33:10 +00:00
Douglas Gregor 945fb8717c Mention change to undirected_dfs
[SVN r26285]
2004-11-24 17:23:47 +00:00
Douglas Gregor 98187feda4 Converted interior properties example to use bundled properties
[SVN r26284]
2004-11-24 17:23:31 +00:00
Douglas Gregor 9dd1992a9d Data-recursive undirected_dfs from Synge Todo
[SVN r26283]
2004-11-24 17:01:22 +00:00
Douglas Gregor 0c82c42f3d Initialize the predecessor map, dummy
[SVN r26232]
2004-11-18 15:51:29 +00:00
Douglas Gregor 9297879774 Fix for edge function provided by Eyal Farago
[SVN r26231]
2004-11-18 15:48:32 +00:00
Douglas Gregor d34fed2e2a Add root_vertex support to Bellman-Ford shortest paths
[SVN r26189]
2004-11-11 19:34:35 +00:00
Douglas Gregor 26e586237e Fix typos
[SVN r26188]
2004-11-11 18:30:05 +00:00
Douglas Gregor f59a9cdb42 Graph is always const
[SVN r26187]
2004-11-11 18:28:29 +00:00
Douglas Gregor 7d1c1f6c8a Close your tags, dummy
[SVN r26186]
2004-11-11 18:25:42 +00:00
Vladimir Prus 25e2a8e1d8 Fix typo
[SVN r26158]
2004-11-09 09:18:27 +00:00
Douglas Gregor 6229d096e5 Mark biconnected components
[SVN r26106]
2004-11-03 16:30:44 +00:00
Douglas Gregor 8c2a5290ad index.htm, libs/graph/doc/table_of_contents.html:
- Document the existence of the biconnected components algorithm

libs/graph/example/biconnected_components.cpp:
  - Clean up the GraphViz output a bit

libs/graph/doc/figs/biconnected.dot, libs/graph/doc/figs/biconnected.png,
libs/graph/doc/biconnected_components.html:
  - Documentation for biconnected components and articulation points

boost/graph/biconnected_components.hpp:
  - Minor type tweaks


[SVN r26105]
2004-11-03 15:40:09 +00:00
Douglas Gregor e7023ea88a boost/graph/biconnected_components.hpp:
- Fixed computation of articulation points

libs/graph/example/biconnected_components.cpp:
  - Remove the second example graph: we only need one for a good example

libs/graph/test/biconnected_components_test.cpp, libs/graph/test/Jamfile:
  - Randomized testcase verifying the biconnected components & articulation
    points computation. Biconnected components aren't thoroughly tested,
    but articulation points are.


[SVN r26094]
2004-11-03 05:02:30 +00:00
Douglas Gregor 6123fb57e9 boost/graph/biconnected_components.hpp:
- Added support for emitting articulation points (they come for free)
  - Eliminated unused parameters in public interface
  - Provided helper overloads that build the lowpt and discovertime property
    maps themselves.
  - Added articulation_points function that computes only articulation points
    (edge components not included)

libs/graph/example/biconnected_components.cpp:
  - Use some of the new overloads
  - Output articulation points as filled circles


[SVN r26091]
2004-11-02 22:34:26 +00:00
Douglas Gregor 5aa64b9cac Minor fixes
[SVN r26024]
2004-10-31 19:55:15 +00:00
Douglas Gregor 17985eaec5 Use appropriate grid cell size
[SVN r25918]
2004-10-28 15:31:42 +00:00
Douglas Gregor 4a11e36f85 Document FR example
[SVN r25904]
2004-10-27 18:22:57 +00:00
Douglas Gregor a07d79a8d3 Document FR example
[SVN r25903]
2004-10-27 18:21:39 +00:00
Douglas Gregor 048d40185d Fruchterman-Reingold layout example
[SVN r25902]
2004-10-27 18:20:11 +00:00
Douglas Gregor 5f9800a0a7 Testcase illustrating a problem with brittle edge indices in bidirectional graphs with EdgeListS=vecS
[SVN r25897]
2004-10-27 16:40:55 +00:00
Douglas Gregor f3ff95bdd8 build instructions
[SVN r25894]
2004-10-27 14:40:24 +00:00
Douglas Gregor 71b302bc49 Merge from graph_devel_1_33_0 branch
[SVN r25893]
2004-10-27 14:38:15 +00:00
Douglas Gregor 63cfb2e00b Perform fast removal of edges in bidirectional graphs
[SVN r25868]
2004-10-26 01:05:11 +00:00
Douglas Gregor 8d219e56bc Fix assignment from *this
[SVN r25820]
2004-10-21 15:52:28 +00:00
Jeremy Siek 9197a1028f added copyrights
[SVN r25810]
2004-10-20 13:20:19 +00:00
Jeremy Siek 4b6effe849 added copyrights
[SVN r25809]
2004-10-20 13:07:46 +00:00
Douglas Gregor f0057aaa80 Fix a typo
[SVN r25740]
2004-10-15 16:02:23 +00:00
Douglas Gregor 6d118a94d0 Correct a typo
[SVN r25739]
2004-10-15 15:37:34 +00:00
Douglas Gregor 2d5dab5647 Remove Floyd-Warshall from the challenge list
[SVN r25736]
2004-10-15 14:45:09 +00:00
Aleksey Gurtovoy 6593010f65 c++boost.gif -> boost.png replacement
[SVN r25573]
2004-10-05 15:45:52 +00:00
Vladimir Prus d3f694525e Remove calls to non-portable isatty function. Not really good idea to
edit generated files, but don't have time for a nicer solution.


[SVN r25567]
2004-10-05 09:53:15 +00:00
Vladimir Prus 77c424a53d Regenerate the parser again, the previous one used to crash on
some graphs.


[SVN r25477]
2004-09-29 14:28:31 +00:00
Douglas Gregor 896c715e35 using namespace boost should work around some issues for MIPSpro
[SVN r25401]
2004-09-25 13:20:24 +00:00
Douglas Gregor 961d3586a7 Fix interior properties link
[SVN r25379]
2004-09-23 20:30:15 +00:00
Joaquín M. López Muñoz 2341889e69 taken care of BOOST_NO_STDC_NAMESPACE
[SVN r25294]
2004-09-21 09:58:24 +00:00
Douglas Gregor 3b9071cf27 Stupid limits include
[SVN r25159]
2004-09-16 19:58:18 +00:00
Douglas Gregor e7706a3320 Need to have the betweenness centrality test here
[SVN r25158]
2004-09-16 19:57:58 +00:00
Douglas Gregor 0b782a2f7f Work around the lack of a <limits> header
[SVN r25091]
2004-09-14 21:28:18 +00:00
Douglas Gregor 6c7a79387a Work around VC library bug
[SVN r25089]
2004-09-14 21:23:36 +00:00
Douglas Gregor 264620c744 Try to deal with platforms that don't move sin and cos into namespace std
[SVN r25087]
2004-09-14 21:01:04 +00:00
Douglas Gregor b89568dcc5 Renamed
[SVN r25083]
2004-09-14 12:30:48 +00:00
Douglas Gregor fde46d6ee8 Fix BC include
[SVN r25060]
2004-09-13 18:14:14 +00:00
Douglas Gregor b7d9331f0e Make the Graph library pass inspection
[SVN r25045]
2004-09-13 15:36:39 +00:00
Douglas Gregor 1b13e37ec2 Attempt at IBM xlC workaround
[SVN r25024]
2004-09-13 00:16:35 +00:00
Douglas Gregor 41e4d297e8 Attempt at IBM xlC workaround
[SVN r25023]
2004-09-13 00:16:03 +00:00
Douglas Gregor d84342b076 Fix a silly typo
[SVN r24873]
2004-09-02 14:59:32 +00:00
Douglas Gregor 95eeae244b Various fixes for vc7 and Linux
[SVN r24853]
2004-09-01 16:35:57 +00:00
Douglas Gregor ed11fbce92 VC7 can handle member templates; let it
[SVN r24723]
2004-08-24 22:01:04 +00:00
Douglas Gregor e6c0a0b36e Use boost::optional to avoid copying singular iterators
[SVN r24721]
2004-08-24 22:00:33 +00:00
Douglas Gregor ce9e9e0d89 Fix a bunch of little bugs
[SVN r24720]
2004-08-24 21:40:31 +00:00
Douglas Gregor 103a676163 Show output for layout test
[SVN r24719]
2004-08-24 20:33:51 +00:00
John Maddock 0f54780d9b Converted files to the BSL.
[SVN r24614]
2004-08-20 11:10:24 +00:00
Douglas Gregor 5e84be1a7d boost/graph/kamada_kawai_spring_layout.hpp:
- Use T, not double, in layout_tolerance
  - Make layout_tolerance use _relative_ tolerances, only
  - Make default tolerance 0.001, which returns some pleasing graphs

libs/graph/doc/layout_tolerance.html:
  - Document changes


[SVN r24608]
2004-08-19 21:50:19 +00:00
Douglas Gregor 455dae4bfe Test for disconnected graphs and document the change
[SVN r24541]
2004-08-17 21:53:49 +00:00
Douglas Gregor 667f926d1c Really, don't use fabs
[SVN r24540]
2004-08-17 21:33:07 +00:00
Douglas Gregor 46e2920f70 Fix silly error pointed out by Gordon Smith
[SVN r24537]
2004-08-17 20:46:38 +00:00
Douglas Gregor f2a534bf12 Don't use fabs
[SVN r24505]
2004-08-16 14:12:14 +00:00
Douglas Gregor 3082cb5195 Add copyright/license
[SVN r24503]
2004-08-16 13:59:51 +00:00
Douglas Gregor 83ed711d3c Whackin' a few buglets
[SVN r24451]
2004-08-13 02:53:11 +00:00
Douglas Gregor e0356c30ca Moved to BSL
[SVN r24450]
2004-08-12 19:12:28 +00:00
Jeremy Siek 10008230eb changed the test to use Q.update(u) and to use indirect comparison
[SVN r24422]
2004-08-11 20:00:20 +00:00
Jeremy Siek d32278ed01 fixed bug, p == nil() instead of p != nil() in update
[SVN r24421]
2004-08-11 19:56:32 +00:00
Douglas Gregor 0b137f41e2 Fixed some minor errors, but it is still broken
[SVN r24415]
2004-08-11 17:02:09 +00:00
Douglas Gregor 836a69685b Merged the well-tested algorithms on the graph_devel branch to trunk
[SVN r24414]
2004-08-11 15:30:20 +00:00
Jeremy Siek 5de49c9ea3 added a copyright
[SVN r24393]
2004-08-10 18:44:34 +00:00
Douglas Gregor 6965fc78ba Ported to LEDA 4.5
[SVN r24302]
2004-08-05 13:38:36 +00:00
Douglas Gregor d1be6c2495 boost/graph/leda_graph.hpp:
- Ported to new iterator adaptors (actually, iterator_facade)
  - Ported to LEDA 4.5

libs/graph/example/leda-concept-check.cpp, libs/graph/example/leda-graph-eg.cpp
  - Ported to LEDA 4.5


[SVN r24301]
2004-08-05 13:37:22 +00:00
Douglas Gregor e4461f93d5 Qualify make_pair calls
[SVN r24265]
2004-08-03 10:50:26 +00:00
Douglas Gregor d017d8e9e7 Converted to Boost Software License, Version 1.0
[SVN r24096]
2004-07-27 03:43:34 +00:00
Douglas Gregor 34fefcd0f6 Converted to Boost Software License, Version 1.0
[SVN r24055]
2004-07-26 00:32:12 +00:00
Douglas Gregor 008a8c7168 johnson_all_pairs_shortest.hpp: When writing into the distance map, we need
to subtract one from the index in graph g2, which has an extra vertex "s" at
the beginning. Amazing how long this bug persisted...


[SVN r24044]
2004-07-25 17:25:54 +00:00
Rene Rivera db84792f9f Remove tabs in file.
[SVN r24043]
2004-07-25 17:12:17 +00:00
Rene Rivera f3d206f725 Remove tabs in file.
[SVN r24041]
2004-07-25 16:10:20 +00:00
Douglas Gregor 656b0ce32d Doug Gregor->Douglas Gregor
[SVN r24018]
2004-07-25 02:59:30 +00:00
Douglas Gregor 905969f542 Doug Gregor -> Douglas Gregor
[SVN r24016]
2004-07-25 02:29:29 +00:00
Douglas Gregor c3cddc3b96 size should return a size_type
[SVN r23959]
2004-07-22 15:16:38 +00:00
Jeremy Siek b1239433ae made explicit the time complexity requirement for edge
[SVN r23919]
2004-07-21 22:09:06 +00:00
Vladimir Prus 598c2d2478 Do not copy default-constructed interator, which might be signular.
[SVN r23841]
2004-07-20 13:25:48 +00:00
Guillaume Melquiond 145474f398 finally corrected the iterator so that it stops at end of the adjacency matrix, also corrected the get_edge behavior between const and non-const matrix
[SVN r23808]
2004-07-19 20:11:43 +00:00
Douglas Gregor d4125b58f9 Use Boost.Test
[SVN r23800]
2004-07-19 15:54:50 +00:00
Vladimir Prus 4adbd15346 More V2 Jamfile tweaks.
[SVN r23764]
2004-07-19 07:12:45 +00:00
Guillaume Melquiond 29f3336462 return u-1 edges (rather than a random number) for undirected adjacency matrices
[SVN r23694]
2004-07-17 15:46:38 +00:00
Guillaume Melquiond dd45b3d00f avoid dereferencing an end iterator
[SVN r23692]
2004-07-17 15:34:09 +00:00
Jeremy Siek d91f3ba421 changed to use bundled properties
[SVN r23553]
2004-07-14 16:22:33 +00:00
Jeremy Siek f8d6dccdf8 changed to bundled properties
[SVN r23552]
2004-07-14 16:18:38 +00:00
Jeremy Siek faaf1fdac9 changed to use bundled properties
[SVN r23551]
2004-07-14 16:13:49 +00:00
Jeremy Siek 96784e037d changed to use bundled properties
[SVN r23548]
2004-07-14 15:47:50 +00:00
Douglas Gregor e0435ccc26 dijkstra_shortest_paths.hpp: Fix no_init version invocation(Jürgen Hunold)
[SVN r23346]
2004-07-05 15:41:47 +00:00
Eric Niebler 7b66953776 move BOOST_USING_STD_MIN and _MAX and BOOST_PREVENT_MACRO_SUBSTITUTION to the config headers, remove boost/minmax.hpp, update coding guidelines
[SVN r23313]
2004-07-02 01:21:32 +00:00
Douglas Gregor 778835199f filtered_graph.hpp:
- Workaround for IBM Visual Age C++ 6.0 (Matthias Troyer)


[SVN r23303]
2004-07-01 14:46:02 +00:00
Douglas Gregor 220b44fe17 Need to include iostream to use cout
[SVN r23302]
2004-07-01 14:25:20 +00:00
Jeremy Siek 11ba494e4c new file, showing the use of get_property
[SVN r23290]
2004-06-30 16:57:10 +00:00
Jeremy Siek cfc41552e7 removed inf parameter for the no_init version of Dijkstra's
[SVN r23289]
2004-06-30 16:18:43 +00:00
Jeremy Siek 00a2844d66 fixed bug in remove_edge(e, g) for bidirectional graphs.
The problem was that the edge property was not removed from the edge list


[SVN r23288]
2004-06-30 16:09:17 +00:00
Jeremy Siek 4c469946fe added a second test with no properties
[SVN r23287]
2004-06-30 16:08:33 +00:00
Jeremy Siek 10b91f71d1 bug in bidirectional graph remove_edge(e, g)
[SVN r23286]
2004-06-30 15:48:20 +00:00
Douglas Gregor 51d60f9b43 libs/graph/test/edge_list_cc.cpp: Specify all parameters, for VC7 support
libs/graph/test/isomorphism.cpp: Deal with atoi/atof missing from std::
boost/graph//adjacency_matrix.hpp: deal with missing allocator<T>::rebind
boost/graph/graph_test.hpp: Remove unusable default constructor (workaround)
boost/graph/vector_as_graph.hpp: When we say remove, we mean std::remove
status/explicit-failures-markup.xml: mark everything I can't or won't fix


[SVN r23237]
2004-06-29 02:30:29 +00:00
Douglas Gregor cbfc6ec8ed Don't use std::atoi and std::atof directly
[SVN r23217]
2004-06-27 21:06:37 +00:00
Douglas Gregor 73ad3cb092 adjacency_list.hpp:
- Add some more qualification to help VC7 along...


[SVN r23215]
2004-06-27 19:15:55 +00:00
Douglas Gregor eedac55a7d Need to include <cctype> to get std::isspace
[SVN r23214]
2004-06-27 19:01:09 +00:00
Douglas Gregor 34f46c045a graph_test.hpp:
- Change the mysterious x's to v's.
  - Get the constness of the Graphs correct for
    test_readable_vertex_property_graph.


[SVN r23211]
2004-06-27 18:35:37 +00:00
Douglas Gregor 9d467c8df1 properties.hpp:
- Use is_convertible inside is_vertex_bundle. We lose some checking in
    pathological cases, but it's not worth the effort.


[SVN r23172]
2004-06-23 20:55:31 +00:00
Douglas Gregor 9613d2dd8c Disable bundled properties for EDG 2.38, which can't seem to handle
is_vertex_bundle.


[SVN r23171]
2004-06-23 16:49:55 +00:00
Eric Niebler e3dd9042b1 remove std_min and std_max, update minmax coding guidelines
[SVN r23162]
2004-06-23 04:49:48 +00:00
Douglas Gregor cf24fa4ca0 Fix a silly typo
[SVN r23129]
2004-06-20 22:15:40 +00:00
Douglas Gregor 23b3545c8d Overall: Second, more complete and better tested version of bundled properties.
The ->* syntax has been removed. Instead, one may use the member pointer as
the key for the standard get/put functions of property maps. This makes
graph adaptors work with bundled properties (automagically). Also added
support for bundled properties in adjacency_matrix.

index.htm: Announce the addition of bundled properties.

boost/graph/adjacency_list.hpp: Updated to support get/put for bundled
properties.

boost/graph/adjacency_matrix.hpp: Added support for bundled properties.
Suppressed some warnings and fixed a minor bug in add_edge(u, v, ep, g).

boost/graph/properties.hpp: Added property_map specialization for bundled
properties.

libs/graph/doc/*.html: Document uses of bundled properties and direct anyone
not using a broken compiler to bundled properties instead of property lists.

libs/graph/test/bundled_properties.cpp: Test both adjacency_list and
adjacency_matrix, along with filtered_graph. Makes sure all of the bundled
properties operations work.


[SVN r23125]
2004-06-20 03:37:09 +00:00
Douglas Gregor c5b4dccdf4 Directed adjacency_lists don't model Adjacency Matrix
[SVN r23121]
2004-06-18 20:05:11 +00:00
Douglas Gregor 5bc28643d3 Graph concept doesn't include num_vertices or num_edges functions
[SVN r23120]
2004-06-18 16:05:11 +00:00
Douglas Gregor 59d480bd8d Synchronize example description with example code
[SVN r23114]
2004-06-17 15:46:38 +00:00
Vladimir Prus e8d775f806 Update
[SVN r23087]
2004-06-11 11:38:37 +00:00
Douglas Gregor f68d704b60 pending/property.hpp: retag_property_list just shouldn't exist for compilers without partial specialization.
graph/adjacency_list.hpp: Totally turn off bundling for VC++ < 7.1


[SVN r22889]
2004-05-21 16:54:20 +00:00
Douglas Gregor 31b1be9154 adjacency_list.hpp: Work around VC++ 7.1 bug where the compiler thinks that a typedef in a template won't be a class type.
[SVN r22880]
2004-05-21 02:27:56 +00:00
Douglas Gregor ce8344e9ad Overall: introduce bundled properties
index.htm:
  - Announce bundled properties

libs/graph/doc/bundles.html:
  - Document bundled properties

libs/graph/doc/adjacency_list.html:
  - Refer to bundled properties

boost/graph/properties.hpp:
  - Added vertex_bundle and edge_bundle properties for bundling
  - Added bundle_property_map for directly handling bundles

boost/pending/property.hpp:
  - Added retag_property_list metafunction that allows us to add a tag
    to the non-property<> element at the end of a property<> list.

boost/graph/adjacency_list.hpp:
  - Implement bundled properties

libs/graph/test/Jamfile, libs/graph/test/bundled_properties.cpp:
  - Test bundled properties


[SVN r22819]
2004-05-14 05:53:33 +00:00
Douglas Gregor 89476c57dd reverse_graph.hpp: Add null_vertex() to traits
[SVN r22818]
2004-05-14 05:41:53 +00:00
Douglas Gregor 20548378ed graphviz.hpp: Fix output of vertex descriptors for edges
(Mark Purtill  <mpurtill@softwarerevolution.com>)


[SVN r22767]
2004-05-08 16:00:24 +00:00
Jeremy Siek bd8397897e changed the download URL for boost
[SVN r22753]
2004-05-06 21:00:38 +00:00
Jeremy Siek 16cc6fed3c added inv_adjacent_vertices
[SVN r22726]
2004-05-03 20:03:17 +00:00
Jeremy Siek 5e09a7498b added List of BGL Users
[SVN r22664]
2004-04-18 20:46:55 +00:00
Jeremy Siek 6a9e86bb5c added url for KGraph
[SVN r22663]
2004-04-18 20:45:55 +00:00
Jeremy Siek bd938c930f new file
[SVN r22662]
2004-04-18 20:42:32 +00:00
Vladimir Prus edf7ef8641 Subgraph tweaks.
- copy m_global_edge member in copy constructor
- add BOOST_STATIC_ASSERT for (hopefully) better error reporting when
  user forgot to provide edge_index property.


[SVN r22635]
2004-04-15 07:26:57 +00:00
Jeremy Siek b4a9b406c2 changed the concept check for Distance Matrix, and changed to
use vertex index to lookup into the distance matrix


[SVN r22601]
2004-04-04 18:02:00 +00:00
Jeremy Siek 1ef454e8c1 changed vertex_descriptor to vertices_size_type for Distance Matrix
[SVN r22600]
2004-04-04 18:01:16 +00:00
Jeremy Siek 844a2019a9 changed to use get() for accessing w1
[SVN r22599]
2004-04-04 17:32:26 +00:00
Jeremy Siek d965824092 Fixed bug in is_flow() caught by Arun Bhalla.
[SVN r22598]
2004-04-04 13:55:26 +00:00
Jeremy Siek cb1091cae1 filled out documentation
[SVN r22580]
2004-04-02 14:53:15 +00:00
Jeremy Siek 9ae3a8d6d2 added "Where Defined"
[SVN r22577]
2004-04-01 14:04:50 +00:00
Jeremy Siek 1a95b1fff0 fixed remove_edge for bidirectional graphs
[SVN r22576]
2004-04-01 01:30:44 +00:00
Vladimir Prus b6c9531d22 HMTL-encode < and >
[SVN r22572]
2004-03-31 12:40:13 +00:00
Vladimir Prus a9e4a158fe Fix typo
[SVN r22563]
2004-03-29 10:40:32 +00:00
Vladimir Prus ff0ea074ab Add 'null_vertex' support to subgraph.
[SVN r22558]
2004-03-26 16:35:19 +00:00
Vladimir Prus 91b24b6363 An attempt to unbreak vc6.
[SVN r22557]
2004-03-26 16:25:08 +00:00
Vladimir Prus 24403e3f19 Fix build problems with different bison versions.
[SVN r22540]
2004-03-22 06:31:24 +00:00
Jeremy Siek 3ada410bc9 fixed issue about vertices in G^T
[SVN r22538]
2004-03-21 23:32:33 +00:00
Jeremy Siek 2a1889d012 fixed typo
[SVN r22515]
2004-03-17 17:36:31 +00:00
Jeremy Siek 21d9026dbb fixed num_edges() to work with undirected graphs, and also to be O(1)
[SVN r22514]
2004-03-17 17:21:31 +00:00
Jeremy Siek b3cb4f8037 fixed Reference type for inv_adjacency_iterator
[SVN r22480]
2004-03-11 13:39:42 +00:00
Jeremy Siek 279466a85d new file
[SVN r22475]
2004-03-10 13:55:57 +00:00
Jeremy Siek e70fc391b8 fixed the constructor
[SVN r22474]
2004-03-10 13:53:26 +00:00
Jeremy Siek 687befe638 added defaults to inv_adjacency_iterator_generator
[SVN r22473]
2004-03-10 13:52:09 +00:00
Jeremy Siek 32497ce2a2 fixed inv_adjacency_iterator
[SVN r22472]
2004-03-10 13:46:17 +00:00
Eric Niebler d1b0ceea22 remove minmax hack from win32.hpp and fix all places that could be affected by the minmax macros
[SVN r22394]
2004-02-26 18:27:02 +00:00
Jeremy Siek e29266e8a5 removed redundant initialization of member c
[SVN r22264]
2004-02-15 15:50:03 +00:00
Jeremy Siek 3c641d4ec2 EdgeList -> OutEdgeList
[SVN r22240]
2004-02-11 16:12:31 +00:00
Jeremy Siek 04d0248a5a changed vecS to listS for default of EdgeList
[SVN r22239]
2004-02-11 16:07:54 +00:00
Jeremy Siek 02ab786074 added #include <boost/graph/graph_utility.hpp>
[SVN r22231]
2004-02-09 18:45:50 +00:00
Jeremy Siek 17fd766fa5 moved SGB and LEDA stuff to the end
[SVN r22230]
2004-02-09 18:43:01 +00:00
Jeremy Siek de777b9164 added #include <iostream>
[SVN r22229]
2004-02-09 18:39:36 +00:00
Jeremy Siek 1825798f2a added #include <fstream>
[SVN r22228]
2004-02-09 18:37:33 +00:00
Jeremy Siek 508526c98d added #include <boost/graph/graph_utility.hpp>
[SVN r22227]
2004-02-09 18:36:59 +00:00
Jeremy Siek 550aa7d162 fixed size type issues
[SVN r22226]
2004-02-09 18:35:04 +00:00
Jeremy Siek 7a9d91ec88 fixed subgraph_local_property_map::operator[]
m_g -> *m_g


[SVN r22225]
2004-02-09 18:29:31 +00:00
Jeremy Siek b9b9aa5782 removed unused variable
[SVN r22224]
2004-02-09 18:27:27 +00:00
Jeremy Siek d45205e37d int -> size_type
[SVN r22223]
2004-02-09 18:25:32 +00:00
Jeremy Siek d4e507bab8 fixed bug with regards to in_edge_list for undirected graphs
[SVN r22222]
2004-02-09 18:21:05 +00:00
Jeremy Siek 9b53c7b81b changed order of initialization to avoid warnings
[SVN r22221]
2004-02-09 18:17:59 +00:00
Jeremy Siek 30d756a5f6 changed type of u1 and u2 in edge_cmp from vertex1_t to int so that they match the return type of dfs_num[...]
[SVN r22220]
2004-02-09 18:12:00 +00:00
Jeremy Siek e40de5b395 added #include <boost/graph/graph_utility.hpp>
[SVN r22219]
2004-02-09 17:50:41 +00:00
Jeremy Siek 206c17b1e2 added #include <iostream>
[SVN r22218]
2004-02-09 17:01:30 +00:00
Jeremy Siek 6a70bb518f added #include <boost/graph/graph_utility.hpp>
[SVN r22217]
2004-02-09 16:59:26 +00:00
Jeremy Siek 66aa8548f7 added #include <iostream> // needed by graph_utility. -Jeremy
[SVN r22216]
2004-02-09 16:55:51 +00:00
Jeremy Siek a5c6b3d272 added #include <boost/graph/graph_utility.hpp>
[SVN r22215]
2004-02-09 16:52:10 +00:00
Jeremy Siek 60004ef651 added #include <iostream>
[SVN r22214]
2004-02-09 16:49:36 +00:00
Jeremy Siek 0e14818262 changed std::queue to boost::queue
[SVN r22213]
2004-02-09 16:45:42 +00:00
Jeremy Siek 542bf4520b added #include for graph_utility.hpp
[SVN r22212]
2004-02-09 16:38:20 +00:00
Jeremy Siek 5133c85054 fixed bug in get_property, changed -> to .
[SVN r22211]
2004-02-09 16:29:53 +00:00
Jeremy Siek abf4ba7df9 removed unused variable
[SVN r22210]
2004-02-09 16:26:31 +00:00
Jeremy Siek 2cebf15b79 moved the implementation of
bidirectional_graph_helper_with_property::remove_edge
into the class definition to avoid VC++ bug.


[SVN r22189]
2004-02-06 21:39:42 +00:00
Jeremy Siek 3390833f0c new file
[SVN r22179]
2004-02-05 20:48:46 +00:00
Jeremy Siek 12feb5896f added more :'s
[SVN r22178]
2004-02-05 20:48:30 +00:00
Jeremy Siek 71a7b595ad added adjacency_matrix_test
[SVN r22177]
2004-02-05 20:47:49 +00:00
Jeremy Siek b5ded5174e fixed bug in undirected out edge iterator, missing initialization of m_inc
[SVN r22176]
2004-02-05 20:20:55 +00:00
Jeremy Siek 2044110d76 added subgraph_properties.cpp
[SVN r22152]
2004-02-03 14:12:10 +00:00
Jeremy Siek 4110bf69a1 new example
[SVN r22151]
2004-02-03 14:11:56 +00:00
Jeremy Siek 60f612a532 Fixed bug in properties. Global and local properties were not shared,
but they are suppose to be. The problem was that I was using the property
map from the local subgraphs instead of from the global graph.


[SVN r22150]
2004-02-03 14:10:39 +00:00
Jeremy Siek 05888905a8 decreasing running time
[SVN r22139]
2004-02-02 16:17:34 +00:00
Jeremy Siek d755f8f5c3 changed iterator to const_iterator
[SVN r22136]
2004-02-02 14:25:51 +00:00
Jeremy Siek f7fa2e2942 changed to mutable iterator, to match return type of std::set::find, just
in case the std implementation does not provide constant to mutable
iterator conversions for std::set.


[SVN r22081]
2004-01-30 14:29:52 +00:00
Jeremy Siek ad20c88c20 changed back to using std::set::find instead of std::find in edge_dispatch
[SVN r22080]
2004-01-30 14:27:32 +00:00
Jeremy Siek 70a7c5ce02 some edits
[SVN r22055]
2004-01-29 16:27:02 +00:00
Jeremy Siek 8a24790a12 fixed figure reference
[SVN r22036]
2004-01-29 00:42:08 +00:00
Jeremy Siek 697f856843 added -kb
[SVN r22035]
2004-01-29 00:38:05 +00:00
Jeremy Siek 1ad3a206d0 changing to binary
[SVN r22033]
2004-01-29 00:36:50 +00:00
Jeremy Siek 26ccf90eb1 fixed figure reference
[SVN r22030]
2004-01-29 00:25:19 +00:00
Vladimir Prus a11e93caa4 Fix (or rather workaround) the bug which caused second reading
of graphviz file to fail. Looks like the parser is not reenterant.

Patch from anynymous user.


[SVN r21951]
2004-01-26 09:16:16 +00:00
Vladimir Prus 547cd77748 Regenerated bison/flex output.
[SVN r21950]
2004-01-26 09:08:02 +00:00
Vladimir Prus df87cf35fc Clean graphviz parser build a little bit. Include parser files generated
by corresponding bison invocation.

Patch from anonymous user.


[SVN r21949]
2004-01-26 08:58:43 +00:00
Vladimir Prus 9e39cceb5a Remove unused files.
[SVN r21948]
2004-01-26 08:45:57 +00:00
Vladimir Prus 315d6e4196 Remove unneeded files
[SVN r21947]
2004-01-26 08:29:41 +00:00
Vladimir Prus 57a2bff506 Patch from anonymous user to make Makefile work.
[SVN r21945]
2004-01-26 08:13:22 +00:00
Jeremy Siek 23c981d632 performance bug fix
[SVN r21870]
2004-01-21 20:38:59 +00:00
Jeremy Siek ccd8ecee09 fixed more bugs triggered by the changes in input_iterator_archetype
[SVN r21867]
2004-01-21 19:04:09 +00:00
Jeremy Siek c3ad6d91cf fixed a bug brought to light by the change in input_iterator_archetype
[SVN r21865]
2004-01-21 18:55:16 +00:00
Jeremy Siek fbe0af0831 fixed some bugs due to changes in iterator_adaptor::base()
[SVN r21864]
2004-01-21 18:46:08 +00:00
Vladimir Prus 72df35f1fa Set proper licence.
[SVN r21490]
2004-01-05 06:39:42 +00:00
Rene Rivera abd8f2aa84 Fix tabs in file.
[SVN r21399]
2003-12-26 23:26:49 +00:00
Vladimir Prus 9d583a1a91 Fix property_map_iterator.
Patch from Jurgen Hunold.


[SVN r21398]
2003-12-26 07:13:43 +00:00
Vladimir Prus ffce9c06c9 Add V2 Jamfile.
[SVN r21397]
2003-12-26 07:08:15 +00:00
Douglas Gregor aa9b63ba07 Deal with BOOST_NO_STD_ITERATOR_TRAITS
[SVN r21345]
2003-12-20 01:58:52 +00:00
Douglas Gregor 818dcc73b0 dfs.cpp: Don't use ADL; fixes this test for VC7
[SVN r21344]
2003-12-20 01:41:40 +00:00
Vladimir Prus b6201b1288 Fix typos.
[SVN r21315]
2003-12-18 05:36:17 +00:00
Beman Dawes e0f1e4c036 fix missing std:: plus 3 2-phase name lookup errors on Metrowerks
[SVN r21308]
2003-12-17 19:59:39 +00:00
Douglas Gregor 324d895dd9 transitive_closure.hpp: Use Bind instead of Compose
[SVN r21306]
2003-12-17 17:41:11 +00:00
Vladimir Prus 7f51375fc2 Add BGL to regression tests.
[SVN r21297]
2003-12-17 06:04:09 +00:00
Vladimir Prus 890769706d Don't run tests which require external components by default.
Patch from Jurgen Hunold.


[SVN r21284]
2003-12-16 12:41:39 +00:00
Beman Dawes 0fd24218e9 fix links broken by index.htm to index.html renaming
[SVN r21233]
2003-12-12 00:00:13 +00:00
Vladimir Prus 42a08f3ca5 Adjust for changes in BGL Jamfile
[SVN r21187]
2003-12-09 06:12:27 +00:00
Douglas Gregor 278ba5a845 Link to sloan_ordering.htm
[SVN r21067]
2003-12-02 06:31:32 +00:00
Douglas Gregor decc08bb0e Patch up Graph library so that it is (almost) clean w.r.t. Beman's
inspection script


[SVN r21066]
2003-12-02 06:28:12 +00:00
Vladimir Prus 33913b20ea Account for the fact that ostream is not template, and basic_ostream
should be used instread. Have no idea how it worked before.


[SVN r20976]
2003-11-27 16:10:09 +00:00
Jeremy Siek 811cf59a54 moving to sandbox
[SVN r20941]
2003-11-24 19:31:35 +00:00
Dave Abrahams 40644bc5ed Removed access category tags from iterator library, made corresponding
changes elsewhere.

boost/iterator and libs/iterator/test were updated from
branch "simplify"


[SVN r20905]
2003-11-22 01:18:37 +00:00
Jeremy Siek 40e3b28909 more fixes to the test
[SVN r20576]
2003-10-31 07:26:52 +00:00
Vladimir Prus 924e1b1d9a Removed tabs
[SVN r20572]
2003-10-31 06:49:23 +00:00
Jeremy Siek e60f34fca2 tightened up the test
[SVN r20570]
2003-10-31 01:30:35 +00:00
Jeremy Siek 07fe2aafa3 untabify
[SVN r20569]
2003-10-31 01:30:10 +00:00
Jeremy Siek 276e86d0a6 added an edge(u,v,g) function
[SVN r20556]
2003-10-29 23:40:45 +00:00
Jeremy Siek d11130909b fix from Volodya
[SVN r20553]
2003-10-29 21:10:45 +00:00
Jeremy Siek 668d9c7599 added second part of iff test in check_transitive_closure
[SVN r20552]
2003-10-29 21:10:02 +00:00
Vladimir Prus 0658669b79 Make it work on Borland.
Patch from Hugo Duncan.


[SVN r20473]
2003-10-24 11:35:04 +00:00
Jeremy Siek 291b56aba0 spell check
[SVN r20427]
2003-10-20 15:48:37 +00:00
Jeremy Siek b21c4393ae updated to match example from the book
[SVN r20426]
2003-10-20 15:45:43 +00:00
Jeremy Siek e7a047c5b1 updates to sync with the BGL book
[SVN r20425]
2003-10-20 15:18:32 +00:00
Jeremy Siek 196baddc84 kevin_bacon.dat -> kevin-bacon.dat
[SVN r20383]
2003-10-14 22:14:53 +00:00
Jeremy Siek 6bd9634bda changed name
[SVN r20382]
2003-10-14 22:08:52 +00:00
Vladimir Prus 8febef8989 Update for <implicit-dependency> addition in Boost.Build.
[SVN r20287]
2003-10-07 15:13:50 +00:00
Jeremy Siek a8a1df5ff2 fixed the fix to source and target for filtered_graph
[SVN r20265]
2003-10-06 17:27:45 +00:00
Jeremy Siek 63a8ee23c5 changes to make vector_as_graph and filtered_graph work together
[SVN r20196]
2003-09-26 22:15:23 +00:00
Jeremy Siek 5a1526cc3b added filtered_vec_as_graph
[SVN r20195]
2003-09-26 22:13:21 +00:00
Jeremy Siek 5b84611a39 new file
[SVN r20194]
2003-09-26 22:12:27 +00:00
Dave Abrahams 7fbc23e3dd Use the import rule
[SVN r19968]
2003-09-08 17:38:49 +00:00
Vladimir Prus b39891a708 Fix typo. Thanks to Janusz Piwowarski.
[SVN r19890]
2003-09-01 05:41:55 +00:00
Vladimir Prus 3577a626b0 Rename *y and *l to *yy and *ll so that V2 knows to compile output with
C++ compiler, not with C one, which fails.


[SVN r19848]
2003-08-29 07:02:59 +00:00
Douglas Gregor a5abf00cc7 Make the default TerminatorFunc nontruth2 instead of truth2, because we need
it to return false (i.e., don't abort) all the time, not true (which aborts
early).


[SVN r19839]
2003-08-28 16:34:20 +00:00
Vladimir Prus 121bb31837 Implement depth_first_visit variant which allows to stop the search at
certain vertices.


[SVN r19827]
2003-08-28 11:49:00 +00:00
Vladimir Prus 49e55bc606 Remove unused code.
Patch from Janusz Piwowarski.


[SVN r19818]
2003-08-28 04:56:32 +00:00
Vladimir Prus fd543d5fae Implement remove_vertex function for vector_as_graph.
Patch from Janusz Piwowarski.


[SVN r19817]
2003-08-28 04:52:10 +00:00
Vladimir Prus f52b93625f Fix compilation warning, reported by Janusz Piwowarski.
[SVN r19795]
2003-08-27 06:40:49 +00:00
Jeremy Siek 87bc680518 class -> struct
[SVN r19679]
2003-08-18 15:50:11 +00:00
Jeremy Siek 49d479632c EdgeList -> OutEdgeList
and then added EdgeList


[SVN r19607]
2003-08-14 19:22:56 +00:00
Jeremy Siek 3c65d754ee fixed mispelling
[SVN r19606]
2003-08-14 19:17:35 +00:00
Jeremy Siek 096c3d9eb2 fixed call to get()
[SVN r19605]
2003-08-14 17:15:02 +00:00
Jeremy Siek 6b3a136853 added stuff about vertex_index internal property
[SVN r19540]
2003-08-12 01:18:08 +00:00
Jeremy Siek c0fde285cd changed to print the vertex_index instead of the vertex_descriptor
[SVN r19539]
2003-08-12 01:15:37 +00:00
Jeremy Siek e830cec2bf fix to example
[SVN r19502]
2003-08-10 01:11:47 +00:00
Jeremy Siek a2c237a85d got rid of unnecessary complication
[SVN r19501]
2003-08-10 01:11:22 +00:00
Jeremy Siek ca79276a10 fixed rank value type from Vertex to size_type
[SVN r19500]
2003-08-10 01:06:42 +00:00
Rene Rivera edaf9a56b3 Add setting of the needed defines on a per source basis. This gives this Jamfile at least a chance of working.
[SVN r19491]
2003-08-09 15:53:49 +00:00
Jeremy Siek 9b195bb299 Fixed vertex_index to return local index instead of global index.
This is important when running a graph algorithm on a subgraph.


[SVN r19479]
2003-08-06 16:52:25 +00:00
Jeremy Siek 9a6f00eb12 fixed to match implementation and the BGL book
[SVN r19478]
2003-08-06 16:26:59 +00:00
Beman Dawes 487bb3ad72 Add missing inlines (Solomon Gibbs)
[SVN r19463]
2003-08-05 16:13:08 +00:00
Jeremy Siek b174cc0adf added a call to const_constraints(g) that was missing from
IncidenceGraphConcept::constraints


[SVN r19452]
2003-08-05 02:13:27 +00:00
Dave Abrahams 5f98c9923c boost/graph/graph_traits.hpp -- workaround for a vc6 ICE
boost/graph/adjacency_matrix.hpp,
boost/graph/detail/adjacency_list.hpp -- use boost/limits.hpp instead of <limits>, for portability.


[SVN r19388]
2003-07-31 15:06:00 +00:00
Dave Abrahams fd2844b35a Improved support for BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
[SVN r19386]
2003-07-31 01:27:41 +00:00
Dave Abrahams 81a1368fab Workarounds for broken compilers
[SVN r19379]
2003-07-31 00:34:58 +00:00
Dave Abrahams 50270ae7ba Add missing backslashes
[SVN r19346]
2003-07-29 16:32:03 +00:00
Vladimir Prus 894905388c Wrap boost/pending/container_traits.hpp in boost::graph_detail namespace,
to avoid conflicts with container_traits.hpp from boost sandbox.


[SVN r19337]
2003-07-29 08:41:54 +00:00
Vladimir Prus 09488ccbbc Implement 'null_vertex' notion.
[SVN r19336]
2003-07-29 08:31:01 +00:00
Dave Abrahams 8121e5394a Patched for Borland on Hugo Duncan's say-so
[SVN r19333]
2003-07-28 23:01:27 +00:00
Dave Abrahams d8e0253233 make all the iterator adaptors override only access category; add missing std:: qualification
[SVN r19234]
2003-07-21 01:48:49 +00:00
Dave Abrahams ab5cb5e51d GCC 2.x workarounds
[SVN r19229]
2003-07-20 19:04:54 +00:00
Dave Abrahams e530bade5b Apply fix from "Janusz Piwowarski" <jpiw-at-go2.pl>
[SVN r19155]
2003-07-16 15:45:11 +00:00
Douglas Gregor b352541b14 doc/read-graphviz.html: refer to the right graphviz library
example/undirected_dfs.cpp: include <iostream>


[SVN r19137]
2003-07-16 04:43:15 +00:00
Dave Abrahams 4b9b46cf49 Stop using non-existent std::is_heap
[SVN r19075]
2003-07-11 22:19:24 +00:00
Dave Abrahams dac729c926 Add missing next/prior.hpp
[SVN r19073]
2003-07-11 22:18:41 +00:00
Dave Abrahams 03b8ab6734 Move to new iterator adaptors, except for LEDA and standford graph
support.  Also fix many small bugs.


[SVN r19070]
2003-07-11 21:26:08 +00:00
Douglas Gregor 015276d003 depth_first_visit now calls start_vertex
[SVN r19060]
2003-07-11 16:06:07 +00:00
Jens Maurer f4d8b68e0e adjust to Boost.Random interface change for C++ library TR
[SVN r19008]
2003-07-09 22:55:21 +00:00
Vladimir Prus 6715b847ca Add non-recursive dfs, from Bruce Barr.
[SVN r18862]
2003-06-24 09:59:03 +00:00
Douglas Gregor 925ab9b163 Allow easy visitor creation with do_on_XXX member functions.
[SVN r18853]
2003-06-23 04:38:16 +00:00
Beman Dawes 5dfedd00db Comeau and Metrowerks say randomize_property must follow detail::randomize_property
[SVN r18527]
2003-05-24 12:10:13 +00:00
Vladimir Prus bc232d0067 Add missing typenames.
[SVN r18464]
2003-05-20 06:02:51 +00:00
Vladimir Prus 0f7fc74966 Add missing includes.
[SVN r18463]
2003-05-20 06:02:24 +00:00
Vladimir Prus fa46936c98 Add missing include.
[SVN r18462]
2003-05-20 05:09:55 +00:00
Dave Abrahams f84665b72d Fixed a typo.
[SVN r18454]
2003-05-19 19:20:18 +00:00
Vladimir Prus f8e19bd4e4 Apply patch from Chuck Messenger to add missing 'typename's.
[SVN r18433]
2003-05-19 05:14:46 +00:00
Vladimir Prus 659b99dec8 Bugfix from Alexey Nikitin.
* boost/graph/adjacency_list.hpp
  Register multisetS as container selector.


[SVN r18394]
2003-05-14 09:51:20 +00:00
Vladimir Prus 2bab353870 Fix graphviz parser build. Don't know how, but neither the current version,
nor the one before my V2 tweaks did not compile --- while it did compile
previosly.

* yystype.h
  (YYSTYPE_IS_DECLARED): Define this, so that generated parser don't try
  to redefine YYSTYPE to be int.

* graphviz_lex.l: Include 'yystype.h' right at the beginning, before generated
  parser header, so that the above change takes effect.


[SVN r18248]
2003-04-14 08:44:50 +00:00
Jeremy Siek e6b7dfe69f fixed some type requirements for the Graph type
[SVN r18246]
2003-04-13 16:23:32 +00:00
Ronald Garcia 566ded5df3 Grammatical corrections.
[SVN r18223]
2003-04-09 15:48:37 +00:00
Vladimir Prus df7037fba6 Switch to pass-by-reference.
[SVN r17854]
2003-03-12 15:39:31 +00:00
Vladimir Prus c62a911429 Minor bugfix.
* boost/graph/properties.hpp
  (property_traits<default_color_type>{}): Add 'reference' typedef.


[SVN r17765]
2003-03-07 16:13:04 +00:00
Vladimir Prus a1d45dfb0b Correct the name of header.
[SVN r17730]
2003-03-05 13:27:24 +00:00
Ronald Garcia 04f72dd932 Some typos corrected.
[SVN r17703]
2003-03-03 15:16:51 +00:00
Ronald Garcia 134e931fbc Fixed some documentation nits.
[SVN r17678]
2003-02-27 23:25:33 +00:00
Jeremy Siek 7e7074703d fixed req's for graph
[SVN r17486]
2003-02-17 14:52:16 +00:00
Vladimir Prus ad6d5c75cd Use BOOST_STATIC_CONSTANT.
[SVN r17475]
2003-02-17 07:58:00 +00:00
Vladimir Prus 91f7d0d42d Bugfix.
[SVN r17474]
2003-02-17 07:36:18 +00:00
Björn Karlsson 55581ff209 Added copyright and untabified
[SVN r17323]
2003-02-12 08:51:11 +00:00
Vladimir Prus 0fab95269c Assert that connected_component is called on undirected graph, per docs.
[SVN r17261]
2003-02-07 08:56:15 +00:00
Vladimir Prus e5f983c453 Improve random graph utilities.
* boost/graph/random.hpp: New file.
    (random_vertex, random_edge): Moved from graph_utility.hpp
    (generate_random_graph): Moved from graph_utility.hpp and
     added 'allow_parallel' parameter.
    (randomize_property): New function.

* lib/graph/doc/random.html: New file.


[SVN r17233]
2003-02-05 15:17:47 +00:00
Vladimir Prus e655580dcb Update to use the correct Boost.Test library name. Compile "copy" as well.
[SVN r17231]
2003-02-05 13:03:00 +00:00
Vladimir Prus c275c502b6 Make 'copy_graph' version with named parameters work.
[SVN r17227]
2003-02-05 12:02:02 +00:00
Jeremy Siek 508e8bcbed moved over from sandbox
[SVN r17180]
2003-02-03 18:13:57 +00:00
Jeremy Siek 3e006dd6ea moving over from sandbox
[SVN r17179]
2003-02-03 18:10:26 +00:00
Vladimir Prus 661eca78a1 Add missing typename.
[SVN r17178]
2003-02-03 16:34:10 +00:00
Vladimir Prus 1adbc147f1 Don't segfault on empty graph.
[SVN r17174]
2003-02-03 14:21:55 +00:00
Jeremy Siek 0e88c8cf7a fixed LvaluePropertyGraphConcept
[SVN r17079]
2003-01-29 15:18:45 +00:00
Vladimir Prus e5a5be0d1d Fix typo.
[SVN r17076]
2003-01-29 07:10:21 +00:00
Vladimir Prus ceb987e999 Improve property writers documentation.
[SVN r17075]
2003-01-29 07:06:56 +00:00
Vladimir Prus aaf7b3191f Fix docs and example for topological_sort.
[SVN r17070]
2003-01-28 16:56:02 +00:00
Vladimir Prus f5bf31f89d Minor concept docfixes.
* boost/graph/graph_concepts.hpp
    (VertexAndEdgeListGraphConcept): New class.

* libs/graph/doc/BidirectionalGraph.html: Doc fixes.

* libs/graph/doc/VertexAndEdgeListGraph.html: Doc fixes.


[SVN r17069]
2003-01-28 16:38:27 +00:00
Jeremy Siek bf177b12af changed 0 to infinity for the zero parameter to dijkstra
[SVN r17028]
2003-01-24 14:48:24 +00:00
Björn Karlsson 8ec64fdd02 Added missing include; named_function_params.hpp
[SVN r16885]
2003-01-13 13:43:00 +00:00
Jeremy Siek 8840131daf added tests that exhibit bug from Pavel
[SVN r16118]
2002-11-05 17:57:06 +00:00
Jeremy Siek e055b2625c bug fix thanks to Nepomnyachiy Pavel!
[SVN r16117]
2002-11-05 17:56:35 +00:00
Jeremy Siek 37f92a391c pass by reference to fix add_edge bug
thanks Helge Jensen!


[SVN r16116]
2002-11-05 17:48:16 +00:00
Jeremy Siek 8a6fe44c8a blah
[SVN r16042]
2002-11-01 15:52:37 +00:00
Jeremy Siek eefda06d3d added copyright statement
[SVN r16008]
2002-10-28 15:10:10 +00:00
Jeremy Siek de72dd0fae added std:: qualification to string
[SVN r15956]
2002-10-19 16:55:45 +00:00
Vladimir Prus 3e954fede7 Made BGL buildable with Boost.Build v2.
[SVN r15855]
2002-10-10 12:50:30 +00:00
Jeremy Siek 90a09357c7 added include for graph_utility
[SVN r15673]
2002-10-03 14:04:55 +00:00
Jeremy Siek 1501df6386 added includes for random stuff
[SVN r15672]
2002-10-03 14:03:27 +00:00
Jeremy Siek 329d43b6c6 removed dependency on graph_utility
[SVN r15671]
2002-10-03 14:03:06 +00:00
Jeremy Siek f7de068589 changed to const reference in breadth_first_visit
[SVN r15670]
2002-10-03 14:02:24 +00:00
Jeremy Siek 42852a6cf9 added another answer
[SVN r15669]
2002-10-03 14:01:44 +00:00
Jeremy Siek f16a9890bf added typename in a few places
[SVN r15668]
2002-10-03 13:30:50 +00:00
Jeremy Siek 39104a5514 added this-> to access graph member since the base class is dependent
[SVN r15271]
2002-09-12 02:29:28 +00:00
Jeremy Siek 25dcd6f92c added this-> to access m_vis, since the base class is dependent
[SVN r15270]
2002-09-12 02:27:46 +00:00
Jeremy Siek 1b25060368 fixed broken URL links
[SVN r15122]
2002-08-31 12:34:27 +00:00
Jeremy Siek 2b6b96b97d removed the assertion about self edges
[SVN r15105]
2002-08-27 17:22:37 +00:00
Jeremy Siek 4e687216b7 added more specializations of hash
[SVN r15103]
2002-08-26 17:10:28 +00:00
Jeremy Siek fdb0f8e6b4 updated
[SVN r14997]
2002-08-20 15:55:52 +00:00
Jeremy Siek b3e7396c37 added typename
[SVN r14996]
2002-08-20 15:54:59 +00:00
Jeremy Siek 397ddb31ea blah
[SVN r14995]
2002-08-20 15:54:39 +00:00
Jeremy Siek ea1bc03f71 this is broken...
[SVN r14994]
2002-08-20 15:54:18 +00:00
Jeremy Siek 69762c75ec added "typename" in some places
[SVN r14991]
2002-08-20 15:45:33 +00:00
Jeremy Siek 58c22c7cf9 removed verify_isomorphism, it is now in isomorphism.hpp
[SVN r14989]
2002-08-20 15:25:04 +00:00
Jeremy Siek a976e279a4 *** empty log message ***
[SVN r14988]
2002-08-20 15:22:24 +00:00
Beman Dawes b50bae2b22 init commit
[SVN r14977]
2002-08-19 23:29:18 +00:00
Jeremy Siek cfbf43e814 added edge color
[SVN r14974]
2002-08-19 22:17:00 +00:00
Jeremy Siek a22326d2b5 hmm, forget what I changed...
[SVN r14973]
2002-08-19 22:16:50 +00:00
Jeremy Siek bb9e4ebe4a added undirected_dfs.cpp
[SVN r14972]
2002-08-19 22:16:32 +00:00
Jeremy Siek 49488dd54a various changes
[SVN r14971]
2002-08-19 22:16:15 +00:00
Jeremy Siek 5c190c2da5 forget what
[SVN r14970]
2002-08-19 22:16:05 +00:00
Jeremy Siek 6a35e532d7 added edge_color_map
[SVN r14969]
2002-08-19 22:15:44 +00:00
Jeremy Siek e9152d8d8d changed to be directed only
[SVN r14962]
2002-08-19 18:14:33 +00:00
Jeremy Siek 8608ebaf0a fixed edge coloring
[SVN r14961]
2002-08-19 18:12:14 +00:00
Jeremy Siek 258587e952 updated algo
[SVN r14960]
2002-08-19 18:11:26 +00:00
Jeremy Siek 8fc0b12e34 added link to undirected dfs
[SVN r14958]
2002-08-19 17:01:23 +00:00
Jeremy Siek 8d4aaff25f small edit
[SVN r14957]
2002-08-19 16:59:46 +00:00
Jeremy Siek cad149a5de new file
[SVN r14956]
2002-08-19 16:59:33 +00:00
Jeremy Siek 08bb638505 new file
[SVN r14954]
2002-08-19 16:45:01 +00:00
Jeremy Siek 9f7c65022d updated to new unit test stuff
[SVN r14861]
2002-08-14 21:28:15 +00:00
Jeremy Siek 4c668211c7 changed back to old order, fixed iteration macro problem in isomorphism.hpp instead
[SVN r14860]
2002-08-14 21:18:58 +00:00
Jeremy Siek 54a5a4a7a3 fixed how undef was used
[SVN r14859]
2002-08-14 21:17:59 +00:00
Jeremy Siek 019cfbf502 move #include of iteration_macros.hpp to come last (after isomorphism.hpp)
[SVN r14858]
2002-08-14 21:14:30 +00:00
Jeremy Siek 6668dc65b8 changed 2nd i to j
[SVN r14855]
2002-08-14 20:55:59 +00:00
Jeremy Siek 6fea41727d Fixed check for negative edges. Hurrah for concept archetypes!
[SVN r14853]
2002-08-14 20:53:27 +00:00
Jeremy Siek 4333f4c3f2 changed checking for directedness to use is_convertible
[SVN r14796]
2002-08-12 19:13:18 +00:00
Jeremy Siek 0415430b37 spelling, grammar
[SVN r14778]
2002-08-11 22:26:15 +00:00
Jeremy Siek ed7f263840 added answer to question about design decision to use free functions
[SVN r14777]
2002-08-11 20:08:30 +00:00
Jeremy Siek dfb53a9695 updated diameter result
[SVN r14715]
2002-08-06 15:51:39 +00:00
Jeremy Siek 274a57af77 added edge_range
[SVN r14713]
2002-08-06 15:00:16 +00:00
Jeremy Siek 185c8b4c66 added edge_range
[SVN r14712]
2002-08-06 14:55:12 +00:00
Jeremy Siek de3cf1c17c new file
[SVN r14711]
2002-08-06 14:54:52 +00:00
Jeremy Siek 8e398e19c2 changed "the" to "an" in docs for the edge(u,v,g) function
[SVN r14710]
2002-08-06 14:39:06 +00:00
Jeremy Siek 2647cb69a5 added MSVC version
[SVN r14637]
2002-07-29 19:11:05 +00:00
Jeremy Siek 6778c5eaed added the non-named parameter version
[SVN r14612]
2002-07-25 20:37:23 +00:00
Jeremy Siek 85e8916e35 added non-named parameter version
[SVN r14611]
2002-07-25 20:34:36 +00:00
Jeremy Siek 9dc4ef0c22 new file
[SVN r14610]
2002-07-25 19:54:01 +00:00
Jeremy Siek f4392384c1 added stuff for undirected edges
[SVN r14609]
2002-07-25 19:53:38 +00:00
Jeremy Siek 60d885a95f new file
[SVN r14608]
2002-07-25 19:29:06 +00:00
Jeremy Siek 7578421de9 removed two property map parameters
[SVN r14607]
2002-07-25 19:26:18 +00:00
Jeremy Siek b1fd572469 fixed bug, forgot to create the modifed graph with an extra vertex
[SVN r14606]
2002-07-25 19:25:50 +00:00
Jeremy Siek 42e13e2f11 removed bogus vertex and edges, cleaned up output a bit
[SVN r14604]
2002-07-25 18:52:00 +00:00
Jeremy Siek 149b84cb99 fixed book link
[SVN r14601]
2002-07-25 16:22:22 +00:00
Jeremy Siek ac633fd8e5 new file
[SVN r14524]
2002-07-18 17:00:41 +00:00
Jeremy Siek 6b08404083 moved call to postorder
[SVN r14523]
2002-07-18 17:00:25 +00:00
Jeremy Siek 22cb1e04ca added property map access
[SVN r14522]
2002-07-18 16:59:57 +00:00
Jeremy Siek 87f63c1241 added a tree parameter to the visitor functions
[SVN r14521]
2002-07-18 16:24:54 +00:00
Jeremy Siek 7085a2c7d9 small style change
[SVN r14492]
2002-07-17 13:23:17 +00:00
Jeremy Siek e4582d5118 added leda_ prefix to the node_map and node_array
[SVN r14482]
2002-07-16 14:57:08 +00:00
Jeremy Siek f18494eb54 new file, variation on dijkstra-example.cpp
[SVN r14480]
2002-07-16 14:50:11 +00:00
Jeremy Siek 9d978e16b2 fixed buggy call to graph edge iterator constructor
[SVN r14479]
2002-07-16 14:32:42 +00:00
Jeremy Siek 74a679b769 removed tabs
[SVN r14443]
2002-07-13 21:03:06 +00:00
Jeremy Siek ccaaef7a72 fixed typename bug
[SVN r14442]
2002-07-13 20:28:44 +00:00
Jeremy Siek 0bbfbb9bdd added version number check to #if BOOST_MSVC
[SVN r14440]
2002-07-13 17:23:25 +00:00
Jeremy Siek d9686745b8 added version number test for BOOST_MSVC #if's
[SVN r14439]
2002-07-13 17:21:37 +00:00
Jeremy Siek 73f3dc1a92 put #ifdef around templated edge iter constructors
[SVN r14438]
2002-07-13 17:12:55 +00:00
Dave Abrahams a500eba00d Fix unversioned VC++ checks
[SVN r14436]
2002-07-13 12:26:19 +00:00
Jeremy Siek 39e27bc6a7 fixed bug in set_difference
[SVN r14416]
2002-07-11 22:08:17 +00:00
Jeremy Siek 0f0cc3de96 fixed bug in remove_edge due to use of invalid iterator
(this bug was exposed by STLport)


[SVN r14406]
2002-07-11 19:07:45 +00:00
Jeremy Siek 7b96312a72 updated the refinement relationship for VertexListGraph to match the BGL book
[SVN r14233]
2002-06-24 16:37:02 +00:00
Jeremy Siek f16dfaf309 added ordered out edge answer
[SVN r14182]
2002-06-19 14:37:47 +00:00
Jeremy Siek 595c3708ed added set_subset function
[SVN r14142]
2002-06-14 00:41:01 +00:00
Ronald Garcia 877606cb52 Fixed a bug in property map creation.
[SVN r14128]
2002-06-10 18:35:24 +00:00
Ronald Garcia 802453b397 small fix
[SVN r14127]
2002-06-10 17:28:42 +00:00
Jeremy Siek 63cedbcc9c model of additions
[SVN r14126]
2002-06-10 17:05:42 +00:00
Jeremy Siek c36c15cd47 added model of CopyConstructible and Assignable
[SVN r14125]
2002-06-10 17:03:28 +00:00
Jeremy Siek e0620c90c0 fixed typo
[SVN r14123]
2002-06-10 16:21:44 +00:00
Jeremy Siek 2d62520f3a trying to fix figures
[SVN r14121]
2002-06-10 15:16:29 +00:00
Jeremy Siek e7056e65de trying to fix figures in adjacency_list
[SVN r14120]
2002-06-10 15:12:39 +00:00
Jeremy Siek 7fb2d45363 trying to fix pictures in adjacency_list doc
[SVN r14119]
2002-06-10 15:11:53 +00:00
Ronald Garcia 99fc1b170d fixed typo in name
[SVN r14104]
2002-06-07 17:42:22 +00:00
Jeremy Siek 42526b9ca5 changed Edge and Vertex to const& in topo_sort_visitor
[SVN r14026]
2002-05-23 16:28:02 +00:00
Jeremy Siek d70300766c added copyright notice
[SVN r14009]
2002-05-22 18:28:38 +00:00
Jeremy Siek d5573da050 added std:: prefix to invalid_argument
[SVN r14008]
2002-05-22 18:27:10 +00:00
Jeremy Siek b2ac4c2743 added std:: prefix to string
[SVN r14007]
2002-05-22 16:18:23 +00:00
Dave Abrahams eeefccf435 respect <sysinclude>
[SVN r13995]
2002-05-21 16:24:07 +00:00
Jeremy Siek 834d6ad8fd added some exceptions
[SVN r13978]
2002-05-19 16:26:37 +00:00
Jeremy Siek 63290266da added optimization of stopping as soon as relaxation is done
(thanks Herve for the suggestion!)


[SVN r13977]
2002-05-19 15:42:14 +00:00
Jeremy Siek ad88071877 did workaround, avoiding using default parameters in constructors for visitors
[SVN r13945]
2002-05-16 02:13:32 +00:00
Jeremy Siek 1efa4097a2 fix for dealing with leda macros
[SVN r13786]
2002-05-09 17:41:58 +00:00
Jeremy Siek 2d30710ee0 forgot to include <vector> and added is_sorted (meaning to check this in
for a while)


[SVN r13785]
2002-05-09 17:38:38 +00:00
John Maddock 76054ca8be Commented out duplicated function def.
changed <ctime> to <time.h> as clock and clock_t are used without std:: qualifiers


[SVN r13294]
2002-03-28 12:47:07 +00:00
Darin Adler a78fe97664 Add missing <cassert> includes.
[SVN r13264]
2002-03-24 19:05:41 +00:00
Jeremy Siek 1ef5b2d0f9 new example
[SVN r12988]
2002-02-28 20:37:14 +00:00
2059 changed files with 262572 additions and 42303 deletions
+15
View File
@@ -0,0 +1,15 @@
BasedOnStyle: WebKit
Standard: Cpp03
AlignAfterOpenBracket: false
AlignEscapedNewlinesLeft: true
AlwaysBreakAfterDefinitionReturnType: None
BreakBeforeBraces: Allman
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 80
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 0
IndentCaseLabels: false
SortIncludes: false
AlignTrailingComments: false
SpacesInAngles: true
+163
View File
@@ -0,0 +1,163 @@
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE.txt)
#
# Copyright Rene Rivera 2020.
# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={}
linuxglobalimage="cppalliance/droneubuntu1604:1"
windowsglobalimage="cppalliance/dronevs2019"
def main(ctx):
return [
linux_cxx("g++-4.4 98", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '98', }, globalenv=globalenv),
linux_cxx("g++-4.4 0x", "g++", packages="g++-4.4", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '0x', }, globalenv=globalenv),
linux_cxx("g++-4.6 03", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-4.6 0x", "g++", packages="g++-4.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '0x', }, globalenv=globalenv),
linux_cxx("g++-4.7 03", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-4.7 11", "g++-4.7", packages="g++-4.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-4.8 03", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-4.8 11", "g++-4.8", packages="g++-4.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-4.9 03", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-4.9 11", "g++-4.9", packages="g++-4.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-5 03", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-5 11", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-5 14", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-5 1z", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("g++-6 03", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-6 11", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-6 14", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-6 1z", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("g++-7 03", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-7 11", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-7 14", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-7 17", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("g++-8 03", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-8 11", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-8 14", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-8 17", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("g++-9 03", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("g++-9 11", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-9 14", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-9 17", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("g++-9 2a", "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '2a', }, globalenv=globalenv),
linux_cxx("g++-10 11", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("g++-10 14", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("g++-10 17", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("g++-10 20", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '20', }, globalenv=globalenv),
linux_cxx("clang++-3.5 03", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-3.5 11", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '11', }, globalenv=globalenv),
#linux_cxx("clang++-3.5 14", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '14', }, globalenv=globalenv),
#linux_cxx("clang++-3.5 1z", "clang++", packages="clang-3.5", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-3.6 03", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-3.6 11", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '11', }, globalenv=globalenv),
#linux_cxx("clang++-3.6 14", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '14', }, globalenv=globalenv),
#linux_cxx("clang++-3.6 1z", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-3.7 03", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-3.7 11", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '11', }, globalenv=globalenv),
#linux_cxx("clang++-3.7 14", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '14', }, globalenv=globalenv),
#linux_cxx("clang++-3.7 1z", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-3.8 03", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-3.8 11", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '11', }, globalenv=globalenv),
# These have issues not of our making:
#linux_cxx("clang++-3.8 14", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '14', }, globalenv=globalenv),
#linux_cxx("clang++-3.8 1z", "clang++-3.8", packages="clang-3.8", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-3.9 03", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-3.9 11", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '11', }, globalenv=globalenv),
# These have issues not of our making:
#linux_cxx("clang++-3.9 14", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '14', }, globalenv=globalenv),
#linux_cxx("clang++-3.9 1z", "clang++-3.9", packages="clang-3.9", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image="cppalliance/droneubuntu1404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-4.0 03", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-4.0 11", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-4.0 14", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-4.0 1z", "clang++-4.0", packages="clang-4.0", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-5.0 03", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-5.0 11", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-5.0 14", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-5.0 1z", "clang++-5.0", packages="clang-5.0", llvm_os="xenial", llvm_ver="5.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-6.0 03", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-6.0 11", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-6.0 14", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-6.0 1z", "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-7 03", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-7 14", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-7 17", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-7 1z", "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '1z', }, globalenv=globalenv),
linux_cxx("clang++-8 03", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-8 11", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-8 14", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-8 17", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("clang++-8 2a", "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': '2a', }, globalenv=globalenv),
linux_cxx("clang++-9 03", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-9 11", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-9 14", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-9 17", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("clang++-9 2a", "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': '2a', }, globalenv=globalenv),
linux_cxx("clang++-10 03", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03', }, globalenv=globalenv),
linux_cxx("clang++-10 11", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '11', }, globalenv=globalenv),
linux_cxx("clang++-10 14", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '14', }, globalenv=globalenv),
linux_cxx("clang++-10 17", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '17', }, globalenv=globalenv),
linux_cxx("clang++-10 20", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '20', }, globalenv=globalenv),
osx_cxx("XCode-11.7 03", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
osx_cxx("XCode-11.7 11", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
osx_cxx("XCode-11.7 14", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
osx_cxx("XCode-11.7 17", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '17', }, globalenv=globalenv),
osx_cxx("XCode-11.7 2a", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '2a', }, globalenv=globalenv),
# We don't support these old versions of Xcode any more, but you are welcome to take up the challenge for doing so if you need them.
# osx_cxx("XCode-10.2 03", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 11", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 14", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 17", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '17', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 2a", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '2a', }, globalenv=globalenv),
# osx_cxx("XCode-9.4 03", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-9.4 11", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-9.4 14", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-9.4 1z", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
# osx_cxx("XCode-9.0 03", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-9.0 11", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-9.0 14", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-9.0 1z", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
# osx_cxx("XCode-8.3 03", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-8.3 11", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-8.3 14", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-8.3 1z", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
# osx_cxx("XCode-8.0 03", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-8.0 11", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-8.0 14", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-8.0 1z", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
# osx_cxx("XCode-7.3 03", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-7.3 11", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
+42
View File
@@ -0,0 +1,42 @@
#!/bin/bash
set -ex
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export PATH=~/.local/bin:/usr/local/bin:$PATH
echo '==================================> BEFORE_INSTALL'
. .drone/before-install.sh
echo '==================================> INSTALL'
cd ..
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
git submodule update --init tools/build
git submodule update --init libs/config
git submodule update --init tools/boost_install
git submodule update --init libs/headers
git submodule update --init tools/boostdep
cp -r $TRAVIS_BUILD_DIR/* libs/graph
python tools/boostdep/depinst/depinst.py graph
./bootstrap.sh
./b2 headers
echo '==================================> BEFORE_SCRIPT'
. $DRONE_BUILD_DIR/.drone/before-script.sh
echo '==================================> SCRIPT'
echo "using $TOOLSET : : $COMPILER : $OPTIONS ;" > ~/user-config.jam
(cd libs/config/test && ../../../b2 cxxstd=$CXXSTD config_info_travis_install toolset=$TOOLSET && ./config_info_travis)
(cd libs/graph/test && ../../../b2 -j3 cxxstd=$CXXSTD toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES)
echo '==================================> AFTER_SUCCESS'
. $DRONE_BUILD_DIR/.drone/after-success.sh
+266
View File
@@ -0,0 +1,266 @@
# Copyright 2020 Evan Miller
# Copyright 2020 Matt Borland
# Copyright 2021 John Maddock
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
name: CI
on: [ push, pull_request ]
jobs:
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# Removed g++-10 because of an ICE; meant to be fixed in 10.2?
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94938
compiler: [ g++-9, clang++-10 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-9 clang-10
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/graph/test
ubuntu-bionic:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-7 g++-8 clang-7 clang-8
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info install
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
working-directory: ../boost-root/libs/graph/test
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
toolset: [ clang ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_0:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
toolset: [ msvc-14.0 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info
run: ..\..\..\b2 print_config_info cxxstd=14,17 address-model=64 toolset=msvc-14.0
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17 toolset=msvc-14.0
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_2:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
toolset: [ msvc-14.2 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info
run: ..\..\..\b2 print_config_info cxxstd=14,17,20 address-model=64 toolset=msvc-14.2
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.2
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_3:
runs-on: windows-2022
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
toolset: [ msvc-14.3 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info
run: ..\..\..\b2 print_config_info cxxstd=14,17,20 address-model=64 toolset=msvc-14.3
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.3
working-directory: ../boost-root/libs/graph/test
+8
View File
@@ -0,0 +1,8 @@
cube-fr.dot
cube.dot
disconnected-fr.dot
graphml_test_out.xml
kevin-bacon2.dat
random.dot
triangular-fr.dot
triangular-kk.dot
+80
View File
@@ -0,0 +1,80 @@
# Copyright 2020, 2021 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_graph VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_graph
src/graphml.cpp
src/read_graphviz_new.cpp
)
add_library(Boost::graph ALIAS boost_graph)
target_include_directories(boost_graph PUBLIC include)
target_link_libraries(boost_graph
PUBLIC
Boost::algorithm
Boost::any
Boost::array
Boost::assert
Boost::bimap
Boost::bind
Boost::concept_check
Boost::config
Boost::container_hash
Boost::conversion
Boost::core
Boost::detail
Boost::foreach
Boost::function
Boost::integer
Boost::iterator
Boost::lexical_cast
Boost::math
Boost::move
Boost::mpl
Boost::multi_index
Boost::optional
Boost::parameter
Boost::preprocessor
Boost::property_map
Boost::property_tree
Boost::random
Boost::range
Boost::serialization
Boost::smart_ptr
Boost::spirit
Boost::static_assert
Boost::throw_exception
Boost::tti
Boost::tuple
Boost::type_traits
Boost::typeof
Boost::unordered
Boost::utility
Boost::xpressive
PRIVATE
Boost::regex
)
target_compile_definitions(boost_graph
PUBLIC BOOST_GRAPH_NO_LIB
# Source files already define BOOST_GRAPH_SOURCE
# PRIVATE BOOST_GRAPH_SOURCE
)
if(BUILD_SHARED_LIBS)
target_compile_definitions(boost_graph PUBLIC BOOST_GRAPH_DYN_LINK)
else()
target_compile_definitions(boost_graph PUBLIC BOOST_GRAPH_STATIC_LINK)
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
-100
View File
@@ -1,100 +0,0 @@
COPYRIGHT NOTICE:
Copyright 1997-2000, University of Notre Dame.
Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
The Boost Graph Library "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less free fashion, plus the right to make
reasonable modifications.
Definitions
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files created
through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes of the
Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or copyrights for the package.
"You" is you, if you're thinking about copying or distributing this Package.
"Reasonable copying fee" is whatever you can justify on the basis of
media cost, duplication charges, time of people involved, and so
on. (You will not be required to justify it to the Copyright Holder,
but only to the computing community at large as a market that must
bear the fee.)
"Freely Available" means that no fee is charged for the item itself,
though there may be fees involved in handling the item. It also means
that recipients of the item may redistribute it under the same
conditions they received it.
1. You may make and give away verbatim copies of the source form of
the Standard Version of this Package without restriction, provided
that you duplicate all of the original copyright notices and
associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way,
provided that you insert a prominent notice in each changed file
stating how and when you changed that file, and provided that you do
at least ONE of the following:
a. place your modifications in the Public Domain or otherwise make
them Freely Available, such as by posting said modifications to Usenet
or an equivalent medium, or placing the modifications on a major
archive site such as uunet.uu.net, or by allowing the Copyright Holder
to include your modifications in the Standard Version of the Package.
b. use the modified Package only within your corporation or organization.
c. rename any non-standard types and functions so the names do not
conflict with Standard Vibrary, which must also be provided, and
provide a separate documentation for each non-standard type of function
that clearly documents how it differs from the Standard Version.
d. make other distribution arrangements with the Copyright Holder.
4. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial)
software distribution provided that you do not advertise this Package
as a product of your own.
5. The name of the Copyright Holder may not be used to endorse or
promote products derived from this software without specific prior
written permission.
DISCLAIMER:
LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
By way of example, but not limitation, Licensor MAKES NO
REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE COMPONENTS
OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS
OR OTHER RIGHTS.
The Authors and the University of Notre Dame du Lac shall not be held
liable for any liability nor for any direct, indirect or consequential
damages with respect to any claim by LICENSEE or any third party on
account of or arising from this Agreement or use of this software.
Any disputes arising out of this Agreement or LICENSEE'S use of the
software at any time shall be resolved by the courts of the state of
Indiana. LICENSEE hereby consents to the jurisdiction of the Indiana
courts and waives the right to challenge the jurisdiction thereof in
any dispute arising out of this Agreement or Licensee's use of the
software.
+55
View File
@@ -0,0 +1,55 @@
Boost Graph Library [![Build Status](https://drone.cpp.al/api/badges/boostorg/graph/status.svg)](https://drone.cpp.al/boostorg/graph)[![Build Status](https://github.com/boostorg/graph/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/graph/actions)
===================
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 [Github issue page](https://github.com/boostorg/graph/issues).
See also:
* [Current open issues](https://github.com/boostorg/graph/issues)
* [Closed issues](https://github.com/boostorg/graph/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed)
* Old issues still open on [Trac](https://svn.boost.org/trac/boost/query?status=!closed&component=graph&desc=1&order=id)
* Closed issues on [Trac](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)
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 ##
| | Master | Develop |
|------------------|----------|-------------|
| Github Actions | [![Build Status](https://github.com/boostorg/graph/workflows/CI/badge.svg?branch=master)](https://github.com/boostorg/graph/actions) | [![Build Status](https://github.com/boostorg/graph/workflows/CI/badge.svg?branch=develop)](https://github.com/boostorg/graph/actions) |
|Drone | [![Build Status](https://drone.cpp.al/api/badges/boostorg/graph/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/graph) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/graph/status.svg)](https:/drone.cpp.al/boostorg/graph) |
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).
-10
View File
@@ -1,10 +0,0 @@
subproject libs/graph/build ;
SOURCES = graphviz_graph_lex graphviz_digraph_lex
graphviz_graph_parser graphviz_digraph_parser ;
lib libbgl-viz : ../src/$(SOURCES).cpp
: <include>$(BOOST_ROOT)
: debug <inlining>on #inlining prevents linker name clashes due to truncation!
;
+29
View File
@@ -0,0 +1,29 @@
# Copyright (c) 2002 Trustees of Indiana University
#
# 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)
import mpi ;
project boost/graph
: requirements <include>../src
: source-location ../src
;
lib boost_graph
:
read_graphviz_new.cpp
graphml.cpp
:
<library>../../regex/build//boost_regex
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
# Without these flags, MSVC 7.1 and 8.0 crash
# User reports that VC++ 8.0 does not fail anymore, so that is removed
<toolset>msvc-7.1:<cxxflags>-GR-
<toolset>sun:<build>no
:
:
;
boost-install boost_graph ;
+138
View File
@@ -0,0 +1,138 @@
<HTML>
<!--
Copyright (c) 2004 Kris Beevers
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: AStarHeuristic</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>AStar Heuristic Concept</H1>
This concept defines the interface for the heuristic function of an A*
search, which is responsible for estimating the remaining cost from
some vertex to a goal. The user can create a class that matches this
interface, and then pass objects of the class into <a
href="./astar_search.html"><tt>astar_search()</tt></a> to guide the
order of vertex examination of the search. The heuristic instance
must incorporate any necessary information about goal vertices in the
graph.
For further discussion of the use of heuristics in an A* search, see
the documentation of <a
href="./astar_search.html">astar_search()</a>.
<h3>Refinement of</h3>
<a href="http://www.boost.org/sgi/stl/UnaryFunction.html">Unary
Function</a> (must take a single argument -- a graph vertex -- and
return a cost value) and <a
href="../../utility/CopyConstructible.html">Copy Constructible</a>
(copying a heuristic should be a lightweight operation).
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>H</tt></TD>
<TD>A type that is a model of AStar Heuristic.</TD>
</TR>
<TR>
<TD><tt>h</tt></TD>
<TD>An object of type <tt>H</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>u</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>CostType</tt></TD>
<TD>A type that can be used with the <tt>compare</tt> and
<tt>combine</tt> functions passed to A*.</TD>
</TR>
<TR>
<TD><tt>c</tt></TD>
<TD>An object of type <tt>CostType</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Call Heuristic</td>
<td><tt>CostType c = h(u)</tt></td>
<td><tt>CostType</tt></td>
<td>
Called for the target of every out edge of a vertex being examined.
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./astar_heuristic.html"><tt>astar_heuristic</tt></a>
</ul>
<h3>Concept Checking Class</h3>
<pre>
template &lt;class Heuristic, class Graph&gt;
struct AStarHeuristicConcept {
void constraints()
{
BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept&lt;Heuristic&gt; ));
h(u);
}
Heuristic h;
typename graph_traits&lt;Graph&gt;::vertex_descriptor u;
};
</pre>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
Rensselaer Polytechnic Institute (<A
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+213
View File
@@ -0,0 +1,213 @@
<HTML>
<!--
Copyright (c) 2004 Kris Beevers
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: AStarVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>AStar Visitor Concept</H1>
This concept defines the visitor interface for <a
href="./astar_search.html"><tt>astar_search()</tt></a>. Users can
define a class with the AStar Visitor interface and pass an object of
the class to <tt>astar_search()</tt>, thereby augmenting the actions
taken during the graph search.
<h3>Refinement of</h3>
<a href="../../utility/CopyConstructible.html">Copy Constructible</a>
(copying a visitor should be a lightweight operation).
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of AStar Visitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>const G&amp;</tt>.</TD>
</TR>
<TR>
<TD><tt>e</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>s,u,v</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
<TR>
<TD><tt>d</tt></TD>
<TD>An object of type <tt>DistanceMap</tt>.</TD>
</TR>
<TR>
<TD><tt>WeightMap</tt></TD>
<TD>A type that is a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>.</TD>
</TR>
<TR>
<TD><tt>w</tt></TD>
<TD>An object of type <tt>WeightMap</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each vertex of the graph when it is first
initialized (i.e., when its property maps are initialized).
</td>
</tr>
<tr>
<td>Discover Vertex</td>
<td><tt>vis.discover_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex is first discovered and is added to the
OPEN list.
</td>
</tr>
<tr>
<td>Examine Vertex</td>
<td><tt>vis.examine_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on a vertex as it is popped from the queue (i.e., it
has the lowest cost on the OPEN list). This happens immediately before
<tt>examine_edge()</tt> is invoked on each of the out-edges of vertex
<tt>u</tt>.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every out-edge of each vertex after it is
examined.
</td>
</tr>
<tr>
<td>Edge Relaxed</td>
<td><tt>vis.edge_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if the following condition holds then the edge is
relaxed (the distance of its target vertex is reduced) and this method
is invoked:
<blockquote>
<pre>
tie(u, s) = incident(e, g);
D d_u = get(d, u), d_v = get(d, s);
W w_e = get(w, e);
assert(compare(combine(d_u, w_e), d_s));
</pre>
</blockquote>
</td>
</tr>
<tr>
<td>Edge Not Relaxed</td>
<td><tt>vis.edge_not_relaxed(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
Upon examination, if an edge is not relaxed (see above) then this
method is invoked.
</td>
</tr>
<tr>
<td>Black Target</td>
<td><tt>vis.black_target(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex that is on the CLOSED list is
``rediscovered'' via a more efficient path and is re-added to the
OPEN list.
</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on a vertex when it is added to the CLOSED list. This
happens after all of its out-edges have been examined.
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="./astar_visitor.html"><tt>astar_visitor</tt></a>
</ul>
<h3>See also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
Rensselaer Polytechnic Institute (<A
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+130
View File
@@ -0,0 +1,130 @@
<html>
<head>
<!-- Copyright 2007 Aaron Windsor
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)
-->
<title>AddEdgeVisitor Concept</title>
</head>
<body alink="#ff0000"
bgcolor="#ffffff"
link="#0000ee"
text="#000000"
vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear="">
<h1>AddEdgeVisitor Concept</h1>
The AddEdgeVisitor concept exists to allow for some indirection in algorithms
that modify graphs by adding edges. In such algorithms, it may be convenient
to perform additional operations (such as updating an edge index map) at
points in the algorithm where an edge addition occurs. Replacing calls to
to <tt>add_edge</tt> with calls to <tt>AddEdgeVisitor::visit_vertex_pair</tt>
allows for such operations to be defined independently from the algorithm.
<h3>Notation</h3>
<table>
<tbody>
<tr>
<td> <tt>Visitor</tt> </td>
<td> is a type that models the AddEdgeVisitor concept </td>
</tr>
<tr>
<td> <tt>vis</tt> </td>
<td> is an object of type Visitor </td>
</tr>
<tr>
<td> <tt>Graph</tt> </td>
<td> is the type of a graph </td>
</tr>
<tr>
<td> <tt>u,v</tt> </td>
<td> are objects of type <tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt>
</td>
</tr>
<tr>
<td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</td>
</tr>
<tr>
<td> <tt>v</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::vertex_descriptor</tt>
</td>
</tr><tr>
<td>
</td></tr></tbody></table>
<h3>Associated Types</h3>
None
<h3>Valid Expressions</h3>
<p>
<table border="1">
<tbody><tr><th>Name</th><th>Expression</th><th>Return Type</th>
<th>Description</th>
</tr><tr>
<td> Add an Edge </td>
<td> <tt>vis.visit_vertex_pair(u, v, g)</tt> </td>
<td> <tt>void</tt></td>
<td> Invoked every time an edge between vertices <tt>u</tt> and <tt>v</tt>
should be added to the graph <tt>g</tt>.
</td></tr>
</tbody></table>
</p><h3>Models</h3>
Two models of this concept are defined in the file
<a href="../../../boost/graph/planar_detail/add_edge_visitors.hpp">
<tt>add_edge_visitors.hpp</tt></a>:
<ul>
<li><tt>default_add_edge_visitor</tt>: The constructor of this class takes
no arguments.<tt>visit_vertex_pair(u, v, g)</tt> is just a dispatch to
<tt>add_edge(u, v, g)</tt>.
<li><tt>edge_index_update_visitor</tt>: The constructor of this class takes
two arguments: the first, an EdgeIndexMap,
is a <a href="../../property_map/doc/ReadWritePropertyMap.html">
ReadWritePropertyMap</a> that maps each edge in the associated graph
<tt>g</tt> to a distinct integer in the range <tt>[0, num_edges(g))</tt>.
The second argument is the number of edges in the underlying graph, which
serves as the "next available index" counter within the visitor.
For example, in the case the graph used has an initialized interior
edge index, the <tt>edge_index_update_visitor</tt> constructor should be
called with <tt>get(edge_index, g)</tt> as the edge index and
<tt>num_edges(g)</tt> as the next available index. When
<tt>visit_vertex_pair(u, v, g)</tt> is called, the
<tt>edge_index_update_visitor</tt> will add the edge <i>(u,v)</i> to the graph
and update the edge index for the newly created edge.
</ul>
<p>
<br>
</p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</body></html>
+21 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>AdjacencyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -25,7 +21,7 @@
AdjacencyGraph
</H2>
The AdjacencyGraph concept provides and interface for efficient access
The AdjacencyGraph concept provides an interface for efficient access
of the adjacent vertices to a vertex in a graph. This is quite similar
to the <a href="./IncidenceGraph.html">IncidenceGraph</a> concept (the
target of an out-edge is an adjacent vertex). Both concepts are
@@ -61,6 +57,12 @@ vertices, whereas in other contexts the edges are also important.
<Table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>adjacency_graph_tag</tt>.
</td>
</tr>
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::adjacency_iterator</pre>
An adjacency iterator for a vertex <i>v</i> provides access to the
@@ -83,7 +85,7 @@ href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
<TD>
Returns an iterator-range providing access to the vertices adjacent to
vertex <TT>v</TT> in graph <TT>g</TT>.<a
href="adjacencygraph.html#1">[1]</a>
href="#1">[1]</a>
<br> Return type:
<TT>std::pair&lt;adjacency_iterator,&nbsp;adjacency_iterator&gt;</TT>
@@ -110,8 +112,7 @@ 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() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; ));
p = adjacent_vertices(v, g);
v = *p.first;
@@ -158,9 +159,9 @@ experience with graph algorithm implementations.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+29 -16
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>AdjacencyMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -37,6 +33,18 @@ concept.
<a href="./Graph.html">Graph</a>
<H3>Associated Types</H3>
<Table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>adjacency_matrix_tag</tt>.
</td>
</tr>
</table>
<H3>Valid Expressions</H3>
<table border>
@@ -57,6 +65,11 @@ consisting of the edge descriptor if the edge was found.
</TR>
</TABLE>
<H3>Complexity guarantees</H3>
The <TT>edge()</TT> function must return in constant time.
<H3>Models</H3>
<a href="./adjacency_matrix.html"><tt>adjacency_matrix</tt></a>
@@ -82,9 +95,9 @@ consisting of the edge descriptor if the edge was found.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+39 -22
View File
@@ -1,25 +1,21 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: BFSVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1>BFS Visitor Concept</H1>
<H1><img src="figs/python.gif" alt="(Python)"/>BFS Visitor Concept</H1>
This concept defines the visitor interface for <a
href="./breadth_first_search.html"><tt>breadth_first_search()</tt></a>.
@@ -144,9 +140,9 @@ edges for undirected graphs.
<td><tt>vis.gray_target(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the subset of non-tree edges who's target vertex is
This is invoked on the subset of non-tree edges whose target vertex is
colored gray at the time of examination. The color gray indicates
that the vertex is currently in the queue.
that the vertex is currently in the queue.
</td>
</tr>
@@ -155,7 +151,7 @@ that the vertex is currently in the queue.
<td><tt>vis.black_target(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on the subset of non-tree edges who's target vertex is
This is invoked on the subset of non-tree edges whose target vertex is
colored black at the time of examination. The color black indicates
that the vertex has been removed from the queue.
</td>
@@ -180,6 +176,27 @@ search tree and all of the adjacent vertices have been discovered
<li><a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>
</ul>
<a name="python"></a><h3>Python</h3>
To implement a model of the <tt>BFSVisitor</tt> concept in Python,
create a new class that derives from the <tt>BFSVisitor</tt> type of
the graph, which will be
named <tt><i>GraphType</i>.BFSVisitor</tt>. The events and syntax are
the same as with visitors in C++. Here is an example for the
Python <tt>bgl.Graph</tt> graph type:
<pre>
class count_tree_edges_bfs_visitor(bgl.Graph.BFSVisitor):
def __init__(self, name_map):
bgl.Graph.BFSVisitor.__init__(self)
self.name_map = name_map
def tree_edge(self, e, g):
(u, v) = (g.source(e), g.target(e))
print "Tree edge ",
print self.name_map[u],
print " -> ",
print self.name_map[v]
</pre>
<h3>See also</h3>
@@ -189,15 +206,15 @@ search tree and all of the adjacent vertices have been discovered
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
# Copyright (C) 2009 The Trustees of Indiana University.
# Copyright (C) 2010 Daniel Trebbien.
# Use, modification and distribution is 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)
# Authors: Jeremiah Willcock, Daniel Trebbien, Andrew Lumsdaine
for i in read_graphml read_graphviz write_graphml; do
rst2html.py -gdt --link-stylesheet --traceback --trim-footnote-reference-space --footnote-references=superscript --stylesheet=../../../rst.css $i.rst > $i.html
done
# Also see grid_graph_export_png.sh for figure conversions
# Stoer-Wagner images from Daniel Trebbien
fdp -s -n -Tgif -ostoer_wagner_imgs/digraph1.gif stoer_wagner_imgs/digraph1.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/digraph1-min-cut.gif stoer_wagner_imgs/digraph1-min-cut.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example.gif stoer_wagner_imgs/stoer_wagner-example.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example-c1.gif stoer_wagner_imgs/stoer_wagner-example-c1.dot
fdp -s -n -Tgif -ostoer_wagner_imgs/stoer_wagner-example-min-cut.gif stoer_wagner_imgs/stoer_wagner-example-min-cut.dot
dot -Tgif -ostoer_wagner_imgs/stoer_wagner.cpp.gif stoer_wagner_imgs/stoer_wagner.cpp.dot
+14 -18
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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>BasicMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -82,11 +78,11 @@ Element access is constant time.
void constraints() {
V&amp; elt = A[i][j];
const_constraints(A);
ignore_unused_variable_warning(elt);
ignore_unused_variable_warning(elt);
}
void const_constraints(const M&amp; A) {
const V&amp; elt = A[i][j];
ignore_unused_variable_warning(elt);
ignore_unused_variable_warning(elt);
}
M A;
I i, j;
@@ -97,11 +93,11 @@ Element access is constant time.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+40 -31
View File
@@ -1,25 +1,21 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Bellman Ford Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1>Bellman Ford Visitor Concept</H1>
<H1><img src="figs/python.gif" alt="(Python)"/>Bellman Ford Visitor Concept</H1>
This concept defines the visitor interface for <a
href="./bellman_ford_shortest.html"><tt>bellman_ford_shortest_paths()</tt></a>.
@@ -79,16 +75,6 @@ none
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Initialize Vertex</td>
<td><tt>vis.initialize_vertex(s, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on every vertex of the graph before the start of the
graph search.
</td>
</tr>
<tr>
<td>Examine Edge</td>
<td><tt>vis.examine_edge(e, g)</tt></td>
@@ -130,8 +116,8 @@ this method is invoked.
<td><tt>vis.edge_minimized(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
After the <tt>num_vertices(g)</tt> iterations through the edge set
of the graph is complete, one last iteration is made to test whether
After <tt>num_vertices(g)</tt> iterations through the edge set
of the graph are completed, one last iteration is made to test whether
each edge was minimized. If the edge is minimized then this function
is invoked.
</td>
@@ -156,20 +142,43 @@ when there is a negative cycle in the graph.
<li><a href="./bellman_visitor.html"><tt>bellman_visitor</tt></a>
</ul>
<a name="python"></a>
<h3>Python</h3>
To implement a model of the <tt>BellmanFordVisitor</tt> concept in Python,
create a new class that derives from the <tt>BellmanFordVisitor</tt> type of
the graph, which will be
named <tt><i>GraphType</i>.BellmanFordVisitor</tt>. The events and syntax are
the same as with visitors in C++. Here is an example for the
Python <tt>bgl.Graph</tt> graph type:
<pre>
class count_tree_edges_bellman_ford_visitor(bgl.Graph.BellmanFordVisitor):
def __init__(self, name_map):
bgl.Graph.BellmanFordVisitor.__init__(self)
self.name_map = name_map
def edge_relaxed(self, e, g):
(u, v) = (g.source(e), g.target(e))
print "Relaxed edge ",
print self.name_map[u],
print " -> ",
print self.name_map[v]
</pre>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+26 -19
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Bidirectional</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -65,6 +61,12 @@ edges incident to the vertex.
<Table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>bidirectional_graph_tag</tt>.
</td>
</tr>
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::in_edge_iterator</pre>
An in-edge iterator for a vertex <i>v</i> provides access to the
@@ -138,25 +140,30 @@ undirected graphs).
<PRE>
template &lt;class G&gt;
struct BidirectionalGraph_concept
struct BidirectionalGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::in_edge_iterator
in_edge_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
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>
@@ -165,9 +172,9 @@ undirected graphs).
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+18 -23
View File
@@ -1,22 +1,18 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Buffer</Title>
</HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -47,9 +43,9 @@ For a type to model the Buffer concept it must have the following members.
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <tt>value_type</tt> </td>
<tr> <td> <tt>value_type</tt> </td>
<td> The type of object stored in the Buffer. The value type
must be <A href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.</td>
must be <A href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>.</td>
</tr>
<tr> <td> <tt>size_type</tt> </td>
@@ -74,11 +70,11 @@ For a type to model the Buffer concept it must have the following members.
</tr>
<tr> <td> <tt>const T& top() const</tt> </td>
<td> Returns a const reference to some object in the Buffer.
<td> Returns a const reference to some object in the Buffer.
Precondition: <tt>empty()</tt> is <tt>false</tt>.</td>
</tr>
<tr> <td> <tt>void size() const</tt> </td>
<tr> <td> <tt>size_type size() const</tt> </td>
<td> Returns the number of objects in the Buffer.
Invariant: <tt>size() >= 0</tt>. </td>
</tr>
@@ -103,9 +99,8 @@ most linear time complexity in the size of the Generalized Queue.
<h3>Models</h3>
<UL>
<LI><a href="http://www.sgi.com/tech/stl/stack.html"><tt>std::stack</tt></a>
<LI><a href="../../pri_queue/queue.html"><tt>boost::queue</tt></a>
<LI><a href="../../pri_queue/p_queue.html"><tt>boost::priority_queue</tt></a>
<LI><a href="http://www.boost.org/sgi/stl/stack.html"><tt>std::stack</tt></a>
<LI><a href="../../../boost/pending/mutable_queue.hpp"><tt>boost::mutable_queue</tt></a>
</UL>
<p>
@@ -114,10 +109,10 @@ most linear time complexity in the size of the Generalized Queue.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University and C++ Library & Compiler Group/SGI (<A HREF="mailto:jsiek@engr.sgi.com">jsiek@engr.sgi.com</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University and C++ Library & Compiler Group/SGI (<A HREF="mailto:jsiek@engr.sgi.com">jsiek@engr.sgi.com</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: ColorValue Concept</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -32,9 +28,9 @@ mark which vertices have been visited.
<P>
<h3>Refinement of</h3> <a
href="http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a>
href="http://www.boost.org/sgi/stl/EqualityComparable.html">EqualityComparable</a>
and <a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a>
<h3>Notation</h3>
@@ -98,15 +94,15 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructibl
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+49 -21
View File
@@ -1,29 +1,25 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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>DFS Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1>DFS Visitor Concept</H1>
<H1><img src="figs/python.gif" alt="(Python)"/>DFS Visitor Concept</H1>
This concept defines the visitor interface for <a
href="./depth_first_search.html"><tt>depth_first_search()</tt></a>.
Users can define a class with the DFS Visitor interface and pass and
Users can define a class with the DFS Visitor interface and pass an
object of the class to <tt>depth_first_search()</tt>, thereby
augmenting the actions taken during the graph search.
@@ -153,6 +149,15 @@ undirected graph this method is never called.
</td>
</tr>
<tr>
<td>Finish Edge</td>
<td><tt>vis.finish_edge(e, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each non-tree edge as well as on each tree edge after
<tt>finish_vertex</tt> has been called on its target vertex.</td>
</tr>
<tr>
<td>Finish Vertex</td>
<td><tt>vis.finish_vertex(u, g)</tt></td>
@@ -161,7 +166,7 @@ undirected graph this method is never called.
This is invoked on vertex <tt>u</tt> after <tt>finish_vertex</tt> has
been called for all the vertices in the DFS-tree rooted at vertex
<tt>u</tt>. If vertex <tt>u</tt> is a leaf in the DFS-tree, then
the <tt>finish_vertex</tt> function is call on <tt>u</tt> after
the <tt>finish_vertex</tt> function is called on <tt>u</tt> after
all the out-edges of <tt>u</tt> have been examined.
</td>
</tr>
@@ -174,20 +179,43 @@ all the out-edges of <tt>u</tt> have been examined.
<li><a href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>
</ul>
<a name="python"></a>
<h3>Python</h3>
To implement a model of the <tt>DFSVisitor</tt> concept in Python,
create a new class that derives from the <tt>DFSVisitor</tt> type of
the graph, which will be
named <tt><i>GraphType</i>.DFSVisitor</tt>. The events and syntax are
the same as with visitors in C++. Here is an example for the
Python <tt>bgl.Graph</tt> graph type:
<pre>
class count_tree_edges_dfs_visitor(bgl.Graph.DFSVisitor):
def __init__(self, name_map):
bgl.Graph.DFSVisitor.__init__(self)
self.name_map = name_map
def tree_edge(self, e, g):
(u, v) = (g.source(e), g.target(e))
print "Tree edge ",
print self.name_map[u],
print " -> ",
print self.name_map[v]
</pre>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+43 -23
View File
@@ -1,25 +1,21 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Dijkstra Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1>Dijkstra Visitor Concept</H1>
<H1><img src="figs/python.gif" alt="(Python)"/>Dijkstra Visitor Concept</H1>
This concept defines the visitor interface for <a
href="./dijkstra_shortest_paths.html"><tt>dijkstra_shortest_paths()</tt></a>
@@ -69,7 +65,7 @@ the search.
<TR>
<TD><tt>DistanceMap</tt></TD>
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">Read/Write Property Map</a>.</TD>
<TD>A type that is a model of <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property Map</a>.</TD>
</TR>
<TR>
@@ -79,12 +75,12 @@ the search.
<TR>
<TD><tt>WeightMap</tt></TD>
<TD>A type that is a model of <a href="../../property_map/ReadWritePropertyMap.html">Readable Property Map</a>.</TD>
<TD>A type that is a model of <a href="../../property_map/doc/ReadWritePropertyMap.html">Readable Property Map</a>.</TD>
</TR>
<TR>
<TD><tt>w</tt></TD>
<TD>An object of type <tt>DistanceMap</tt>.</TD>
<TD>An object of type <tt>WeightMap</tt>.</TD>
</TR>
</table>
@@ -181,22 +177,46 @@ search tree and all of the adjacent vertices have been discovered
<h3>Models</h3>
<ul>
<li><a href="./ucs_visitor.html"><tt>ucs_visitor</tt></a>
<li><a href="./dijkstra_visitor.html"><tt>dijkstra_visitor</tt></a>
</ul>
<a name="python"></a>
<h3>Python</h3>
To implement a model of the <tt>DijkstraVisitor</tt> concept in Python,
create a new class that derives from the <tt>DijkstraVisitor</tt> type of
the graph, which will be
named <tt><i>GraphType</i>.DijkstraVisitor</tt>. The events and syntax are
the same as with visitors in C++. Here is an example for the
Python <tt>bgl.Graph</tt> graph type:
<pre>
class count_tree_edges_dijkstra_visitor(bgl.Graph.DijkstraVisitor):
def __init__(self, name_map):
bgl.Graph.DijkstraVisitor.__init__(self)
self.name_map = name_map
def edge_relaxed(self, e, g):
(u, v) = (g.source(e), g.target(e))
print "Relaxed edge ",
print self.name_map[u],
print " -> ",
print self.name_map[v]
</pre>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+22 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>EdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -58,6 +54,12 @@ edges in the graph.
<table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>edge_list_graph_tag</tt>.
</td>
</tr>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::edge_iterator</pre>
An edge iterator (obtained via <TT>edges(g)</TT>) provides access to
@@ -107,7 +109,7 @@ Return type: <TT>vertex_descriptor</TT>
<tr>
<TD><TT>target(e, g)</TT></TD>
<TD>
Returns the vertex descriptor for
Returns the vertex descriptor for
<i>v</i> of the edge <i>(u,v)</i> represented by <TT>e</TT>.<br>
Return type: <TT>vertex_descriptor</TT>
</TD>
@@ -141,11 +143,11 @@ must all return in constant time.
template &lt;class G&gt;
struct EdgeListGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::edge_iterator
typedef typename boost::graph_traits&lt;G&gt;::edge_iterator
edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;edge_iterator&gt; ));
p = edges(g);
E = num_edges(g);
@@ -174,9 +176,9 @@ must all return in constant time.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+13 -17
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek 2001
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>Edge Mutable Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -39,7 +35,7 @@ No additional associated types.
<ul>
<li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a>
<li><a name="sec:add_edge"><TT>add_edge(u, v, g)</TT></a>
<b>returns</b> <TT>std::pair&lt;edge_descriptor,&nbsp;bool&gt;</TT>
<br><br>
@@ -104,9 +100,9 @@ UNDER CONSTRUCTION
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+14 -18
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: EventVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -151,15 +147,15 @@ either a vertex or edge descriptor of the graph.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: EventVisitorList</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -23,7 +19,7 @@
An EventVisitorList is either an <a
href="./EventVisitor.html">EventVisitor</a>, or a list of
EventVisitor's combined using <tt>std::pair</tt>. Each graph algorithm
EventVisitors combined using <tt>std::pair</tt>. Each graph algorithm
defines visitor adaptors that convert an EventVisitorList into the
particular kind of visitor needed by the algorithm.
@@ -95,7 +91,7 @@ Now we can pass the resulting visitor object into
color.begin());
</pre>
For creating a list of more than two event visitors, nest calls to
For creating a list of more than two event visitors, you can nest calls to
<tt>std::make_pair</tt> in the following way:
<pre>
@@ -117,15 +113,15 @@ std::make_pair(<i>visitor1</i>,
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+43 -37
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,10 +22,9 @@ Graph
<P>
The Graph concept contains a few requirements that are common to all
the graph concepts. These include some associated types for
<tt>vertex_descriptor</tt>, <tt>edge_descriptor</tt>, etc., and the
<tt>num_vertices()</tt> and <tt>num_edges()</tt> functions. One should
<tt>vertex_descriptor</tt>, <tt>edge_descriptor</tt>, etc. One should
note that a model of Graph is <B>not</B> required to be a model of <a
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>,
so algorithms should pass graph objects by reference.
<P>
@@ -56,9 +51,9 @@ so algorithms should pass graph objects by reference.
A vertex descriptor corresponds to a unique vertex in an abstract
graph instance. A vertex descriptor must be
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</a>,
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>, and
<a href="http://www.sgi.com/tech/stl/EqualityComparable.html">Equality Comparable</a>.
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a>,
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>, and
<a href="http://www.boost.org/sgi/stl/EqualityComparable.html">Equality Comparable</a>.
</td>
</tr>
@@ -66,16 +61,15 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructib
<td><pre>boost::graph_traits&lt;G&gt;::edge_descriptor</pre>
An edge descriptor corresponds to a unique edge <i>(u,v)</i> in a
graph. An edge descriptor must be <a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</I>,
<a
href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>,
and <a href="http://www.sgi.com/tech/stl/EqualityComparable.html">Equality Comparable</a>.
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</I>,
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>, and
<a href="http://www.boost.org/sgi/stl/EqualityComparable.html">Equality Comparable</a>.
</td>
</tr>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::directed_category</pre>
The choices are <TT>directed_tag</TT> and <TT>undirected_tag</TT>.
This type shall be convertible to <TT>directed_tag</TT> or <TT>undirected_tag</TT>.
</td>
</tr>
@@ -91,9 +85,10 @@ are <TT>allow_parallel_edge_tag</TT> and <TT>disallow_parallel_edge_tag</TT>.
<td><pre>boost::graph_traits&lt;G&gt;::traversal_category</pre>
This describes the ways in which the vertices and edges of the
graph can be visited. The choices are <TT>incidence_graph_tag</TT>,
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
<TT>adjacency_matrix_tag</TT>.
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
<TT>adjacency_matrix_tag</TT>. You can also create your own
tag which should inherit from one or more of the above.
</td>
</tr>
@@ -101,7 +96,18 @@ graph can be visited. The choices are <TT>incidence_graph_tag</TT>,
<H3>Valid Expressions</H3>
None required.
<table border>
<tr>
<td><pre>boost::graph_traits&lt;G&gt;::null_vertex()</pre></td></TD>
<td>
Returns a special <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt> object which does not refer to
any vertex of graph object which type is <tt>G</tt>.
<td>
</tr>
</table>
<H3>Concept Checking Class</H3>
@@ -116,12 +122,12 @@ None required.
typedef typename boost::graph_traits&lt;G&gt;::traversal_category traversal_category;
void constraints() {
function_requires&lt; DefaultConstructibleConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;vertex_descriptor&gt; &gt;();
function_requires&lt; DefaultConstructibleConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; EqualityComparableConcept&lt;edge_descriptor&gt; &gt;();
function_requires&lt; AssignableConcept&lt;edge_descriptor&gt; &gt;();
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( AssignableConcept&lt;vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept&lt;edge_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( EqualityComparableConcept&lt;edge_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( AssignableConcept&lt;edge_descriptor&gt; ));
}
G g;
};
@@ -135,9 +141,9 @@ None required.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+29 -26
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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>IncidenceGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -60,6 +56,13 @@ efficient access to the out-edges of each vertex in the graph.
<Table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>incidence_graph_tag</tt>.
</td>
</tr>
<TR>
<TD>
<pre>boost::graph_traits&lt;G&gt;::out_edge_iterator</pre>
@@ -73,7 +76,7 @@ href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>.
<TR>
<TD><pre>boost::graph_traits&lt;G&gt;::degree_size_type</pre>
The unsigned intergral type used for representing the number
The unsigned integral type used for representing the number
out-edges or incident edges of a vertex.
</TD>
</TR>
@@ -103,10 +106,10 @@ Return type: <TT>vertex_descriptor</TT>
<TD>Returns an iterator-range providing access to the out-edges (for
directed graphs) or incident edges (for undirected graphs) of vertex
<TT>u</TT> in graph <TT>g</TT>. The source vertex of an edge obtained
via and out edge iterator is guaranteed (for both directed and
via an out edge iterator is guaranteed (for both directed and
undirected graphs) to be the vertex <tt>u</tt> used in the call to
<tt>out_edges(u, g)</tt> and the target vertex must the a vertex
adjacent to <tt>u</tt>.<a href="">[1]</a>
<tt>out_edges(u, g)</tt> and the target vertex must be a vertex
adjacent to <tt>u</tt>.<a href="#1">[1]</a>
<br>
Return type: <TT>std::pair&lt;out_edge_iterator, out_edge_iterator&gt;</TT>
</TD>
@@ -159,16 +162,16 @@ Therefore, the extra requirement is added that the out-edge connecting
{
typedef typename boost::graph_traits&lt;G&gt;::out_edge_iterator out_edge_iterator;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;out_edge_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;out_edge_iterator&gt; ));
p = out_edges(v, g);
p = out_edges(u, g);
e = *p.first;
u = source(e, g);
v = target(e, g);
}
void const_constraints(const G&amp; g) {
p = out_edges(v, g);
p = out_edges(u, g);
e = *p.first;
u = source(e, g);
v = target(e, g);
@@ -185,15 +188,15 @@ Therefore, the extra requirement is added that the out-edge connecting
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+19 -23
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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>IteratorConstructibleGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ IteratorConstructibleGraph
The IteratorConstructibleGraph concept describes the interface for
graph types that can be constructed using a kind of edge iterator. The
edge iterator can be any <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
that dereferences to a pair of integers <i>(i,j)</i>, which represent
an edge that should be in the graph. The two integers <i>i</i> and
<i>j</i> represent vertices where <i>0 <= i < |V|</i> and <i>0 <= j <
@@ -48,20 +44,20 @@ the second constructor can be more efficient than the first.
The following exampe creates two graph objects from an array of edges
(vertex pairs). The type <tt>Edge*</tt> satisfies the requirements for
an <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
and can therefore be used to construct a graph.
<pre>
typedef ... IteratorConstructibleGraph;
typedef boost::graph_traits<IteratorConstructibleGraph> Traits;
typedef std::pair<Traits::vertices_size_type,
typedef std::pair<Traits::vertices_size_type,
Traits::vertices_size_type> Edge;
Edge edge_array[] =
{ Edge(0,1), Edge(0,2), Edge(0,3), Edge(0,4), Edge(0,5),
Edge(1, 2), Edge(1,5), Edge(1,3),
Edge(2, 4), Edge(2,5),
Edge(3, 2),
Edge(3, 2),
Edge(4, 3), Edge(4,1),
Edge(5, 4) };
Edge* first = edge_array,
@@ -69,7 +65,7 @@ and can therefore be used to construct a graph.
IteratorConstructibleGraph G1(first, last);
// do something with G1 ...
Traits::vertices_size_type size_V = 6;
Traits::edges_size_type size_E = sizeof(edge_array)/sizeof(Edge);
IteratorConstructibleGraph G2(first, last, size_V, size_E);
@@ -151,15 +147,15 @@ constructor lacking the graph size information.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+99
View File
@@ -0,0 +1,99 @@
<!DOCTYPE html>
<!--
Copyright Daniel Trebbien 2010.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or the copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<title>KeyedUpdatableQueue</title>
</head>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:KeyedUpdatableQueue">KeyedUpdatableQueue</a></h2>
<p>A <i>KeyedUpdatableQueue</i> is a refinement of the <a href="./UpdatableQueue.html">UpdatableQueue</a> concept.
It requires that models order the contained values by their <i>keys</i>, to which
values are mapped via a read/write key map.
<h3>Notation</h3>
<table>
<tr> <td> <tt>Q</tt> </td> <td> is a type that models KeyedUpdatableQueue. </td></tr>
<tr> <td> <tt>T</tt> </td> <td> is the value type of <tt>Q</tt>. </td></tr>
</table>
<h3>Members</h3>
For a type to model the KeyedUpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./UpdatableQueue.html">UpdatableQueue</a>:
<p>
<table border="1">
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <tt>key_type</tt> </td>
<td> The type of keys that are associated with values </td>
</tr>
<tr> <td> <tt>key_map</tt> </td>
<td> The key property map type. This type must model <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write Property Map</a>. </td>
</tr>
<tr> <td> <tt>key_map keys() const</tt> </td>
<td> Returns the key map </td>
</tr>
</table>
<h3>Concept Checking Class</h3>
<p><a href="../../../boost/graph/buffer_concepts.hpp"><tt>boost/graph/buffer_concepts.hpp</tt></a>
<pre>
template &lt;class Q&gt;
struct KeyedUpdatableQueueConcept
{
typedef typename Q::key_type key_type;
typedef typename Q::key_map key_map;
void constraints() {
BOOST_CONCEPT_ASSERT(( UpdatableQueue&lt;Q&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap&lt; key_map, typename Buffer&lt;Q&gt;::value_type &gt; ));
}
void const_constraints(const Q&amp; cq) {
km = cq.keys();
k = get(km, g_ct);
}
static const typename Buffer&lt;Q&gt;::value_type g_ct;
key_type k;
key_map km;
Q q;
};
</pre>
<h3>Models</h3>
<ul>
<li><tt>boost::d_ary_heap_indirect</tt></a>
</ul>
<br>
<hr>
<table>
<tr>
<td>Copyright&nbsp;&copy;&nbsp;2010</td>
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
</td>
</tr>
</table>
</body>
</html>
+7 -1
View File
@@ -1,3 +1,9 @@
# Copyright (c) 2002 Trustees of Indiana University
#
# 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)
DVIPS = dvips
LATEX = latex
@@ -35,7 +41,7 @@ RESULT = pdf
epstopdf $*.eps
.dot.eps:
dot -Tps -o $*.eps $*.dot
dot -Tps -o $*.eps $*.dot
.w.tex: /afs/nd.edu/user11/jsiek/.jweb
jweb -np $*.w
+17 -21
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2001
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>Monoid</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -37,7 +33,7 @@ The element type must be a model of <a
href="../../utility/Assignable.html">Assignable</a> and <a
href="../../utility/CopyConstructible.html">CopyConstructible</a>.
The function object type must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>.
href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>.
<h3>Notation</h3>
@@ -78,7 +74,7 @@ Return type: <TT>X</TT>
</TR>
<tr>
<TD><TT>a&nbsp;==&nbsp;b)</TT></TD>
<TD><TT>a&nbsp;==&nbsp;b</TT></TD>
<TD>Returns true if <tt>a</tt> and <tt>b</tt> represent
the same element of <i>S</i>.<br>
Return type: <TT>bool</TT>
@@ -86,7 +82,7 @@ Return type: <TT>bool</TT>
</TR>
<tr>
<TD><TT>a&nbsp;!=&nbsp;b)</TT></TD>
<TD><TT>a&nbsp;!=&nbsp;b</TT></TD>
<TD>Returns true if <tt>a</tt> and <tt>b</tt> represent
different elements of <i>S</i>.<br>
Return type: <TT>bool</TT>
@@ -112,15 +108,15 @@ Return type: <TT>bool</TT>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+17 -21
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>MutableGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -62,8 +58,8 @@ edges and vertices.
<TR>
<TD><tt>p</tt></TD>
<TD>is an object of a type that models <a
href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>
and whose argument type matches the <tt>edge_descriptor</tt> type.
href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>
and whose argument type matches the <tt>edge_descriptor</tt> type.
</TR>
</table>
@@ -254,7 +250,7 @@ is no longer a valid vertex descriptor.
struct MutableIncidenceGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraph&lt;G&gt; ));
remove_edge(iter, g);
remove_out_edge_if(u, p, g);
}
@@ -269,7 +265,7 @@ is no longer a valid vertex descriptor.
struct MutableBidirectionalGraphConcept
{
void constraints() {
function_requires&lt; MutableIncidenceGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableIncidenceGraph&lt;G&gt; ));
remove_in_edge_if(u, p, g);
}
G g;
@@ -282,7 +278,7 @@ is no longer a valid vertex descriptor.
struct MutableEdgeListGraphConcept
{
void constraints() {
function_requires&lt; MutableGraph&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraph&lt;G&gt; ));
remove_edge_if(p, g);
}
G g;
@@ -295,9 +291,9 @@ is no longer a valid vertex descriptor.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+15 -19
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>MutablePropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -97,14 +93,14 @@ the value of the properties can be given.
<tr>
<TD><TT>add_edge(u,&nbsp;v,&nbsp;ep,&nbsp;g)</TT></TD>
<TD>Inserts the edge <i>(u,v)</i> into the graph, and
copies object <TT>ep</TT> into the property property for that edge.<br>
copies object <TT>ep</TT> into the property for that edge.<br>
Return type: <TT>std::pair&lt;edge_descriptor, bool&gt;</TT></TD>
</TR>
<tr>
<TD><TT>add_vertex(vp,&nbsp;g)</TT></TD>
<TD>
Add a new vertex to the graph and copy <TT>vp</TT> into the property
Add a new vertex to the graph and copy <TT>vp</TT> into the
property for the new vertex. The <TT>vertex_descriptor</TT> for the new
vertex is returned.<br>
Return type: <TT>vertex_descriptor</TT>
@@ -129,7 +125,7 @@ Return type: <TT>vertex_descriptor</TT>
{
typedef typename boost::graph_traits&lt;G&gt;::edge_descriptor edge_descriptor;
void constraints() {
function_requires&lt; MutableGraphConcept&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( MutableGraphConcept&lt;G&gt; ));
v = add_vertex(vp, g);
p = add_edge(u, v, ep, g);
}
@@ -146,9 +142,9 @@ Return type: <TT>vertex_descriptor</TT>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+178
View File
@@ -0,0 +1,178 @@
<html><head><!-- Copyright 2007 Aaron Windsor
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)
-->
<title>Planar Embedding Concept</title>
</head>
<body alink="#ff0000"
bgcolor="#ffffff"
link="#0000ee"
text="#000000"
vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear="">
<h1>Planar Embedding Concept</h1>
A planar embedding is an important intermediate representation of a drawing
of a planar graph. Instead of specifying the absolute positions of the vertices
and edges in the plane, a planar embedding specifies their positions relative
to one another. A planar embedding consists of a sequence, for each vertex in
the graph, of all of the edges incident on that vertex in the order in which
they are to be drawn around that vertex.
<p>
A planar embedding is a refinement of
<a href="../../property_map/doc/LvaluePropertyMap.html">LValuePropertyMap</a> that
places additional restrictions the <tt>value_type</tt> used in the property
map.
</p><h3>Notation</h3>
<table>
<tbody>
<tr>
<td> <tt>Embedding</tt> </td>
<td> is a type that models the Planar Embedding concept.</td>
</tr>
<tr>
<td> <tt>embedding</tt> </td>
<td> is an object of type <tt>Embedding</tt>. </td>
</tr>
<tr>
<td> <tt>Graph</tt> </td>
<td> is the type of the underlying graph.</td>
</tr>
<tr>
<td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>.
</td>
</tr>
<tr>
<td> <tt>v</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::vertex_descriptor
</tt>.</td>
</tr><tr>
<td>
</td></tr></tbody></table>
<h3>Associated Types</h3>
<table border="1">
<tbody><tr>
<td> Const Iterator </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt>
</td>
<td> The iterator type used to iterate over the ordering of the edges in the
planar embedding of a particular vertex
</td>
</tr>
</tbody></table>
<h3>Valid Expressions</h3>
<p>
<table border="1">
<tbody><tr><th>Expression</th><th>Return Type</th><th>Description</th>
</tr><tr>
<td> <tt>embedding[v].begin()</tt> </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt></td>
<td> Returns an iterator to the beginning of the range of edges in the
embedding around vertex v</td>
</tr>
<tr>
<td> <tt>embedding[v].end()</tt> </td>
<td> <tt>boost::property_traits&lt;Embedding&gt;::value_type::const_iterator
</tt></td>
<td> Returns an iterator to the end of the range of edges in the
embedding around vertex v</td>
</tr>
<tr>
<td> <tt>embedding[v].clear()</tt> </td>
<td> <tt>void</tt></td>
<td> Clears all edges in the embedding around a vertex <tt>v</tt></td>
</tr>
<tr>
<td> <tt>embedding[v].push_back(e)</tt> </td>
<td> <tt>void</tt></td>
<td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges
around the vertex <tt>v</tt> </td>
</tr>
</tbody></table>
</p><h3>Complexity Guarantees</h3>
Starting with an empty embedding, any mixed sequence of <i>n</i> calls to a
particular vertex's <tt>push_back</tt> and <tt>clear</tt> should take
<i>O(n)</i> time.
<h3>Models</h3>
Any LValue property map that maps vertices to a <tt>std::vector</tt>,
<tt>std::list</tt>, or <tt>std::deque</tt> models this
concept. Below is an example of using this approach to create a model of
PlanarEmbedding:
<pre>
#include &lt;boost/property_map/property_map.hpp&gt;
#include &lt;vector&gt;
...
// Assume a graph type "Graph" defined somewhere above and
// an instance of Graph in a variable g.
// A typedef for the storage - a vector of vectors of edge descriptors
typedef
std::vector&lt; std::vector&lt; graph_traits&lt;Graph&gt;::edge_descriptor &gt; &gt;
planar_embedding_storage_t;
// A typedef for the iterator property map, assuming the graph has
// an interior vertex index map
typedef
boost::iterator_property_map&lt; planar_embedding_storage_t::iterator,
property_map&lt;Graph, vertex_index_t&gt;::type
&gt;
planar_embedding_t;
// Create an instance of the storage and the property map
planar_embedding_storage_t planar_embedding_storage(num_vertices(g));
planar_embedding_t planar_embedding(planar_embedding_storage.begin(),
get(vertex_index, g)
);
// planar_embedding can now be passed to any function expecting a model
// of PlanarEmbedding.
</pre>
<p>
<br>
</p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</body></html>
+148
View File
@@ -0,0 +1,148 @@
<HTML>
<!-- Copyright 2007 Aaron Windsor
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>Planar Face Visitor Concept</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>Planar Face Visitor Concept</H1>
This concept defines the visitor interface for
<a href="./planar_face_traversal.html"><tt>planar_face_traversal</tt></a>.
Users can define a class with the Planar Face Visitor interface and pass an
object of the class to <tt>planar_face_traversal</tt>, thereby augmenting the
actions taken during the traversal. Note that objects passed to
<tt>planar_face_traversal</tt> are passed by reference.
<h3>Notation</h3>
<table>
<tbody><tr>
<td><tt>V</tt></td>
<td>A type that is a model of Planar Face Visitor.</td>
</tr>
<tr>
<td><tt>vis</tt></td>
<td>An object of type <tt>V</tt>.</td>
</tr>
<tr>
<td><tt>G</tt></td>
<td>A type that is a model of Graph.</td>
</tr>
<tr>
<td><tt>e</tt></td>
<td>An object of type <tt>boost::graph_traits&lt;G&gt;::edge_descriptor</tt>.
</td>
</tr>
<tr>
<td><tt>v</tt></td>
<td>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.
</td>
</tr>
</tbody></table>
<h3>Valid Expressions</h3>
<table border="1">
<tbody><tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Begin Traversal</td>
<td><tt>vis.begin_traversal()</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked once per traversal, before the traversal begins.
</td>
</tr>
<tr>
<td>Begin Face</td>
<td><tt>vis.begin_face()</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked once for each face, before any vertices or edges on the face
are visited.
</td>
</tr>
<tr>
<td>Next Vertex</td>
<td><tt>vis.next_vertex(v)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when a vertex is encountered while traversing a face.
</td>
</tr>
<tr>
<td>Next Edge</td>
<td><tt>vis.next_edge(e)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked when an edge is encountered while traversing a face.
</td>
</tr>
<tr>
<td>End Face</td>
<td><tt>vis.end_face()</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked once for each face, after all vertices and edges on the face
are visited.
</td>
</tr>
<tr>
<td>End Traversal</td>
<td><tt>vis.end_traversal()</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked once per traversal, after the traversal ends.
</td>
</tr>
</tbody></table>
<h3>Models</h3>
<ul>
<li> The file <a href="../../../boost/graph/planar_face_traversal.hpp">
<tt>planar_face_traversal.hpp</tt></a> contains a class
<tt>planar_face_traversal_visitor</tt> that implements empty actions for
all event points of a Planar Face Visitor. In the case where only a few of the
event points of Planar Face Visitor need to be implemented, one can derive from
<tt>planar_face_traversal_visitor</tt> and only implement the necessary event
points. <li> The implementation of <a href="./make_maximal_planar.html">
<tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
a model of Planar Face Visitor.
</li>
</ul>
<br>
<HR>
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</BODY>
</HTML>
+19 -22
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>PropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ PropertyGraph
A PropertyGraph is a graph that has some property associated with each
of the vertices or edges in the graph. As a given graph may have
several properties associated with each vertex or edge, a tag is used
to identity which property is being accessed. The graph provides a
to identify which property is being accessed. The graph provides a
function which returns a property map object.
<P>
@@ -94,7 +90,8 @@ function which returns a property map object.
<td><pre>boost::property_map&lt;G, PropertyTag&gt;::type</pre>
The type of the property map for the property specified by
<TT>PropertyTag</TT>. This type must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a> with a key type the same as the graph's vertex or descriptor type.
href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
with a key type the same as the graph's vertex or edge descriptor type.
</td>
</tr>
@@ -102,7 +99,7 @@ href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a> wit
<td><pre>boost::property_map&lt;G, PropertyTag&gt;::const_type</pre>
The type of the const property map for the property specified by
<TT>PropertyTag</TT>. This type must be a model of <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>
href="../../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a>
with a key type the same as the graph's vertex or edge descriptor type.
</td>
</tr>
@@ -176,9 +173,9 @@ The <tt>get()</tt> property map function must be constant time.
typedef typename property_map&lt;G, PropertyTag&gt;::type Map;
typedef typename property_map&lt;G, PropertyTag&gt;::const_type const_Map;
void constraints() {
function_requires&lt; GraphConcept&lt;G&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Map, X&gt; &gt;();
function_requires&lt; ReadablePropertyMapConcept&lt;const_Map, X&gt; &gt;();
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept&lt;Map, X&gt; ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;const_Map, X&gt; ));
Map pmap = get(PropertyTag(), g);
pval = get(PropertyTag(), g, x);
@@ -205,9 +202,9 @@ The <tt>get()</tt> property map function must be constant time.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+14 -18
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Property</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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 +67,7 @@ href="../../../boost/pending/property.hpp"><tt>boost/pending/property.hpp</tt></
<h3>Refinement of</h3>
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">Default Constructible</a>
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">Default Constructible</a>
<h3>Models</h3>
@@ -100,7 +96,7 @@ href="../../../boost/graph/properties.hpp"><tt>boost/graph/properties.hpp</tt></
<a href="./PropertyGraph.html">PropertyGraph</a>
and
<a href="../../property_map/property_map.html">Property Map Concepts</a>
<a href="../../property_map/doc/property_map.html">Property Map Concepts</a>
<h3>Notes</h3>
@@ -113,9 +109,9 @@ type is also required to specialize
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+99
View File
@@ -0,0 +1,99 @@
<HTML>
<!--
Copyright (c) Matyas Egyhazy 2008
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: TSP Tour Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>TSP Tour Visitor concept</H1>
This concept defines the visitor interface for <a
href="./metric_tsp_approx.html"><tt>metric_tsp_approx()</tt></a>
and related algorithms. The user can create a class that matches this
interface, and then pass objects of the class into
<tt>metric_tsp_approx()</tt> to augment the actions taken during
the search.
<h3>Refinement of</h3>
none
<h3>Notation</h3>
<Table>
<TR>
<TD><tt>V</tt></TD>
<TD>A type that is a model of Dijkstra Visitor.</TD>
</TR>
<TR>
<TD><tt>vis</tt></TD>
<TD>An object of type <tt>V</tt>.</TD>
</TR>
<TR>
<TD><tt>G</tt></TD>
<TD>A type that is a model of Graph.</TD>
</TR>
<TR>
<TD><tt>g</tt></TD>
<TD>An object of type <tt>G</tt>.</TD>
</TR>
<TR>
<TD><tt>v</tt></TD>
<TD>An object of type <tt>boost::graph_traits&lt;G&gt;::vertex_descriptor</tt>.</TD>
</TR>
</table>
<h3>Associated Types</h3>
none
<p>
<h3>Valid Expressions</h3>
<table border>
<tr>
<th>Name</th><th>Expression</th><th>Return Type</th><th>Description</th>
</tr>
<tr>
<td>Visit Vertex</td>
<td><tt>vis.visit_vertex(v, g)</tt></td>
<td><tt>void</tt></td>
<td>
This is invoked on each vertex of the graph when it is visited as part of the TSP tour.
</td>
</tr>
</table>
<h3>Models</h3>
<ul>
<li><a href="tsp_tour_visitor.html"><tt>tsp_tour_visitor</tt></a>
<li><a href="tsp_tour_len_visitor.html"><tt>tsp_tour_len_tsp_visitor</tt></a>
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2008</TD><TD>
Matyas Egyhazy</TD></TR></TABLE>
</BODY>
</HTML>
+100
View File
@@ -0,0 +1,100 @@
<!DOCTYPE html>
<!--
Copyright Daniel Trebbien 2010.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or the copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<title>UpdatableQueue</title>
</head>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:UpdatableQueue">UpdatableQueue</a></h2>
<p>An <i>UpdatableQueue</i> is a refinement of the <a href="./Buffer.html">Buffer</a> concept that additionally requires that the Buffer be updatable.
<p>Implicit in the definition is an ordering of values. Though access to the order is not required, types that model UpdatableQueue must document how an object of the type orders values so that a program may change the position of a given value in the ordering. For example, an UpdatableQueue may choose to order values by using a property map, and a value <tt>v1</tt> is considered less than a value <tt>v2</tt> if <tt><nobr>get(pm, v1) &lt; get(pm, v2)</nobr></tt>. A program can update the properties of values, thus changing the order of values in the UpdatableQueue, and notify the UpdatableQueue of the specific values that have a different position in the ordering by calling the <tt>update</tt> member of the UpdatableQueue on each.
<p>A program that modifies the order must notify the UpdatableQueue of values that may have different positions in the ordering since they were inserted or last updated.
<h3>Notation</h3>
<table>
<tr> <td> <tt>Q</tt> </td> <td> is a type that models UpdatableQueue. </td></tr>
<tr> <td> <tt>T</tt> </td> <td> is the value type of <tt>Q</tt>. </td></tr>
</table>
<h3>Members</h3>
For a type to model the UpdatableQueue concept it must have the following members
in addition to the members that are required of types that model <a href="./Buffer.html">Buffer</a>:
<p>
<table border="1">
<tr> <td><b>Member</b></td> <td><b>Description</b></td> </tr>
<tr> <td> <a name="concept:UpdatableQueue:update"><tt>void update(const T& t)</tt></a> </td>
<td> Informs the UpdatableQueue that the program has modified the position of <tt>t</tt> in the ordering </td>
</tr>
<tr> <td> <tt><i>unspecified-bool-type</i> contains(const T& t) const</tt> </td>
<td> Returns whether the queue contains <tt>t</tt> </td>
</tr>
</table>
<h3>Concept Checking Class</h3>
<p><a href="../../../boost/graph/buffer_concepts.hpp"><tt>boost/graph/buffer_concepts.hpp</tt></a>
<pre>
template &lt;class Q&gt;
struct UpdatableQueueConcept
{
void constraints() {
BOOST_CONCEPT_ASSERT(( Buffer&lt;Q&gt; ));
q.update(g_ct);
}
void const_constraints(const Q&amp; cq) {
if (cq.contains(g_ct));
}
static const typename Buffer&lt;Q&gt;::value_type g_ct;
Q q;
};
</pre>
<h3>Futher Refinements</h3>
<ul>
<li><a href="#concept%3AUpdatablePriorityQueue">UpdatablePriorityQueue</a>
<li><a href="./KeyedUpdatableQueue.html">KeyedUpdatableQueue</a>
</ul>
<h2><a name="concept:UpdatablePriorityQueue">UpdatablePriorityQueue</a></h2>
<p>An <i>UpdatablePriorityQueue</i> is a slight refinement of <a href="#concept%3AUpdatableQueue">UpdatableQueue</a>
that imposes the requirement that a program may not increase the position of a value that is held in the queue. That is,
if a value <tt>v</tt> had position <i>n</i> in the ordering, a program may update the position of <tt>v</tt> only to 0, 1, ..., <i>n</i>&nbsp;-&nbsp;1, or <i>n</i>, where 0 is the top of the queue.
<p>The behavior when a program attempts to increase a value's position in the ordering is undefined.
<br>
<hr>
<table>
<tr>
<td>Copyright&nbsp;&copy;&nbsp;2010</td>
<td>Daniel Trebbien (<a href="mailto:dtrebbien@gmail.com">dtrebbien@gmail.com</a>)
</td>
</tr>
</table>
</body>
</html>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>VertexAndEdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -31,7 +27,7 @@ requirements are added.
<H3>Refinement of</H3>
<a href="./VertexListGraph.html">VertexListGraph</a>,
<a href="./VertexListGraph.html">VertexListGraph</a>,
<a href="./EdgeListGraph.html">EdgeListGraph</a>
@@ -52,11 +48,11 @@ requirements are added.
<P>
<PRE>
template &lt;class G&gt;
struct VertexAndEdgeListGraph
struct VertexAndEdgeListGraphConcept
{
void constraints() {
function_requires&lt; VertexListGraphConcept&lt;G&gt; &gt;();
function_requires&lt; EdgeListGraphConcept&lt;G&gt; &gt;();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept&lt;G&gt; ));
}
};
</PRE>
@@ -66,9 +62,9 @@ requirements are added.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+25 -24
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>VertexListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -25,18 +21,23 @@ VertexListGraph
</H2>
The <I>VertexListGraph</I> concept refines the <a
href="./AdjacencyGraph.html">AdjacencyGraph</a> concept, and adds the
requirement for efficient traversal of all the vertices in the graph.
href="./Graph.html">Graph</a> concept, and adds the requirement for
efficient traversal of all the vertices in the graph.
<H3>Refinement of</H3>
<a href="./IncidenceGraph.html">IncidenceGraph</a>
and <a href="./AdjacencyGraph.html">AdjacencyGraph</a>
<a href="./Graph.html">Graph</a>
<H3>Associated Types</H3>
<Table border>
<tr>
<td><tt>boost::graph_traits&lt;G&gt;::traversal_category</tt><br><br>
This tag type must be convertible to <tt>vertex_list_graph_tag</tt>.
</td>
</tr>
<TR>
<TD><tt>boost::graph_traits&lt;G&gt;::vertex_iterator</tt><br><br>
A vertex iterator (obtained via <TT>vertices(g)</TT>) provides access
@@ -117,12 +118,12 @@ groups these requirements together, hence the VertexListGraph concept.
template &lt;class G&gt;
struct VertexListGraphConcept
{
typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator
typedef typename boost::graph_traits&lt;G&gt;::vertex_iterator
vertex_iterator;
void constraints() {
function_requires&lt; IncidenceGraphConcept&lt;G&gt; &gt;();
function_requires&lt; AdjacencyGraphConcept&lt;G&gt; &gt;();
function_requires&lt; MultiPassInputIteratorConcept&lt;vertex_iterator&gt; &gt;();
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;vertex_iterator&gt; ));
p = vertices(g);
V = num_vertices(g);
@@ -145,9 +146,9 @@ groups these requirements together, hence the VertexListGraph concept.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+17 -21
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek 2001
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>Vertex Mutable Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -32,7 +28,7 @@ implementation does the rest.
<H3>Refinement of</H3>
<a href="./Graph.html">Graph</a> and <a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a>
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a>
<H3>Associated Types</H3>
@@ -41,7 +37,7 @@ No additional associated types.
<h3>Valid Expressions</h3>
<ul>
<li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a>
<li><a name="sec:add_vertex"><TT>add_vertex(g)</TT></a>
<b>returns</b> <TT>vertex_descriptor</TT>
<br><br>
@@ -60,7 +56,7 @@ No additional associated types.
<br>
<b> Postconditions: </b> <TT>num_vertices(g)</TT> is one less; <i>u</i>
no longer appears in the vertex set of the graph and it
is no longer a valid vertex descriptor.
is no longer a valid vertex descriptor.
</li>
</ul>
@@ -68,7 +64,7 @@ No additional associated types.
<H3>Complexity guarantees</H3>
<ul>
<li> Vertex insertion is guaranteed to be amortized constant time.
<li> Vertex removal is at most <TT>O(|E| + |V|)</TT>.
</ul>
@@ -77,11 +73,11 @@ No additional associated types.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<A HREF="../../../people/jeremy_siek.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+14 -18
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Acknowledgements</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -66,15 +62,15 @@ Science of the U.S. Department of Energy.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+11 -4
View File
@@ -1,4 +1,11 @@
<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>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
@@ -9,7 +16,7 @@
<body bgcolor="#FFFFFF" text="#000000">
<img src="../../../c++boost.gif" alt="c++boost.gif (8819 bytes)"
<img src="../../../boost.png" alt="boost.png (6897 bytes)"
align="center" width="277" height="86">
<h1>Adjacency Iterator Adaptor</h1>
@@ -35,7 +42,7 @@ namespace boost {
template &lt;class Graph, class VertexDescriptor, class OutEdgeIter&gt;
class adjacency_iterator_generator {
public:
typedef <a href="../../utility/iterator_adaptors.htm#iterator_adaptor">iterator_adaptor</a>&lt;...&gt; type;
typedef <a href="../../iterator/doc/iterator_adaptor.html">iterator_adaptor</a>&lt;...&gt; type;
};
}
</pre>
@@ -108,12 +115,12 @@ href="../../utility/MultiPassInputIterator.html">Multi-Pass Input Iterator</a>
The adjacency iterator type implements the member functions and
operators required of the <a
href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">Random Access Iterator</a>
href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">Random Access Iterator</a>
concept, except that the <tt>reference</tt> type is the same as the <tt>value_type</tt>
so <tt>operator*()</tt> returns by-value. In addition it has the following constructor:
<pre>
adjacency_iterator_generator::type(const OutEdgeIter&amp; it)
adjacency_iterator_generator::type(const OutEdgeIter&amp; it, const Graph* g)
</pre>
<hr>
+213 -107
View File
@@ -1,29 +1,25 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Adjacency List</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:adjacency-list-class"></A>
<pre>
adjacency_list&lt;EdgeList, VertexList, Directed,
adjacency_list&lt;OutEdgeList, VertexList, Directed,
VertexProperties, EdgeProperties,
GraphProperties&gt;
GraphProperties, EdgeList&gt;
</pre>
</H1>
@@ -37,24 +33,24 @@ href="graph_theory_review.html#sec:adjacency-list-representation">adjacency-list
is basically a two-dimensional structure, where each element of the
first dimension represents a vertex, and each of the vertices contains
a one-dimensional structure that is its edge list. <a
href="fig:adj-list-graph">Figure 1</a> shows an adjacency list
href="#fig:adj-list-graph">Figure 1</a> shows an adjacency list
representation of a directed graph.
<P></P>
<DIV ALIGN="center"><A NAME="fig:adj-list-graph"></A><A NAME="1509"></A>
<DIV ALIGN="center"><A NAME="fig:adj-list-graph"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency List Representation of a Directed Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/adj-matrix-graph.gif" width="386" height="284"></TD>
<TD><IMG SRC="./figs/adj-list.gif" width="62" height="122"></TD></TR>
<TR><TD><IMG SRC="./figs/adj-matrix-graph2.gif" width="386" height="284"></TD>
<TD><IMG SRC="./figs/adj-list2.gif" width="62" height="122"></TD></TR>
</TABLE>
</DIV><P></P>
The
<TT>VertexList</TT> template parameter of the <TT>adjacency_list</TT>
class controls what kind of container is used to represent the outer
two-dimensional container. The <TT>EdgeList</TT> template parameter
two-dimensional container. The <TT>OutEdgeList</TT> template parameter
controls what kind of container is used to represent the edge
lists. The choices for <TT>EdgeList</TT> and <TT>VertexList</TT> will
lists. The choices for <TT>OutEdgeList</TT> and <TT>VertexList</TT> will
determine the space complexity of the graph structure, and will
determine the time complexity of the various graph operations. The
possible choices and tradeoffs are discussed in Section <A
@@ -67,14 +63,14 @@ directed, undirected, or directed with access to both the in-edges and
out-edges (which we call bidirectional). The bidirectional graph takes
up twice the space (per edge) of a directed graph since each edge will
appear in both an out-edge and in-edge list. <a
href="fig:undir-adj-list-graph">Figure 2</a> shows an adjacency list
href="#fig:undir-adj-list-graph">Figure 2</a> shows an adjacency list
representation of an undirected graph.
<P></P>
<DIV ALIGN="center"><A NAME="fig:undir-adj-list-graph"></A><A NAME="1509"></A>
<DIV ALIGN="center"><A NAME="fig:undir-adj-list-graph"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG> Adjacency List Representation of an Undirected Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph.gif" width="260" height="240"></TD>
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph2.gif" width="260" height="240"></TD>
<TD><IMG SRC="./figs/undir-adj-list.gif" width="62" height="122"></TD></TR>
</TABLE>
</DIV><P></P>
@@ -90,7 +86,7 @@ Section <A HREF="./using_adjacency_list.html">Using
<P>
The example in <a
href="../example/family-tree-eg.cpp"><tt>examples/family-tree-eg.cpp</tt></a>
href="../example/family_tree.cpp"><tt>examples/family_tree.cpp</tt></a>
shows how to represent a family tree with a graph.
<H3>Template Parameters</H3>
@@ -101,7 +97,7 @@ shows how to represent a family tree with a graph.
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EdgeList</TT></TD>
<TR><TD><TT>OutEdgeList</TT></TD>
<TD>The selector for the container used to represent the
edge-list for each of the vertices.</TD>
<TD><TT>vecS</TT></TD>
@@ -138,22 +134,33 @@ shows how to represent a family tree with a graph.
<TD><TT>no_property</TT></TD>
</TR>
<TR><TD><TT>EdgeList</TT></TD>
<TD>The selector for the container used to represent the
edge-list for the graph.</TD>
<TD><TT>listS</TT></TD>
</TR>
</TABLE>
<P>
<H3>Model of</H3>
<P>
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./MutablePropertyGraph.html">MutablePropertyGraph</a>
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./MutablePropertyGraph.html">MutablePropertyGraph</a>,
<a href="../../utility/CopyConstructible.html">CopyConstructible</a>,
<a href="../../utility/Assignable.html">Assignable</a>,
and <a href="../../serialization/doc/index.html">Serializable</a>.
<P>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/adjacency_list.hpp"><TT>boost/graph/adjacency_list.hpp</TT></a>
<a href="../../../boost/graph/adjacency_list.hpp"><TT>boost/graph/adjacency_list.hpp</TT></a><br><br>
Also, the serialization functionality is in
<a href="../../../boost/graph/adj_list_serialize.hpp"><tt>boost/graph/adj_list_serialize.hpp</tt></a>.
<P>
<H2>Vertex and Edge Properties</H2>
@@ -168,10 +175,13 @@ properties is described in Section <A
HREF="./using_adjacency_list.html#sec:adjacency-list-properties">Internal
Properties </A>. The property maps are objects that implement the
interface defined in Section <A
HREF="../../property_map/property_map.html">Property Map
Concepts</A>. The property maps obtained from the
HREF="../../property_map/doc/property_map.html">Property Map
Concepts</A> or may be <a href="bundles.html">bundled properties</a>,
which have a more succinct syntax. The types of all property values
must be Copy Constructible, Assignable, and Default Constructible.
The property maps obtained from the
<TT>adjacency_list</TT> class are models of the <a
href="../../property_map/LvaluePropertyMap.html">Lvalue Property
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a> concept. If the <TT>adjacency_list</TT> is const,
then the property map is constant, otherwise the property
map is mutable.
@@ -184,7 +194,7 @@ the <TT>vertex_index_t</TT> property. The indices fall in the range
removed the indices are adjusted so that they retain these
properties. Some care must be taken when using these indices to access
exterior property storage. The property map for vertex index is a
model of <a href="../../property_map/ReadablePropertyMap.html">Readable
model of <a href="../../property_map/doc/ReadablePropertyMap.html">Readable
Property Map</a>.
<P>
@@ -204,12 +214,12 @@ example, the following code will result in undefined (bad) behavior:
<b>// Attempt to remove all the vertices. Wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end;
for (tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
for (boost::tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
remove_vertex(*vi, G);
<b>// Remove all the vertices. This is still wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end, next;
tie(vi, vi_end) = vertices(G);
boost::tie(vi, vi_end) = vertices(G);
for (next = vi; vi != vi_end; vi = next) {
++next;
remove_vertex(*vi, G);
@@ -237,12 +247,12 @@ actual vertex that was removed. The following code demonstrates this.
<b>// Attempt to remove all the vertices. Wrong!</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end;
for (tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
for (boost::tie(vi, vi_end) = vertices(G); vi != vi_end; ++vi)
remove_vertex(*vi, G);
<b>// Remove all the vertices. This is OK.</b>
graph_traits&lt;Graph&gt;::vertex_iterator vi, vi_end, next;
tie(vi, vi_end) = vertices(G);
boost::tie(vi, vi_end) = vertices(G);
for (next = vi; vi != vi_end; vi = next) {
++next;
remove_vertex(*vi, G);
@@ -255,7 +265,7 @@ The stability issue also affects vertex and edge descriptors. For
example, suppose you use vector of vertex descriptors to keep track of
the parents (or predecessors) of vertices in a shortest paths tree
(see <a
href="../example/dijkstra.cpp"><tt>examples/dijkstra.cpp</tt></a>).
href="../example/dijkstra-example.cpp"><tt>examples/dijkstra-example.cpp</tt></a>).
You create the parent vector with a call to
<tt>dijkstra_shortest_paths()</tt>, and then remove a vertex from the
graph. Subsequently you try to use the parent vector, but since all
@@ -271,7 +281,7 @@ vertex descriptors have become invalid, the result is incorrect.
remove_vertex(s, G); <b>// Bad idea! Invalidates vertex descriptors in parent vector.</b>
<b>// The following will produce incorrect results</b>
for(tie(vi, vend) = vertices(G); vi != vend; ++vi)
for(boost::tie(vi, vend) = vertices(G); vi != vend; ++vi)
std::cout << p[*vi] << " is the parent of " << *vi << std::endl;
</pre>
@@ -290,16 +300,16 @@ iterators that point to other edges (not <i>(u,v)</i>).
<p>
In general, if you want your vertex and edge descriptors to be stable
(never invalidated) then use <tt>listS</tt> or <tt>setS</tt> for the
<tt>VertexList</tt> and <tt>EdgeList</tt> template parameters of
<tt>VertexList</tt> and <tt>OutEdgeList</tt> template parameters of
<tt>adjacency_list</tt>. If you are not as concerned about descriptor
and iterator stability, and are more concerned about memory
consumption and graph traversal speed, use <tt>vecS</tt> for the
<tt>VertexList</tt> and/or <tt>EdgeList</tt> template parameters.
<tt>VertexList</tt> and/or <tt>OutEdgeList</tt> template parameters.
<p>
The following table summarizes which operations cause descriptors and
iterators to become invalid. In the table, <tt>EL</tt> is an
abbreviation for <tt>EdgeList</tt> and <tt>VL</tt> means
abbreviation for <tt>OutEdgeList</tt> and <tt>VL</tt> means
<tt>VertexList</tt>. The <b>Adj Iter</b> category includes the
<tt>out_edge_iterator</tt>, <tt>in_edge_iterator</tt>, and
<tt>adjacency_iterator</tt> types. A more detailed description of
@@ -312,30 +322,51 @@ each operation.
<CAPTION ALIGN="BOTTOM"><STRONG>Table:</STRONG>
Summary of Descriptor and Iterator Invalidation.
</CAPTION>
<tr> <th>Function</th> <th>Vertex Desc</th> <th>Edge Desc</th>
<th>Vertex Iter</th> <th>Edge Iter</th> <th>Adj Iter</th> </tr>
<tr>
<td><tt>add_edge()</tt></td> <td align=center><tt>OK</tt></td><td
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td
align=center><tt>EL=vecS &amp;&amp;<br> Directed=directedS</tt></td><td align=center><tt>EL=vecS</tt></td>
<th>Function</th>
<th>Vertex Desc</th>
<th>Edge Desc</th>
<th>Vertex Iter</th>
<th>Edge Iter</th>
<th>Adj Iter</th>
</tr>
<tr>
<td><tt>remove_edge()<br>remove_edge_if()<br>remove_out_edge_if()<br>remove_in_edge_if()<br>clear_vertex()</tt></td><td align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td>
<td align=center><tt>EL=vecS &amp;&amp;<br> Directed=directedS</tt></td><td align=center><tt>EL=vecS</tt></td>
<td>
<tt>add_edge()</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>EL=vecS &amp;&amp; <br>Directed=directedS</tt></td>
<td align=center><tt>EL=vecS</tt></td>
</tr>
<tr>
<td><tt>add_vertex()</tt></td><td align=center><tt>OK</tt></td><td
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td><td
align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td>
<td><tt>remove_edge()<br>remove_edge_if()<br>remove_out_edge_if()<br>
remove_in_edge_if()<br>clear_vertex()</tt>
</td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>EL=vecS &amp;&amp; <br>Directed=directedS</tt></td>
<td align=center><tt>EL=vecS</tt></td>
</tr>
<tr>
<td><tt>remove_vertex()</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td><td align=center><tt>VL=vecS</tt></td>
<td><tt>add_vertex()</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>OK</tt></td>
<td align=center><tt>VL=vecS &amp;&amp; <br/> Directed=directedS</tt></td>
<td align=center><tt>VL=vecS &amp;&amp; <br/> Directed=directedS</tt></td>
</tr>
<tr>
<td><tt>remove_vertex()</tt></td>
<td align=center><tt>VL=vecS</tt></td>
<td align=center><tt>VL=vecS</tt></td>
<td align=center><tt>VL=vecS</tt></td>
<td align=center><tt>VL=vecS</tt></td>
<td align=center><tt>VL=vecS</tt></td>
</tr>
</table>
<H2>Associated Types</H2>
<hr>
@@ -344,7 +375,7 @@ align=center><tt>OK</tt></td><td align=center><tt>OK</tt></td>
<br>
and
<br>
<tt>adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;::vertex_descriptor</tt>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed, EdgeList&gt;::vertex_descriptor</tt>
<br><br>
The type for the vertex descriptors associated with the
<TT>adjacency_list</TT>.
@@ -353,7 +384,7 @@ The type for the vertex descriptors associated with the
<tt>graph_traits&lt;adjacency_list&gt;::edge_descriptor</tt><br>
and<br>
<tt>adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;::edge_descriptor</tt>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed, EdgeList&gt;::edge_descriptor</tt>
<br><br>
The type for the edge descriptors associated with the
<TT>adjacency_list</TT>.
@@ -366,9 +397,9 @@ The type for the iterators returned by <TT>vertices()</TT>.
When <tt>VertexList=vecS</tt> then the <tt>vertex_iterator</tt> models
<a
href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>. Otherwise
href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. Otherwise
the <tt>vertex_iterator</tt> models <a
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
<hr>
@@ -376,7 +407,7 @@ href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalItera
<br><br>
The type for the iterators returned by <TT>edges()</TT>.
The <tt>edge_iterator</tt> models <a
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
<hr>
@@ -386,14 +417,14 @@ href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalItera
<br><br>
The type for the iterators returned by <TT>out_edges()</TT>.
When <tt>EdgeList=vecS</tt> then the <tt>out_edge_iterator</tt> models
<a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
RandomAccessIterator</a>. When <tt>EdgeList=slistS</tt> then the
When <tt>OutEdgeList=vecS</tt> then the <tt>out_edge_iterator</tt> models
<a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">
RandomAccessIterator</a>. When <tt>OutEdgeList=slistS</tt> then the
<tt>out_edge_iterator</tt> models <a
href="http://www.sgi.com/tech/stl/ForwardIterator.html">
href="http://www.boost.org/sgi/stl/ForwardIterator.html">
ForwardIterator</a>. Otherwise the <tt>out_edge_iterator</tt> models
<a
href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">
BidirectionalIterator</a>.
<hr>
@@ -405,9 +436,16 @@ The <tt>adjacency_iterator</tt> models the same iterator concept
as <tt>out_edge_iterator</tt>.
<hr>
<tt>adjacency_list::inv_adjacency_iterator</tt>
<br><br>
The type for the iterators returned by <TT>inv_adjacent_vertices()</TT>.
The <tt>inv_adjacency_iterator</tt> models the same iterator concept
as <tt>out_edge_iterator</tt>.
<hr>
<tt>graph_traits&lt;adjacency_list&gt;::directed_category</tt><br>
and<br>
<tt>adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;::directed_category</tt>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed, EdgeList&gt;::directed_category</tt>
<br><br>
Provides information about whether the graph is
directed (<TT>directed_tag</TT>) or undirected
@@ -417,24 +455,28 @@ directed (<TT>directed_tag</TT>) or undirected
<tt>graph_traits&lt;adjacency_list&gt;::edge_parallel_category</tt><br>
and<br>
<tt>adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;::edge_parallel_category</tt>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed, EdgeList&gt;::edge_parallel_category</tt>
<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.
<hr>
<tt>graph_traits&lt;adjacency_list&gt;::vertices_size_type</tt>
<tt>graph_traits&lt;adjacency_list&gt;::vertices_size_type</tt><br>
and<br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::vertices_size_type</tt><br>
<br><br>
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>
<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;::edges_size_type</tt><br>
<br><br>
The type used for dealing with the number of edges in the graph.
@@ -465,6 +507,30 @@ The property value type for the graph property specified by the
<hr>
<tt>adjacency_list::out_edge_list_selector</tt>
<br><br>
The type <tt>OutEdgeListS</tt>.
<hr>
<tt>adjacency_list::vertex_list_selector</tt>
<br><br>
The type <tt>VertexListS</tt>.
<hr>
<tt>adjacency_list::directed_selector</tt>
<br><br>
The type <tt>DirectedS</tt>.
<hr>
<tt>adjacency_list::edge_list_selector</tt>
<br><br>
The type <tt>EdgeListS</tt>.
<hr>
<H2>Member Functions</H2>
<hr>
@@ -494,7 +560,7 @@ Assignment operator. Makes this graph a copy of graph
<hr>
<pre>
adjacency_list(vertices_size_type&nbsp;n,
adjacency_list(vertices_size_type&nbsp;n,
const&nbsp;GraphProperty&amp;&nbsp;p = GraphProperty())
</pre>
Creates a graph object with <TT>n</TT> vertices and zero edges.
@@ -505,14 +571,14 @@ Creates a graph object with <TT>n</TT> vertices and zero edges.
<pre>
template &lt;class&nbsp;EdgeIterator&gt;
adjacency_list(EdgeIterator&nbsp;first, EdgeIterator&nbsp;last,
vertices_size_type&nbsp;n,
edges_size_type&nbsp;m = 0,
vertices_size_type&nbsp;n,
edges_size_type&nbsp;m = 0,
const&nbsp;GraphProperty&amp;&nbsp;p&nbsp;=&nbsp;GraphProperty())
</pre>
Creates a graph object with <TT>n</TT> vertices and with the edges
specified in the edge list given by the range <TT>[first, last)</TT>.
The <tt>EdgeIterator</tt> must be a model of <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>.
The value type of the <TT>EdgeIterator</TT> must be a
<TT>std::pair</TT>, where the type in the pair is an integer type. The
integers will correspond to vertices, and they must all fall in the
@@ -526,14 +592,14 @@ template &lt;class&nbsp;EdgeIterator, class&nbsp;EdgePropertyIterator&gt;
adjacency_list(EdgeIterator&nbsp;first, EdgeIterator&nbsp;last,
EdgePropertyIterator&nbsp;ep_iter,
vertices_size_type&nbsp;n,
vertices_size_type&nbsp;m = 0,
edges_size_type&nbsp;m = 0,
const&nbsp;GraphProperty&amp;&nbsp;p&nbsp;=&nbsp;GraphProperty())
</pre>
Creates a graph object with <TT>n</TT> vertices and with the edges
specified in the edge list given by the range <TT>[first, last)</TT>.
The <tt>EdgeIterator</tt> and <tt>EdgePropertyIterator</tt> must be a
model of <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>.
The value type of the <TT>EdgeIterator</TT> must be a
<TT>std::pair</TT>, where the type in the pair is an integer type. The
integers will correspond to vertices, and they must all fall in the
@@ -555,7 +621,7 @@ void swap(adjacency_list&amp; x)
Swap the vertices, edges, and properties of this graph with the
vertices, edges, and properties of graph <tt>x</tt>.
<hr>
<P>
<H2>Non-Member Functions</H2>
@@ -588,7 +654,21 @@ std::pair&lt;adjacency_iterator,&nbsp;adjacency_iterator&gt;
adjacent_vertices(vertex_descriptor&nbsp;u, const&nbsp;adjacency_list&amp;&nbsp;g)
</pre>
Returns an iterator-range providing access to the vertices adjacent to
vertex <tt>u</tt> in graph <tt>g</tt>.
vertex <tt>u</tt> in graph <tt>g</tt>. For example, if <tt>u -> v</tt>
is an edge in the graph, then <tt>v</tt> will be in this iterator-range.
<hr>
<pre>
std::pair&lt;inv_adjacency_iterator,&nbsp;inv_adjacency_iterator&gt;
inv_adjacent_vertices(vertex_descriptor&nbsp;u, const&nbsp;adjacency_list&amp;&nbsp;g)
</pre>
Returns an iterator-range providing access to the vertices in graph
<tt>g</tt> to which <tt>u</tt> is adjacent. (<tt>inv</tt> is for
inverse.) For example, if <tt>v -> u</tt> is an edge in the graph,
then <tt>v</tt> will be in this iterator range. This function is only
available for bidirectional and undirected <tt>adjacency_list</tt>'s.
<hr>
@@ -683,8 +763,10 @@ std::pair&lt;edge_descriptor, bool&gt;
edge(vertex_descriptor&nbsp;u, vertex_descriptor&nbsp;v,
const&nbsp;adjacency_list&amp;&nbsp;g)
</pre>
Returns the edge connecting vertex <tt>u</tt> to vertex <tt>v</tt> in
graph <tt>g</tt>.
If an edge from vertex <tt>u</tt> to vertex <tt>v</tt> exists, return a pair
containing one such edge and <tt>true</tt>. If there are no edges between
<tt>u</tt> and <tt>v</tt>, return a pair with an arbitrary edge descriptor and
<tt>false</tt>.
<hr>
@@ -695,7 +777,7 @@ edge_range(vertex_descriptor&nbsp;u, vertex_descriptor&nbsp;v,
</pre>
Returns a pair of out-edge iterators that give the range for
all the parallel edges from <tt>u</tt> to <tt>v</tt>. This
function only works when the <tt>EdgeList</tt> for the
function only works when the <tt>OutEdgeList</tt> for the
<tt>adjacency_list</tt> is a container that sorts the
out edges according to target vertex, and allows for
parallel edges. The <tt>multisetS</tt> selector chooses
@@ -715,16 +797,14 @@ add_edge(vertex_descriptor&nbsp;u, vertex_descriptor&nbsp;v,
Adds edge <i>(u,v)</i> to the graph and returns the edge descriptor
for the new edge. For graphs that do not allow parallel edges, if the
edge is already in the graph then a duplicate will not be added and
the <TT>bool</TT> flag will be <TT>false</TT>. Also, if <i>u</i> and
<i>v</i> are descriptors for the same vertex (creating a self loop)
and the graph is undirected, then the edge will not be added and the
flag will be <TT>false</TT>. When the flag is <TT>false</TT>, the
the <TT>bool</TT> flag will be <TT>false</TT>. When the flag is
<TT>false</TT>, the
returned edge descriptor points to the already existing edge.
<p>
The placement of the new edge in the out-edge list is in general
unspecified, though ordering of the out-edge list can be accomplished
through the choice of <tt>EdgeList</tt>.
through the choice of <tt>OutEdgeList</tt>.
If the <tt>VertexList</tt> selector is
<tt>vecS</tt>, and if either vertex descriptor <tt>u</tt> or
@@ -733,9 +813,9 @@ number of vertices in the graph, the graph is enlarged so that the
number of vertices is <tt>std::max(u,v) + 1</tt>.
<p>
If the <TT>EdgeList</TT> selector is <TT>vecS</TT> then this operation
If the <TT>OutEdgeList</TT> selector is <TT>vecS</TT> then this operation
will invalidate any <tt>out_edge_iterator</tt> for vertex
<i>u</i>. This also applies if the <TT>EdgeList</TT> is a user-defined
<i>u</i>. This also applies if the <TT>OutEdgeList</TT> is a user-defined
container that invalidates its iterators when <TT>push(container,
x)</TT> is invoked (see Section <A
HREF="./using_adjacency_list.html#sec:custom-storage">Customizing the
@@ -756,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>
@@ -764,11 +844,11 @@ value of the edge's internal property storage. Also see the previous
void remove_edge(vertex_descriptor u, vertex_descriptor v,
adjacency_list&amp; g)
</pre>
Removes the edge <i>(u,v)</i> from the graph.
Removes the edge <i>(u,v)</i> from the graph.
<p>
This operation causes any outstanding edge descriptors or iterators
that point to edge <i>(u,v)</i> to become invalid. In addition, if
the <TT>EdgeList</TT> selector is <TT>vecS</TT> then this operation
the <TT>OutEdgeList</TT> selector is <TT>vecS</TT> then this operation
will invalidate any iterators that point into the edge-list for vertex
<i>u</i> and also for vertex <i>v</i> in the undirected and
bidirectional case. Also, for directed graphs this invalidates any
@@ -804,13 +884,13 @@ has time complexity <i>O(E/V)</i>.
<hr>
<pre>
template &lt;class <a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>&gt;
template &lt;class <a href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>&gt;
void remove_out_edge_if(vertex_descriptor u, Predicate predicate,
adjacency_list&amp; g)
</pre>
Removes all out-edges of vertex <i>u</i> from the graph that satisfy
the <tt>predicate</tt>. That is, if the predicate returns true when
applied to an edge descriptor, then the edge is removed.
applied to an edge descriptor, then the edge is removed.
<p>
The affect on descriptor and iterator stability is the same as that of
invoking <tt>remove_edge()</tt> on each of the removed edges.
@@ -819,7 +899,7 @@ invoking <tt>remove_edge()</tt> on each of the removed edges.
<pre>
template &lt;class <a
href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>&gt;
href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>&gt;
void remove_in_edge_if(vertex_descriptor v, Predicate predicate,
adjacency_list&amp; g)
</pre>
@@ -837,12 +917,12 @@ This operation is available for undirected and bidirectional
<hr>
<pre>
template &lt;class <a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>&gt;
template &lt;class <a href="http://www.boost.org/sgi/stl/Predicate.html">Predicate</a>&gt;
void remove_edge_if(Predicate predicate, adjacency_list&amp; g)
</pre>
Removes all edges from the graph that satisfy
the <tt>predicate</tt>. That is, if the predicate returns true when
applied to an edge descriptor, then the edge is removed.
applied to an edge descriptor, then the edge is removed.
<p>
The affect on descriptor and iterator stability is the same as that of
invoking <tt>remove_edge()</tt> on each of the removed edges.
@@ -855,7 +935,7 @@ vertex_descriptor
add_vertex(adjacency_list&amp; g)
</pre>
Adds a vertex to the graph and returns the vertex descriptor for the
new vertex.
new vertex.
</a>
<hr>
@@ -918,7 +998,7 @@ void remove_vertex(vertex_descriptor u, adjacency_list&amp; g)
Remove vertex <i>u</i> from the vertex set of the graph. It is assumed
that there are no edges to or from vertex <i>u</i> when it is removed.
One way to make sure of this is to invoke <TT>clear_vertex()</TT>
beforehand.
beforehand.
<p>
If the <TT>VertexList</TT> template parameter of the
<TT>adjacency_list</TT> was <TT>vecS</TT>, then all vertex
@@ -999,9 +1079,35 @@ attached to the graph object <tt>g</tt>. The <tt>graph_property</tt>
traits class is defined in <a
href="../../../boost/graph/adjacency_list.hpp"><tt>boost/graph/adjacency_list.hpp</tt></a>.
<!-- add the shortcut property functions -->
<hr>
<!-- add the shortcut property functions -->
<h4><a name="serialization">Serialization</a></h4>
<hr>
<pre>
template&lt;class <a href="../../serialization/doc/archives.html#saving_interface">SavingArchive</a>&gt;
SavingArchive&amp; operator<<(SavingArchive&amp; ar, const adjacency_list&amp graph);
</pre>
Serializes the graph into the archive. Requires the vertex and edge properties of the
graph to be <a href="../../serialization/doc/index.html">Serializable</a>.
<br>
Include <a href="../../../boost/graph/adj_list_serialize.hpp"><tt>boost/graph/adj_list_serialize.hpp</tt></a>.
<hr>
<pre>
template&lt;class <a href="../../serialization/doc/archives.html#loading_interface">LoadingArchive</a>&gt;
LoadingArchive&amp; operator>>(LoadingArchive&amp; ar, const adjacency_list&amp graph);
</pre>
Reads the graph from the archive. Requires the vertex and edge properties of the
graph to be <a href="../../serialization/doc/index.html">Serializable</a>.
<br>
Include <a href="../../../boost/graph/adj_list_serialize.hpp"><tt>boost/graph/adj_list_serialize.hpp</tt></a>.
<hr>
<h3>See Also</h3>
@@ -1016,19 +1122,19 @@ href="../../../boost/graph/adjacency_list.hpp"><tt>boost/graph/adjacency_list.hp
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: gif ALT EdgeList VertexList html VertexProperties EdgeProperties
</HTML>
<!-- LocalWords: gif ALT OutEdgeList EdgeList VertexList html VertexProperties EdgeProperties
-->
<!-- LocalWords: GraphPropertyTag cpp enum ai cout endl VertexAndEdgeListGraph
-->
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Graph Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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,8 +79,8 @@ The selector type whether the graph is directed or undirected.
<h3>Model of</h3>
<a
href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a> and
<a href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>
href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a> and
<a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>
<h3>Type Requirements</h3>
@@ -148,15 +144,15 @@ parallel edges (<tt>disallow_parallel_edge_tag</tt>).
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+99 -66
View File
@@ -1,27 +1,23 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Adjacency Matrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:adjacency-matrix-class"></A>
<pre>
adjacency_matrix&lt;Directed, VertexProperty,
adjacency_matrix&lt;Directed, VertexProperty,
EdgeProperty, GraphProperty,
Allocator&gt;
</pre>
@@ -36,10 +32,10 @@ href="#fig:adj-matrix-graph">Figure 1</a> shows the adjacency matrix
representation of a graph.
<P></P>
<DIV ALIGN="center"><A NAME="fig:adj-matrix-graph"></A><A NAME="1509"></A>
<DIV ALIGN="center"><A NAME="fig:adj-matrix-graph"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency Matrix Representation of a Directed Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/adj-matrix-graph.gif" width="386" height="284"></TD>
<TR><TD><IMG SRC="./figs/adj-matrix-graph3.gif" width="386" height="284"></TD>
<TD><IMG SRC="./figs/adj-matrix.gif" width="135" height="136"></TD></TR>
</TABLE>
</DIV><P></P>
@@ -59,8 +55,13 @@ graphs (where <i>E</i> is much smaller than <i>V<sup>2</sup></i>).
The <tt>adjacency_matrix</tt> class extends the traditional
data-structure by allowing objects to be attached to vertices and
edges via the the property template parameters. See Section XXX for an
explanation of how to use internal properties.
edges using the same property template parameters supported by <a
href="adjacency_list.html"><tt>adjacency_list</tt></a>. These may be
<a href="bundles.html">bundled properties</a> or standard (backward-compatible)
<a
href="using_adjacency_list.html#sec:adjacency-list-properties">interior
properties</a>. The types of all property values must be
Copy Constructible, Assignable and Default Constructible.
In the case of an undirected graph, the
<tt>adjacency_matrix</tt>. class does not use a full <i>V x V</i>
@@ -71,22 +72,22 @@ href="#fig:undir-adj-matrix-graph">Figure 2</a> shows an adjacency
matrix representation of an undirected graph.
<P></P>
<DIV ALIGN="center"><A NAME="fig:undir-adj-matrix-graph"></A><A NAME="1509"></A>
<DIV ALIGN="center"><A NAME="fig:undir-adj-matrix-graph"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1:</STRONG> Adjacency Matrix Representation of an Undirected Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph.gif" width="260" height="240"></TD>
<TD><IMG SRC="./figs/undir-adj-matrix.gif" width="135" height="136"></TD></TR>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 2:</STRONG> Adjacency Matrix Representation of an Undirected Graph.</CAPTION>
<TR><TD><IMG SRC="./figs/undir-adj-matrix-graph3.gif" width="260" height="240"></TD>
<TD><IMG SRC="./figs/undir-adj-matrix2.gif" width="135" height="136"></TD></TR>
</TABLE>
</DIV><P></P>
<h3>Example</h3>
Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
<pre>
enum { A, B, C, D, E, F, N };
const char* name = "ABCDEF";
typedef boost::adjacency_matrix&lt;boost::directedS> Graph;
Graph g(N);
add_edge(B, C, g);
@@ -111,17 +112,17 @@ Creating the graph of <a href="#fig:adj-matrix-graph">Figure 1</a>.
</pre>
The output is:
<pre>
vertex set: A B C D E F
vertex set: A B C D E F
edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A)
edge set: (B,C) (B,F) (C,A) (C,C) (D,E) (E,D) (F,A)
out-edges:
A -->
B --> C F
C --> A C
D --> E
E --> D
F --> A
out-edges:
A -->
B --> C F
C --> A C
D --> E
E --> D
F --> A
</pre>
Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
@@ -151,17 +152,17 @@ Creating the graph of <a href="#fig:undir-adj-matrix-graph">Figure 2</a>.
</pre>
The output is:
<pre>
vertex set: A B C D E F
vertex set: A B C D E F
edge set: (C,A) (C,B) (E,D) (F,A) (F,B)
edge set: (C,A) (C,B) (E,D) (F,A) (F,B)
incident edges:
A &lt;--> C F
B &lt;--> C F
C &lt;--> A B
D &lt;--> E
E &lt;--> D
F &lt;--> A B
incident edges:
A &lt;--> C F
B &lt;--> C F
C &lt;--> A B
D &lt;--> E
E &lt;--> D
F &lt;--> A B
</pre>
@@ -204,12 +205,17 @@ The output is:
<h3>Model Of</h3>
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, <a
href="./AdjacencyMatrix.html">AdjacencyMatrix</a>, and <a
href="./MutablePropertyGraph.html">MutablePropertyGraph</a>.
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./IncidenceGraph.html">Incidence Graph</a>,
<a href="./BidirectionalGraph.html">Bidirectional Graph</a>,
<a
href="./AdjacencyMatrix.html">AdjacencyMatrix</a>, <a
href="./MutablePropertyGraph.html">MutablePropertyGraph</a>,
<a href="../../utility/CopyConstructible.html">CopyConstructible</a>,
and <a href="../../utility/Assignable.html">Assignable</a>.
<h3>Associates Types</h3>
<h3>Associated Types</h3>
<hr>
@@ -230,8 +236,8 @@ The type for the edge descriptors associated with the
<hr>
<tt>graph_traits&lt;adjacency_matrix&gt;::vertex_iterator</tt>
<br><br>
The type for the iterators returned by <tt>vertices()</tt>.
The vertex iterator models <a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br>
The type for the iterators returned by <tt>vertices()</tt>.
The vertex iterator models <a href="http://www.boost.org/sgi/stl/RandomAccessIterator.html">RandomAccessIterator</a>. <br>
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
<hr>
@@ -248,6 +254,13 @@ The type for the edge descriptors associated with the
iterator models <a href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>. <br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
<tt>graph_traits&lt;adjacency_matrix&gt;::in_edge_iterator</tt>
<br><br>
The type for the iterators returned by <tt>in_edges()</tt>. This
iterator models <a href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>. <br>
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
<hr>
<tt>graph_traits&lt;adjacency_matrix&gt;::adjacency_iterator</tt>
<br><br>
@@ -354,15 +367,15 @@ adjacency_matrix(EdgeIterator first, EdgeIterator last,
std::pair&lt;vertex_iterator, vertex_iterator&gt;
vertices(const adjacency_matrix&amp; g)
</pre>
Returns an iterator-range providing access to the vertex set of graph <tt>g</i>.<br>
Returns an iterator-range providing access to the vertex set of graph <tt>g</tt>.<br>
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
<hr>
<pre>
std::pair&lt;edge_iterator, edge_iterator&gt;
edges(const adjacency_matrix&amp; g)
edges(const adjacency_matrix&amp; g);
</pre>
Returns an iterator-range providing access to the edge set of graph <tt>g</i>.<br>
Returns an iterator-range providing access to the edge set of graph <tt>g</tt>.<br>
(Required by <a href="EdgeListGraph.html">EdgeListGraph</a>.)
<hr>
@@ -371,7 +384,7 @@ std::pair&lt;adjacency_iterator, adjacency_iterator&gt;
adjacent_vertices(vertex_descriptor v, const adjacency_matrix&amp; g)
</pre>
Returns an iterator-range providing access to the vertices adjacent to
vertex <tt>v</i> in graph <tt>g</i>.<br>
vertex <tt>v</tt> in graph <tt>g</tt>.<br>
(Required by <a href="AdjacencyGraph.html">AdjacencyGraph</a>.)
<hr>
@@ -380,9 +393,9 @@ std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
out_edges(vertex_descriptor v, const adjacency_matrix&amp; g)
</pre>
Returns an iterator-range providing access to the out-edges of
vertex <tt>v</i> in graph <tt>g</i>. If the graph is undirected,
this iterator-range provides access to all edge incident on
vertex <tt>v</i>. <br>
vertex <tt>v</tt> in graph <tt>g</tt>. If the graph is undirected,
this iterator-range provides access to all edges incident on
vertex <tt>v</tt>. <br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
@@ -390,7 +403,7 @@ vertex <tt>v</i>. <br>
vertex_descriptor
source(edge_descriptor e, const adjacency_matrix&amp; g)
</pre>
Returns the source vertex of edge <tt>e</i>.<br>
Returns the source vertex of edge <tt>e</tt>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
@@ -398,7 +411,7 @@ Returns the source vertex of edge <tt>e</i>.<br>
vertex_descriptor
target(edge_descriptor e, const adjacency_matrix&amp; g)
</pre>
Returns the target vertex of edge <tt>e</i>.<br>
Returns the target vertex of edge <tt>e</tt>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
@@ -406,15 +419,35 @@ Returns the target vertex of edge <tt>e</i>.<br>
degree_size_type
out_degree(vertex_descriptor u, const adjacency_matrix&amp; g)
</pre>
Returns the number of edges leaving vertex <tt>u</i>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
Returns the number of edges leaving vertex <tt>u</tt>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
<hr>
<pre>
std::pair&lt;in_edge_iterator, in_edge_iterator&gt;
in_edges(vertex_descriptor v, const adjacency_matrix&amp; g)
</pre>
Returns an iterator-range providing access to the in-edges of
vertex <tt>v</tt> in graph <tt>g</tt>. If the graph is undirected,
this iterator-range provides access to all edges incident on
vertex <tt>v</tt>. <br>
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
<hr>
<pre>
degree_size_type
in_degree(vertex_descriptor u, const adjacency_matrix&amp; g)
</pre>
Returns the number of edges entering vertex <tt>u</tt>.<br>
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
<hr>
<hr>
<pre>
vertices_size_type num_vertices(const adjacency_matrix&amp; g)
</pre>
Returns the number of vertices in the graph <tt>g</i>.<br>
Returns the number of vertices in the graph <tt>g</tt>.<br>
(Required by <a href="VertexListGraph.html">VertexListGraph</a>.)
<hr>
@@ -436,7 +469,7 @@ std::pair&lt;edge_descriptor, bool&gt;
edge(vertex_descriptor u, vertex_descriptor v,
const adjacency_matrix&amp; g)
</pre>
Returns the edge connecting vertex <tt>u</i> to vertex <tt>v</i> in graph <tt>g</i>.<br>
Returns the edge connecting vertex <tt>u</tt> to vertex <tt>v</tt> in graph <tt>g</tt>.<br>
(Required by <a href="AdjacencyMatrix.html">AdjacencyMatrix</a>.)
<hr>
@@ -445,7 +478,7 @@ std::pair&lt;edge_descriptor, bool&gt;
add_edge(vertex_descriptor u, vertex_descriptor v,
adjacency_matrix&amp; g)
</pre>
Adds edge <tt>(u,v)</i> to the graph and returns the edge descriptor for
Adds edge <tt>(u,v)</tt> to the graph and returns the edge descriptor for
the new edge. If the edge is already in the graph then a duplicate
will not be added and the <tt>bool</tt> flag will be <tt>false</tt>.
This operation does not invalidate any of the graph's iterators
@@ -459,7 +492,7 @@ add_edge(vertex_descriptor u, vertex_descriptor v,
const EdgeProperty& p,
adjacency_matrix&amp; g)
</pre>
Adds edge <tt>(u,v)</i> to the graph and attaches <tt>p</tt> as the
Adds edge <tt>(u,v)</tt> 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.
@@ -468,7 +501,7 @@ value of the edge's internal property storage. Also see the previous
void remove_edge(vertex_descriptor u, vertex_descriptor v,
adjacency_matrix&amp; g)
</pre>
Removes the edge <tt>(u,v)</i> from the graph. <br>
Removes the edge <tt>(u,v)</tt> from the graph. <br>
(Required by <a href="MutableGraph.html">MutableGraph</a>.)
<hr>
@@ -483,7 +516,7 @@ to calling <tt>remove_edge(source(e, g), target(e, g), g)</tt>.<br>
<pre>
void clear_vertex(vertex_descriptor u, adjacency_matrix&amp; g)
</pre>
Removes all edges to and from vertex <tt>u</i>. The vertex still appears
Removes all edges to and from vertex <tt>u</tt>. The vertex still appears
in the vertex set of the graph.<br>
(Required by <a href="MutableGraph.html">MutableGraph</a>.)
@@ -507,7 +540,7 @@ argument.<br>
<pre>
template &lt;typename Property, typename X&gt;
typename property_traits&lt;
typenamae property_map&lt;adjacency_matrix, Property&gt;::const_type
typename property_map&lt;adjacency_matrix, Property&gt;::const_type
&gt;::value_type
get(Property, const adjacency_matrix&amp; g, X x)
</pre>
+96
View File
@@ -0,0 +1,96 @@
<HTML>
<!--
Copyright (c) 2004 Kris Beevers
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: astar_heuristic</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
astar_heuristic&lt;Graph, CostType&gt;
</pre>
</H1>
This class is a default implementation of the <a
href="./AStarHeuristic.html">AStarHeuristic</a> concept. It
implements a "zero" heuristic -- a heuristic function that returns a
cost of zero regardless of the vertex it is passed.
<h3>Model of</h3>
<a href="./AStarHeuristic.html">AStarHeuristic</a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>Graph</TT></TD>
<TD>
The type of the graph being searched.
</TD>
<TD></TD>
</TR>
<TR><TD><TT>CostType</TT></TD>
<TD>
A type that can be used with the <tt>compare</tt> and
<tt>combine</tt> functions passed to A*. Typically an integer or
floating point type.
</TD>
<TD></TD>
</TR>
</table>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/astar_search.hpp">
<TT>boost/graph/astar_search.hpp</TT></a>
<h3>Member Functions</h3>
This class implements the single member function required by <a
href="./AStarHeuristic.html">AStarHeuristic</a>:
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
CostType operator()(graph_traits&lt;Graph&gt;::vertex_descriptor u);
</tt></td><td>
Called for the target of every out edge of a vertex being examined.
Returns the cost, estimated by the heuristic, from vertex <tt>u</tt>
to a goal.
</td></tr>
</table>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
Rensselaer Polytechnic Institute (<A
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+589
View File
@@ -0,0 +1,589 @@
<HTML>
<!--
Copyright (c) 2004 Kris Beevers
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: A* Heuristic Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:astar"></A>
<TT>astar_search</TT>
</H1>
<P>
<PRE>
<i>// Named parameter interfaces</i>
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search_no_init
(const IncidenceGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search_tree
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;typename VertexListGraph,
typename AStarHeuristic,
typename P, typename T, typename R&gt;
void
astar_search_no_init_tree
(const IncidenceGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<a href="AStarHeuristic.html">AStarHeuristic</a> h, const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// Non-named parameter interface</i>
template &lt;typename VertexListGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap,
typename ColorMap,
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
VertexIndexMap index_map, ColorMap color,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
template &lt;typename VertexListGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap,
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search_tree
(const VertexListGraph &amp;g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
<i>// Versions that do not initialize property maps (used for implicit graphs)</i>
template &lt;typename IncidenceGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap, typename ColorMap,
typename VertexIndexMap,
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search_no_init
(const IncidenceGraph &amp;g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
ColorMap color, VertexIndexMap index_map,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
<b>Note that the index_map and color parameters are swapped in
astar_search_no_init() relative to astar_search(); the named parameter
interfaces are not affected.</b>
template &lt;typename IncidenceGraph, typename AStarHeuristic,
typename <a href="AStarVisitor.html">AStarVisitor</a>, typename PredecessorMap,
typename CostMap, typename DistanceMap,
typename WeightMap,
typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename CostInf, typename CostZero&gt;
inline void
astar_search_no_init_tree
(const IncidenceGraph &amp;g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
AStarHeuristic h, AStarVisitor vis,
PredecessorMap predecessor, CostMap cost,
DistanceMap distance, WeightMap weight,
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
</PRE>
<P>
This algorithm implements a heuristic search on a weighted, directed
or undirected graph for the case where all edge weights are
non-negative.
</P>
<P>
The A* algorithm is a <i>heuristic graph search algorithm</i>: an A*
search is "guided" by a <i>heuristic function</i>. A heuristic
function <i>h(v)</i> is one which estimates the cost from a non-goal
state (<i>v</i>) in the graph to some goal state, <i>g</i>.
Intuitively, A* follows paths (through the graph) to the goal that are
estimated by the heuristic function to be the best paths. Unlike
best-first search, A* takes into account the known cost from the start
of the search to <i>v</i>; the paths A* takes are guided by a function
<i>f(v) = g(v) + h(v)</i>, where <i>h(v)</i> is the heuristic
function, and <i>g(v)</i> (sometimes denoted <i>c(s, v)</i>) is the
known cost from the start to <i>v</i>. Clearly, the efficiency of A*
is highly dependent on the heuristic function with which it is used.
</P>
<P>
The A* algorithm is very similar to Dijkstra's Shortest Paths
algorithm. This implementation finds all the shortest paths from the
start vertex to every other vertex by creating a search tree,
examining vertices according to their remaining cost to some goal, as
estimated by a heuristic function. Most commonly, A* is used to find
some specific goal vertex or vertices in a graph, after which the
search is terminated.
</P>
<P>
A* is particularly useful for searching <i>implicit</i> graphs.
Implicit graphs are graphs that are not completely known at the
beginning of the search. Upon visiting a vertex, its neighbors are
"generated" and added to the search. Implicit graphs are particularly
useful for searching large state spaces -- in game-playing scenarios
(e.g. chess), for example -- in which it may not be possible to store
the entire graph. Implicit searches can be performed with this
implementation of A* by creating special visitors that generate
neighbors of newly-expanded vertices. Please note that
<tt>astar_search_no_init()</tt> or <tt>astar_search_no_init_tree()</tt> must be
used for implicit graphs; the basic
<tt>astar_search()</tt> function requires a graph that models
the <a href="VertexListGraph.html">Vertex List Graph</a> concept. Both
versions
also require the graph type to model the <a
href="IncidenceGraph.html">Incidence Graph</a> concept.
</P>
<P>
For the non-tree versions of the algorithm,
this implementation of A* is based on an OPEN/CLOSED list formulation.
Vertices on the OPEN list have been ``discovered''
by the algorithm, but not ``expanded'' (we have not discovered their
adjacent vertices). Vertices on the CLOSED list have been completely
examined by our search (we have expanded them and added their children
to the OPEN list). Vertices that are on neither list have not been
encountered in any context so far in our search. A major advantage of
this formulation of the A* algorithm over other approaches is that it
avoids ``cycles'' in the state space; the search will not become
trapped by loops in the graph. The OPEN/CLOSED lists are implemented
using BGL's vertex coloring mechanisms. Vertices in OPEN are colored
gray, vertices in CLOSED are colored black, and undiscovered vertices
are colored white. For the versions of the algorithm whose names end in
<tt>_tree</tt>, all vertices are assumed to always be white, leading to
checking for repeated vertices being done using the distance map. If a dummy
value is used for the distance map and the graph contains cycles, the algorithm
will probably enter an infinite loop.
</P>
<P>
The criteria for expanding a vertex on the OPEN list is that it has
the lowest <i>f(v) = g(v) + h(v)</i> value of all vertices on OPEN.
Cost information about vertices is stored in a property map.
</P>
<P>
The following is the pseudocode for the A* heuristic search algorithm.
In the pseudocode, <i>h</i> is the heuristic function, <i>w</i> is the
edge weight, <i>d</i> is the distance of a vertex from <i>s</i>, and
<i>Q</i> is a priority queue, sorted by <i>f</i>, the estimated cost
to the goal of the path through a vertex. <i>p</i> is a predecessor
map. The visitor event points for the algorithm are indicated by the
labels on the right.
</P>
<table>
<tr>
<td valign="top">
<pre>
A*(<i>G</i>, <i>s</i>, <i>h</i>)
<b>for</b> each vertex <i>u in V</i>
<i>d[u] := f[u] := infinity</i>
<i>color[u] :=</i> WHITE
<i>p[u] := u</i>
<b>end for</b>
<i>color[s] :=</i> GRAY
<i>d[s] := 0</i>
<i>f[s] := h(s)</i>
INSERT(<i>Q, s</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> EXTRACT-MIN(<i>Q</i>)
<b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>w(u,v) + d[u] &lt; d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i>
<i>f[v] := d[v] + h(v)</i>
<i>p[v] := u</i>
<b>if</b> (<i>color[v] =</i> WHITE)
<i>color[v] :=</i> GRAY
INSERT(<i>Q, v</i>)
<b>else if</b> (<i>color[v] =</i> BLACK)
<i>color[v] :=</i> GRAY
INSERT(<i>Q, v</i>)
<b>end if</b>
<b>else</b>
<i>...</i>
<b>end for</b>
<i>color[u] :=</i> BLACK
<b>end while</b>
</pre>
</td>
<td valign="top">
<pre>
initialize vertex <i>u</i>
discover vertex <i>s</i>
examine vertex <i>u</i>
examine edge <i>(u,v)</i>
edge <i>(u,v)</i> relaxed
discover vertex <i>v</i>
reopen vertex <i>v</i>
edge <i>(u,v)</i> not relaxed
finish vertex <i>u</i>
</pre>
</td>
</tr>
</table>
<h3>Where Defined</h3>
<a href="../../../boost/graph/astar_search.hpp"><tt>boost/graph/astar_search.hpp</tt></a>
<h3>Parameters</h3>
IN: <tt>const VertexListGraph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied for <tt>astar_search()</tt>. The type
<tt>VertexListGraph</tt> must be a model of the <a
href="VertexListGraph.html">
Vertex List Graph</a> and <a href="IncidenceGraph.html">Incidence Graph</a>
concepts.
</blockquote>
IN: <tt>const IncidenceGraph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied for <tt>astar_search_no_init()</tt>. The type
<tt>IncidenceGraph</tt> must be a model of the
<a href="IncidenceGraph.html">Incidence Graph</a>
concept.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The start vertex for the search. All distances will be calculated
from this vertex, and the shortest paths tree (recorded in the
predecessor map) will be rooted at this vertex.
</blockquote>
IN: <tt>AStarHeuristic h</tt>
<blockquote>
The heuristic function that guides the search. The type
<tt>AStarHeuristic</tt> must be a model of the <a href="AStarHeuristic.html">AStarHeuristic</a>
concept.
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph. The weights
must all be non-negative; the algorithm will throw a <a
href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception if one of the edges is negative. The type
<tt>WeightMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html"><tt>Readable
Property Map</tt></a>. The edge descriptor type of the graph needs
to be usable as the key type for the weight map. The value type
for this map must be the same as the value type of the distance
map.<br>
<b>Default:</b> <tt>get(edge\_weight, g)</tt>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary in non-tree versions of the
algorithm for efficient updates of
the heap data structure when an edge is relaxed. The type
<tt>VertexIndexMap</tt> must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html"><tt>Readable
Property Map</tt></a>. The value type of the map must be an integer
type. The vertex descriptor type of the graph needs to be usable as
the key type of the map.<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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning tree.
Upon completion of the algorithm, the edges <tt>(p[u],u)</tt> for
all <tt>u</tt> in <tt>V</tt> are in the minimum spanning tree. If
<tt>p[u] = u</tt> then <tt>u</tt> is either the start vertex or a
vertex that is not reachable from the start. The
<tt>PredecessorMap</tt> type must be a <a
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
Property Map</tt></a> with key and vertex types the same as the
vertex descriptor type of the graph.<br>
<b>Default:</b> <tt>dummy_property_map</tt>
</blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the start vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map.
The shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
Property Map</tt></a>. The vertex descriptor type of the graph
needs to be usable as the key type of the distance map. The value
type of the distance map is the element type of a <a
href="./Monoid.html"><tt>Monoid</tt></a> formed with the
<tt>combine</tt> function object and the zero object for the
identity element. Also the distance value type must have a <a
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
provided by the <tt>compare</tt> function object. A
<tt>constant_writable_property_map</tt> returning the infinity value can be
used for this parameter in tree versions of the algorithm when the graph does
not contain a directed cycle.<br>
<b>Default:</b> <tt>shared_array_property_map</tt>
with the same value type as the
<tt>WeightMap</tt>, and of size <tt>num_vertices(g)</tt>, and using
the <tt>i_map</tt> for the index map.
</blockquote>
UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
<blockquote>
The <i>f</i>-value for each vertex. The <i>f</i>-value is defined
as the sum of the cost to get to a vertex from the start vertex, and
the estimated cost (as returned by the heuristic function
<tt>h</tt>) from the vertex to a goal. The type <tt>CostMap</tt>
must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
Property Map</tt></a> in non-tree versions of the algorithm, and <a
href="../../property_map/doc/WritablePropertyMap.html"><tt>Writable Property
Map</tt></a> in tree versions of the algorithm. The vertex descriptor type
of the graph
needs to be usable as the key type of the distance map. The value
type of the distance map is the element type of a <a
href="./Monoid.html"><tt>Monoid</tt></a> formed with the
<tt>combine</tt> function object and the zero object for the
identity element. Also the distance value type must have a <a
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
provided by the <tt>compare</tt> function object. The value type
for this map must be the same as the value type for the distance
map. In tree versions of the algorithm, <tt>null_property_map</tt> can be
used for this parameter.<br>
<b>Default:</b> <tt>shared_array_property_map</tt>
with the same value type as the
<tt>DistanceMap</tt>, and of size <tt>num_vertices(g)</tt>, and using
the <tt>i_map</tt> for the index map.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote>
This is used during the execution of non-tree versions of the algorithm to
mark the
vertices, indicating whether they are on the OPEN or CLOSED lists.
The vertices start out white and become gray when they are inserted
into the OPEN list. They then turn black when they are examined and
placed on the CLOSED list. At the end of the algorithm, vertices
reachable from the source vertex will have been colored black. All
other vertices will still be white. The type <tt>ColorMap</tt> must
be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html"><tt>Read/Write
Property Map</tt></a>. A vertex descriptor must be usable as the
key type of the map, and the value type of the map must be a model
of <a href="./ColorValue.html"><tt>Color Value</tt></a>.<br>
<b>Default:</b> <tt>shared_array_property_map</tt>
of value type <tt>default_color_type</tt>, with size
<tt>num_vertices(g)</tt>, and using
the <tt>i_map</tt> for the index map.
</blockquote>
IN: <tt>distance_compare(CompareFunction cmp)</tt>
<blockquote>
This function is use to compare distances to determine which vertex
is closer to the start vertex, and to compare <i>f</i>-values to
determine which vertex on the OPEN list to examine next. The
<tt>CompareFunction</tt> type must be a model of <a
href="http://www.boost.org/sgi/stl/BinaryPredicate.html"><tt>Binary
Predicate</tt></a> and have argument types that match the value type
of the <tt>DistanceMap</tt> property map.<br>
<b>Default:</b> <tt>std::less&lt;D&gt;</tt> with <tt>D = typename
property_traits&lt;DistanceMap&gt;::value_type</tt>.
</blockquote>
IN: <tt>distance_combine(CombineFunction cmb)</tt>
<blockquote>
This function is used to combine distances to compute the distance
of a path, and to combine distance and heuristic values to compute
the <i>f</i>-value of a vertex. The <tt>CombineFunction</tt> type
must be a model of <a
href="http://www.boost.org/sgi/stl/BinaryFunction.html"><tt>Binary
Function</tt></a>. Both argument types of the binary function must
match the value type of the <tt>DistanceMap</tt> property map (which
is the same as that of the <tt>WeightMap</tt> and <tt>CostMap</tt>
property maps). The result type must be the same type as the
distance value type.<br>
<b>Default:</b> <tt>std::plus&lt;D&gt;</tt> with <tt>D = typename
property_traits&lt;DistanceMap&gt;::value_type</tt>.
</blockquote>
IN: <tt>distance_inf(D inf)</tt>
<blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt>
object. That is, <tt>compare(d, inf) == true</tt> for any <tt>d !=
inf</tt>. The type <tt>D</tt> is the value type of the
<tt>DistanceMap</tt>.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt>
</blockquote>
IN: <tt>distance_zero(D zero)</tt>
<blockquote>
The <tt>zero</tt> value must be the identity element for the <a
href="./Monoid.html"><tt>Monoid</tt></a> formed by the distance
values and the <tt>combine</tt> function object. The type
<tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
<b>Default</b>: <tt>D()</tt> with <tt>D = typename
property_traits&lt;DistanceMap&gt;::value_type</tt>.
</blockquote>
OUT: <tt>visitor(AStarVisitor v)</tt>
<blockquote>
Use this to specify actions that you would like to happen during
certain event points within the algorithm. The type
<tt>AStarVisitor</tt> must be a model of the <a
href="AStarVisitor.html"><tt>AStarVisitor</tt></a> concept. The
visitor object is passed by value <a href="#1">[1]</a>.<br>
<b>Default:</b> <tt>astar_visitor&lt;null_visitor&gt;</tt>
</blockquote>
<H3>Complexity</H3>
<P>
The time complexity is <i>O((E + V) log V)</i>.
<h3>Visitor Event Points</h3>
<ul>
<li><b><tt>vis.initialize_vertex(u, g)</tt></b>
is invoked on each vertex in the graph before the start of the
algorithm.
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked when a vertex is first discovered and is added to the
OPEN list.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked when a vertex is popped from
the queue (i.e., it has the lowest cost on the OPEN list).
<li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it is
examined.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) &lt; d[v]</i>.
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b>
is invoked if the edge is not relaxed (see above).
<li><b><tt>vis.black_target(e, g)</tt></b>
is invoked when a vertex that is on the CLOSED list is
"rediscovered" via a more efficient path, and is re-added to the
OPEN list.
<li><b><tt>vis.finish_vertex(u, g)</tt></b>
is invoked on a vertex when it is added to the CLOSED list, which
happens after all of its out edges have been examined.
</ul>
<H3>Example</H3>
<P>
See <a href="../example/astar-cities.cpp">
<TT>example/astar-cities.cpp</TT></a> for an example of
using A* search.
<H3>Notes</H3>
<a name="1">[1]</a> Since the visitor parameter is passed by value, if
your visitor contains state then any changes to the state during the
algorithm will be made to a copy of the visitor object, not the
visitor object passed in. Therefore you may want the visitor to hold
this state by pointer or reference.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
Rensselaer Polytechnic Institute (<A
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+108
View File
@@ -0,0 +1,108 @@
<HTML>
<!--
Copyright (c) 2004 Kris Beevers
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: astar_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
astar_visitor&lt;EventVisitorList&gt;
</pre>
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
<tt>std::pair</tt>) into a <a
href="./AStarVisitor.html">AStarVisitor</a>.
<h3>Example</h3>
See the example for <a href="./EventVisitor.html">EventVisitor</a>.
<h3>Model of</h3>
<a href="./AStarVisitor.html">AStarVisitor</a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>EventVisitorList</TT></TD>
<TD>
A list of <a href="./EventVisitor.html">EventVisitor</a>'s created
with <tt>std::pair</tt>.
</TD>
<TD><TT><a href="./null_visitor.html"><tt>null_visitor</tt></a></TT></TD>
</TR>
</table>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/astar_search.hpp">
<TT>boost/graph/astar_search.hpp</TT></a>
<h3>Member Functions</h3>
This class implements all of the member functions required by <a
href="./AStarVisitor.html">AStarVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the
EventVisitorList.
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class EventVisitorList&gt;<br>
astar_visitor&lt;EventVisitorList&gt;<br>
make_astar_visitor(EventVisitorList ev_list);
</tt></td><td>
Returns the event visitor list adapted to be an A* visitor.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are event visitors: <a
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://cs.krisbeevers.com/">Kristopher Beevers</A>,
Rensselaer Polytechnic Institute (<A
HREF="mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+14 -18
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Bandwidth</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -35,10 +31,10 @@
bandwidth(const Graph& g, VertexIndexMap index_map)
</pre>
The <b><i>bandwidth</i></b> of an undirected graph is the maximum
The <b><i>bandwidth</i></b> of a graph is the maximum
distance between two adjacent vertices, with distance measured on a
line upon which the vertices have been placed at unit intervals. To
put it another way, if the vertices of an undirected graph
put it another way, if the vertices of a graph
<i>G=(V,E)</i> are each assigned an index from zero to <i>|V| - 1</i>
given by <i>index[v]</i>, then the bandwidth of <i>G</i> is<br>
<br>
@@ -89,9 +85,9 @@ of the i-th bandwidths <i>B<sub>i</sub>(G)</i>.<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+151
View File
@@ -0,0 +1,151 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Copyright (c) 2004 Trustees of Indiana University
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)
-->
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 12 April 2005), see www.w3.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
<title>Function betweenness_centrality_clustering</title>
</head>
<body>
<div class="titlepage"></div>
<div class="refnamediv">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function
betweenness_centrality_clustering</span></h1>
<p>boost::betweenness_centrality_clustering &mdash; Graph
clustering based on edge betweenness centrality.</p>
</div>
<h2 xmlns:rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class=
"refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class=
"refsynopsisdiv">
<pre class="synopsis">
<span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done, <span class=
"bold"><b>typename</b></span> EdgeCentralityMap,
<span class=
"bold"><b>typename</b></span> VertexIndexMap&gt;
<span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
EdgeCentralityMap edge_centrality,
VertexIndexMap vertex_index);
<span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done, <span class=
"bold"><b>typename</b></span> EdgeCentralityMap&gt;
<span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done,
EdgeCentralityMap edge_centrality);
<span class="bold"><b>template</b></span>&lt;<span class=
"bold"><b>typename</b></span> MutableGraph, <span class=
"bold"><b>typename</b></span> Done&gt;
<span class="type"><span class=
"bold"><b>void</b></span></span> betweenness_centrality_clustering(MutableGraph &amp; g, Done done);
</pre></div>
<div class="refsect1" lang="en"><a name="id822306" id=
"id822306"></a>
<h2>Description</h2>
<p>This algorithm implements graph clustering based on edge
betweenness centrality. It is an iterative algorithm, where in each
step it computes the edge betweenness centrality (via <a href=
"betweenness_centrality.html">brandes_betweenness_centrality</a>) and
removes the edge with the maximum betweenness centrality. The
<tt class="computeroutput">done</tt> function object determines
when the algorithm terminates (the edge found when the algorithm
terminates will not be removed).</p>
<h2>Parameters</h2>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied. The type
<tt>Graph</tt> must be a model of <a
href="VertexListGraph.html">Vertex List Graph</a> and <a
href="IncidenceGraph.html">Incidence Graph</a>. When an edge
centrality map is supplied, it must also model <a
href="EdgeListGraph.html">Edge List Graph</a> and <a
href="MutableGraph.html">MutableGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>Done done</tt>
<blockquote>
The function object that indicates termination of the algorithm.
It must be a ternary function object thats accepts the maximum
centrality, the descriptor of the edge that will be removed, and
the graph <tt class="computeroutput">g</tt>.<br>
<b>Python</b>: Any callable Python object will suffice.
</blockquote>
OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<blockquote>
This property map is used to accumulate the betweenness centrality
of each edge, and is a secondary form of output for the
algorithm. The type <tt>EdgeCentralityMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>, with the graph's edge descriptor type as its key
type. The value type of this property map should be the same as the
value type of the <tt>CentralityMap</tt> property map.<br>
<b>Default:</b> a <tt>dummy_property_map</tt>, which requires no
work to compute and returns no answer.<br>
<b>Python</b>: The color map must be a <tt>edge_double_map</tt> for
the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote>
IN: <tt>VertexIndexMap vertex_index</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the
heap data structure when an edge is relaxed. The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<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>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>
<table xmlns:rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%">
<tr>
<td align="left"></td>
<td align="right"></td>
</tr>
</table>
<h3>Where Defined</h3>
&lt;<a href=
"../../../boost/graph/bc_clustering.hpp">boost/graph/bc_clustering.hpp</a>&gt;
<hr>
<table>
<tr valign="top">
<td nowrap>Copyright &copy; 2004</td>
<td><a href="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</a>,
Indiana University (dgregor@cs.indiana.edu)<br>
<a href="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</a>, Indiana
University (<a href=
"mailto:lums@osl.iu.edu">lums@osl.iu.edu</a>)</td>
</tr>
</table>
</body>
</html>
+92 -55
View File
@@ -1,26 +1,22 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Bellman Ford Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:bellman-ford"></A>
<H1><A NAME="sec:bellman-ford"></A><img src="figs/python.gif" alt="(Python)"/>
<TT>bellman_ford_shortest_paths</TT>
</H1>
@@ -28,16 +24,20 @@
<PRE>
<i>// named paramter version</i>
template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class P, class T, class R&gt;
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>)
bool bellman_ford_shortest_paths(const EdgeListGraph&amp; g, Size N,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>);
template &lt;class <a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>, class P, class T, class R&gt;
bool bellman_ford_shortest_paths(const VertexAndEdgeListGraph&amp; g,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>);
<i>// non-named parameter version</i>
template &lt;class <a href="./EdgeListGraph.html">EdgeListGraph</a>, class Size, class WeightMap,
class PredecessorMap, class DistanceMap,
class <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">BinaryPredicate</a>,
class <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">BinaryFunction</a>, class <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">BinaryPredicate</a>,
class <a href="./BellmanFordVisitor.html">BellmanFordVisitor</a>&gt;
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N,
WeightMap weight, PredecessorMap pred, DistanceMap distance,
bool bellman_ford_shortest_paths(EdgeListGraph&amp; g, Size N,
WeightMap weight, PredecessorMap pred, DistanceMap distance,
BinaryFunction combine, BinaryPredicate compare, BellmanFordVisitor v)
</PRE>
@@ -51,7 +51,7 @@ shortest paths problem for a graph with both positive and negative
edge weights. For the definition of the shortest paths problem see
Section <A
HREF="./graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A>.
Algorithms</A>.
If you only need to solve the shortest paths problem for positive edge
weights, Dijkstra's algorithm provides a more efficient
alternative. If all the edge weights are all equal to one then breadth-first
@@ -61,7 +61,8 @@ search provides an even more efficient alternative.
<p>
Before calling the <tt>bellman_ford_shortest_paths()</tt> function,
the user must assign the source vertex a distance of zero and all
other vertices a distance of infinity. The Bellman-Ford algorithm
other vertices a distance of infinity <i>unless</i> you are providing
a starting vertex. The Bellman-Ford algorithm
proceeds by looping through all of the edges in the graph, applying
the relaxation operation to each edge. In the following pseudo-code,
<i>v</i> is a vertex adjacent to <i>u</i>, <i>w</i> maps edges to
@@ -76,7 +77,7 @@ ultimately be the parent in the shortest paths tree
<td valign="top">
<pre>
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i>
<b>else</b>
@@ -90,7 +91,7 @@ RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
relax edge <i>(u,v)</i>
edge <i>(u,v)</i> is not relaxed
edge <i>(u,v)</i> is not relaxed
</pre>
</td>
</tr>
@@ -113,19 +114,20 @@ otherwise.
<td valign="top">
<pre>
BELLMAN-FORD(<i>G</i>)
<b>for</b> each vertex <i>u in V</i>
<i>// Optional initialization</i>
<b>for</b> each vertex <i>u in V</i>
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<i>p[u] := u</i>
<b>end for</b>
<b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i>
<b>for</b> each edge <i>(u,v) in E</i>
<b>for</b> <i>i := 1</i> <b>to</b> <i>|V|-1</i>
<b>for</b> each edge <i>(u,v) in E</i>
RELAX(<i>u</i>, <i>v</i>, <i>w</i>, <i>d</i>, <i>p</i>)
<b>end for</b>
<b>end for</b>
<b>for</b> each edge <i>(u,v) in E</i>
<b>for</b> each edge <i>(u,v) in E</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<b>return</b> (false, , )
<b>else</b>
<b>else</b>
...
<b>end for</b>
<b>return</b> (true, <i>p</i>, <i>d</i>)
@@ -134,7 +136,8 @@ BELLMAN-FORD(<i>G</i>)
<td valign="top">
<pre>
initialize vertex <i>u</i>
@@ -145,9 +148,9 @@ examine edge <i>(u,v)</i>
edge <i>(u,v)</i> was not minimized
edge <i>(u,v)</i> was not minimized
edge <i>(u,v)</i> was minimized
edge <i>(u,v)</i> was minimized
</pre>
</td>
</tr>
@@ -163,8 +166,8 @@ shortest paths tree in the <tt>predecessor_map()</tt>. For each vertex
<i>u in V</i>, <i>p[u]</i> will be the predecessor of <i>u</i> in the
shortest paths tree (unless <i>p[u] = u</i>, in which case <i>u</i> is
either the source vertex or a vertex unreachable from the source). In
addition to these two options, the user can provide there own
custom-made visitor that can takes actions during any of the
addition to these two options, the user can provide her own
custom-made visitor that can take actions at any of the
algorithm's event points.
<P>
@@ -172,16 +175,23 @@ algorithm's event points.
<h3>Parameters</h3>
IN: <tt>EdgeListGraph&amp; g</tt>
IN: <tt>EdgeListGraph&amp; g</tt>
<blockquote>
A directed or undirected graph whose type must be a model of
<a href="./EdgeListGraph.html">Edge List Graph</a>.
<a href="./EdgeListGraph.html">Edge List Graph</a>. If a root vertex is
provided, then the graph must also model
<a href="./VertexListGraph.html">Vertex List Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>Size N</tt>
<blockquote>
The number of vertices in the graph. The type <tt>Size</tt> must
be an integer type.
be an integer type.<br>
<b>Default:</b> <tt>num_vertices(g)</tt>.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
@@ -191,14 +201,17 @@ IN: <tt>weight_map(WeightMap w)</tt>
<blockquote>
The weight (also know as ``length'' or ``cost'') of each edge in the
graph. The <tt>WeightMap</tt> type must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type for this property map must be the edge
descriptor of the graph. The value type for the weight map must be
<i>Addable</i> with the distance map's value type. <br>
<b>Default:</b> <tt>get(edge_weight, g)</tt>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
<b>Python</b>: Must be an <tt>edge_double_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
</blockquote>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
@@ -206,24 +219,38 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
u</i> then <i>u</i> is either the source vertex or a vertex that is
not reachable from the source. The <tt>PredecessorMap</tt> type
must be a <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> which key and vertex types the same as the vertex
descriptor type of the graph.<br>
<b>Default:</b> <tt>dummy_property_map</tt>
<b>Default:</b> <tt>dummy_property_map</tt><br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote>
IN/OUT: <tt>distance_map(DistanceMap d)</tt>
IN/OUT: <tt>distance_map(DistanceMap d)</tt>
<blockquote>
The shortest path weight from the source vertex to each vertex in
the graph <tt>g</tt> is recorded in this property map. The type
<tt>DistanceMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The key type of the property map must be the
vertex descriptor type of the graph, and the value type of the
distance map must be <a
href="http://www.sgi.com/tech/stl/LessThanComparable.html"> Less
href="http://www.boost.org/sgi/stl/LessThanComparable.html"> Less
Than Comparable</a>.<br> <b>Default:</b> <tt>get(vertex_distance,
g)</tt>
g)</tt><br>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
</blockquote>
IN: <tt>root_vertex(Vertex s)</tt>
<blockquote>
The starting (or "root") vertex from which shortest paths will be
computed. When provided, the distance map need not be initialized
(the algorithm will perform the initialization itself). However, the
graph must model <a href="./VertexListGraph.html">Vertex List
Graph</a> when this parameter is provided.<br>
<b>Default:</b> None; if omitted, the user must initialize the
distance map.
</blockquote>
IN: <tt>visitor(BellmanFordVisitor v)</tt>
@@ -233,7 +260,13 @@ IN: <tt>visitor(BellmanFordVisitor v)</tt>
The visitor object is passed by value <a
href="#1">[1]</a>.
<br>
<b>Default:</b> <tt>bellman_visitor&lt;null_visitor&gt;</tt>
<b>Default:</b> <tt>bellman_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a
href="BellmanFordVisitor.html#python"><tt>BellmanFordVisitor</tt></a> type
of the graph.
</blockquote>
IN: <tt>distance_combine(BinaryFunction combine)</tt>
@@ -244,7 +277,9 @@ IN: <tt>distance_combine(BinaryFunction combine)</tt>
type. The result type must be the same as the distance map's value
type.<br>
<b>Default:</b><tt>std::plus&lt;D&gt;</tt>
with <tt>D=typename&nbsp;property_traits&lt;DistanceMap&gt;::value_type</tt>.
with <tt>D=typename&nbsp;property_traits&lt;DistanceMap&gt;::value_type</tt>.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_compare(BinaryPredicate compare)</tt>
@@ -253,7 +288,9 @@ IN: <tt>distance_compare(BinaryPredicate compare)</tt>
that compares distances in the relaxation step. The argument types
must match the distance map's value type.<br>
<b>Default:</b> <tt>std::less&lt;D&gt;</tt>
with <tt>D=typename&nbsp;property_traits&lt;DistanceMap&gt;::value_type</tt>.
with <tt>D=typename&nbsp;property_traits&lt;DistanceMap&gt;::value_type</tt>.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
<P>
@@ -270,11 +307,11 @@ The time complexity is <i>O(V E)</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every edge in
the graph <i>|V|</i> times.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b> is invoked when the distance
label for the target vertex is decreased. The edge <i>(u,v)</i> that
label for the target vertex is decreased. The edge <i>(u,v)</i> that
participated in the last relaxation for vertex <i>v</i> is an edge in the
shortest paths tree.
shortest paths tree.
<li><b><tt>vis.edge_not_relaxed(e, g)</tt></b> is invoked if the distance label
for the target vertex is not decreased.
for the target vertex is not decreased.
<li><b><tt>vis.edge_minimized(e, g)</tt></b> is invoked during the
second stage of the algorithm, during the test of whether each edge
was minimized. If the edge is minimized then this function
@@ -293,7 +330,7 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
<h3>Notes</h3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -305,8 +342,8 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: bellman_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ bellman_visitor&lt;EventVisitorList&gt;
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
href="./EventVisitor.html">EventVisitor</a>s (constructed using
<tt>std::pair</tt>) into a <a
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>.
@@ -67,7 +63,7 @@ with <tt>std::pair</tt>.
This class implements all of the member functions required by <a
href="./BellmanFordVisitor.html">BellmanFordVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
<h3>Non-Member Functions</h3>
@@ -101,15 +97,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+307
View File
@@ -0,0 +1,307 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--
Copyright (c) 2004 Trustees of Indiana University
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: Brandes' Betweenness Centrality</title>
</head>
<body>
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<h1><img src="figs/python.gif" alt="(Python)"/><tt>brandes_betweenness_centrality</tt></h1>
<p>
<pre>
<em>// named parameter versions</em>
template&lt;typename Graph, typename Param, typename Tag, typename Rest&gt;
void
brandes_betweenness_centrality(const Graph&amp; g,
const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params);
template&lt;typename Graph, typename CentralityMap&gt;
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap&gt;
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality);
<em>// non-named parameter versions</em>
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap,
typename IncomingMap, typename DistanceMap, typename DependencyMap,
typename PathCountMap, typename VertexIndexMap&gt;
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality,
IncomingMap incoming,
DistanceMap distance, DependencyMap dependency,
PathCountMap path_count,
VertexIndexMap vertex_index);
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap,
typename IncomingMap, typename DistanceMap, typename DependencyMap,
typename PathCountMap, typename VertexIndexMap, typename WeightMap&gt;
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality,
IncomingMap incoming,
DistanceMap distance, DependencyMap dependency,
PathCountMap path_count,
VertexIndexMap vertex_index,
WeightMap weight_map);
<em>// helper functions</em>
template&lt;typename Graph, typename CentralityMap&gt;
void
relative_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap&gt;
typename property_traits&lt;CentralityMap&gt;::value_type
central_point_dominance(const Graph&amp; g, CentralityMap centrality_map);
</pre>
<p>This algorithm&nbsp;[<a href="bibliography.html#brandes01">54</a>]
computes the <em>betweenness centrality</em>&nbsp;[<a
href="bibliography.html#freeman77">55</a>,<a
href="bibliography.html#anthonisse71">56</a>] of each vertex or each
edge in the graph. The betweenness centrality of a vertex <em>v</em>
is defined by
<p><img src="figs/betweenness_centrality.gif">,
<p>where <img src="figs/sigma_st.gif"> is the number of shortest paths from
vertex <em>s</em> to vertex <em>t</em> and <img src="figs/sigma_stv.gif">
is the number of shortest paths from vertex <em>s</em> to vertex
<em>t</em> that pass through vertex <em>v</em>.
<!-- \sum_{s \neq v \neq t}\frac{\sigma_{st}(v)}{\sigma_{st}} -->
<p>The edge betweenness centrality indicates for each edge the
betweenness centrality that was contributed to the target(s) of the
edge (plural for undirected graphs). Similar to (vertex) betweenness
centrality, edge betweenness centrality can be used to determine the
edges through which most shortest paths must pass. A single invocation
of this algorithm can compute either the vertex or edge centrality (or
both).</p>
<p>This algorithm can operate either on weighted graphs (if a suitable
edge weight map is supplied) or unweighted graphs (if no edge weight
map is supplied). The result is the absolute betweenness centrality;
to convert to the relative betweenness centrality, which scales each
absolute centrality by <img src="figs/rel_betweenness_centrality.gif">
(where <em>n</em> is the number of vertices in the graph), use
<tt>relative_betweenness_centrality</tt>. Given the relative
betweenness centrality, one can compute the <em>central point
dominance</em>&nbsp;[<a href="bibliography.html#freeman77">55</a>], which is a measure of the maximum "betweenness" of any
point in the graph: it will be 0 for complete graphs and
1 for "wheel" graphs (in which there is a central vertex that all
paths include; see <a href="#Fig1">Fig. 1</a>). Let <img src="figs/v_star.gif"> be the vertex with the largest relative betweenness centrality; then, the central point dominance is defined as:
<p><img src="figs/central_point_dominance.gif">
<!-- C_B' = \frac{\sum_{v \in V} C_B(v^*) - C_B'(v)}{n-1} -->
<p><a name="Fig1">
<table border="1">
<thead>
<tr>
<th>Fig. 1: A wheel graph, where every path travels through the central node. <br>The central point dominance of this graph is 1.</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><img src="figs/wheel_graph.gif"></td>
</tr>
</tbody>
</table>
<h3>Where Defined</h3>
<a href="../../../boost/graph/betweenness_centrality.hpp"><tt>boost/graph/betweenness_centrality.hpp</tt></a>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied. The type
<tt>Graph</tt> must be a model of <a
href="VertexListGraph.html">Vertex List Graph</a> and <a
href="IncidenceGraph.html">Incidence Graph</a>. When an edge
centrality map is supplied, it must also model <a
href="EdgeListGraph.html">Edge List Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
UTIL: <tt>IncomingMap incoming</tt>
<blockquote>
This property map records the set of edges incoming to each vertex that comprise a shortest path from a particular source vertex through this vertex, and is used internally by the algorithm.The <tt>IncomingMap</tt> type must be a <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a> whose key type is the same as the vertex descriptor type of
the graph and whose value type is a Sequence (e.g., an
<tt>std::vector</tt>) containing edge descriptors.<br>
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>std::vector&lt;Edge&gt;</tt>, where
<tt>Edge</tt> is the edge descriptor type of the graph.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>DistanceMap distance_map</tt>
<blockquote>
The shortest path weight from each source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map, but
the result is only used internally. The type <tt>DistanceMap</tt>
must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map. The value type of the
distance map is the element type of a <a
href="./Monoid.html">Monoid</a>.<br>
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type (or the
<tt>vertices_size_type</tt> of the graph when no weight map exists)
of size <tt>num_vertices(g)</tt> and using the <tt>vertex_index</tt> for
the index map.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>DependencyMap dependency</tt>
<blockquote>
Property map used internally to accumulate partial betweenness
centrality results. The type <tt>DependencyMap</tt> must be a model
of <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the dependency map. The value type of
the dependency map must be compatible with the value type of the
centrality map.<br>
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>CentralityMap</tt>'s value type of
size <tt>num_vertices(g)</tt> and using the <tt>vertex_index</tt>
for the index map.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>PathCountMap path_count</tt>
<blockquote>
Property map used internally to accumulate the number of paths that
pass through each particular vertex. The type <tt>PathCountMap</tt>
must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the dependency map. The value type of
the dependency map must be an integral type large enough to store
the number of paths in the graph.<br>
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>degree_size_type</tt> of the graph of
size <tt>num_vertices(g)</tt> and using the <tt>vertex_index</tt>
for the index map.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
<h3>Named parameters</h3>
OUT/UTIL: <tt>CentralityMap centrality_map</tt>
<blockquote>
This property map is used to accumulate the betweenness centrality
of each vertex, and is the primary output of the algorithm. The type
<tt>CentralityMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>, with the graph's vertex descriptor type as its key
type. The value type of this property map should be a floating-point
or rational type.<br>
<b>Default:</b> a <tt>dummy_property_map</tt>, which requires no
work to compute and returns no answer.<br>
<b>Python</b>: The color map must be a <tt>vertex_double_map</tt> for
the graph.<br>
<b>Python default</b>: <tt>graph.get_vertex_double_map("centrality")</tt>
</blockquote>
OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<blockquote>
This property map is used to accumulate the betweenness centrality
of each edge, and is a secondary form of output for the
algorithm. The type <tt>EdgeCentralityMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>, with the graph's edge descriptor type as its key
type. The value type of this property map should be the same as the
value type of the <tt>CentralityMap</tt> property map.<br>
<b>Default:</b> a <tt>dummy_property_map</tt>, which requires no
work to compute and returns no answer.<br>
<b>Python</b>: The color map must be a <tt>edge_double_map</tt> for
the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the
heap data structure when an edge is relaxed. The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<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>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>
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph. The weights
must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for this map must be
the same as the value type of the distance map.<br>
<b>Default:</b> All edge weights are assumed to be equivalent.
<b>Python</b>: If supplied, must be an <tt>edge_double_map</tt> for the graph.
</blockquote>
<h3>Complexity</h3>
The time complexity is <em>O(VE)</em> for unweighted graphs and
<em>O(VE + V(V+E) log V)</em> for weighted graphs. The space complexity
is <em>O(VE)</em>.
<hr>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</A>, Indiana University (dgregor@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
<!-- Created: Fri Jun 4 16:42:50 EST 2004 -->
<!-- hhmts start -->Last modified: Tue Mar 1 14:14:51 EST 2005 <!-- hhmts end -->
</body>
</html>
+18 -22
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: bfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ bfs_visitor&lt;EventVisitorList&gt;
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
href="./EventVisitor.html">EventVisitor</a>s (constructed using
<tt>std::pair</tt>) into a <a href="./BFSVisitor.html">BFSVisitor</a>.
@@ -42,10 +38,10 @@ visitor.
<pre>
// Construct graph G and obtain the source vertex s ...
boost::breadth_first_search(G, s,
boost::breadth_first_search(G, s,
boost::make_bfs_visitor(
std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
std::make_pair(boost::record_predecessors(p.begin(),
std::make_pair(boost::record_predecessors(p.begin(),
boost::on_tree_edge()),
copy_graph(G_copy, boost::on_examine_edge())))) );
</pre>
@@ -84,7 +80,7 @@ with <tt>std::pair</tt>.
This class implements all of the member functions required by <a
href="./BFSVisitor.html">BFSVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
<h3>Non-Member Functions</h3>
@@ -118,15 +114,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Named Parameters</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -42,7 +38,7 @@ reasons:
he or she has to resort to providing all the parameters.
<li>Since the list of parameters is long, it is easy to forget
the ordering.
the ordering.
</ul>
<p>
@@ -58,7 +54,7 @@ indicates which parameter the argument is for. Each of the named
parameters is separated by a <b>period</b>, not a comma.
<pre>
bool r = boost::bellman_ford_shortest_paths(g, int(N),
bool r = boost::bellman_ford_shortest_paths(g, int(N),
boost::weight_map(weight).
distance_map(&amp;distance[0]).
predecessor_map(&amp;parent[0]));
@@ -70,7 +66,7 @@ an call to <tt>bellman_ford_shortest_paths</tt> that is equivalent to
the one above.
<pre>
bool r = boost::bellman_ford_shortest_paths(g, int(N),
bool r = boost::bellman_ford_shortest_paths(g, int(N),
boost::predecessor_map(&amp;parent[0]).
distance_map(&amp;distance[0]).
weight_map(weight));
@@ -86,12 +82,12 @@ like <tt>boost::weight_map</tt> that create an instance of
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
+140 -19
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Bibliography</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -152,7 +148,7 @@ J.&nbsp;W.&nbsp;H. Liu.
<P></P><DT><A NAME="mehlhorn99:_leda">22</A>
<DD>
K.&nbsp;Mehlhorn and S.&nbsp;Näher.
K.&nbsp;Mehlhorn and S.&nbsp;Näher.
<BR><EM>The LEDA Platform of Combinatorial and Geometric Computing</EM>.
<BR>Cambridge University Press, 1999.
@@ -268,7 +264,7 @@ SIAM Journal on Computing, 1(2):146-160, 1972
<P></P><DT><A NAME="eppstein97:dynamic_graph">42</a>
<DD>David Eppstein, Zvi Galil, and Giuseppe F. Italiano<BR>
<EM>Dynamic Graph Algorithms.</EM><br>
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
Chapter 22, CRC Handbook of Algorithms and Theory of Computation, 1997.
<P></P><DT><A NAME="cuthill69:reducing_bandwith">43</a>
<DD>E. Cuthill and J. McKee<BR>
@@ -332,15 +328,140 @@ Automata, Languages and Programming, 376-386, 1986
<EM>A Transitive Closure Algorithm</EM><br>
BIT, 10, 1970, pp. 76-94.
</DL>
<p></p><dt><a name="brandes01">54</a>
<dd>Ulrik Brandes<br>
<em><a href="http://ella.slis.indiana.edu/~katy/L579/brandes.pdf">A
Faster Algorithm for Betweenness Centrality</a></em><br>
Journal of Mathematical Sociology 25 (2):163-177, 2001.
<p></p><dt><a name="freeman77">55</a>
<dd>Lindon C. Freeman<br>
<em>A Set of Measures of Centrality Based on Betweenness</em><br>
Sociometry 40, pp. 35-41, 1977.
<p></p><dt><a name="anthonisse71">56</a>
<dd>J.M. Anthonisse<br>
<em>The rush in a directed graph.</em><br>
Technical Report BN9/71, Stichting Mahtematisch Centrum, Amsterdam, 1971.
<p></p><dt><a name="kamada89">57</a>
<dd>T. Kamada and S. Kawai<br>
<em>An algorithm for drawing general undirected graphs.</em><br>
Information Processing Letters, 31, pp. 7-15, 1989.
<p></p><dt><a name="fruchterman91">58</a>
<dd>T. Fruchterman and E. Reingold<br>
<em>Graph drawing by force-directed placement.</em><br>
Software--Practice &amp; Experience, 21 (11), pp. 1129-1164, 1991.
<p></p><dt><a name="coleman83">59</a>
<dd>Thomas F. Coleman and Jorge J. More<br>
<em>Estimation of sparse Jacobian
matrices and graph coloring problems.</em><br>
Journal of Numerical Analasis V20, pp. 187-209, 1983.
<p></p><dt><a name="gursoy00">60</a>
<dd>Attila G&uuml;rsoy and Murat Atun<br>
<em>Neighborhood Preserving Load Balancing: A Self-Organizing Approach</em>
<br>
Euro-Par Parallel Processing, LNCS 1900, pp. 324-41, 2000.
<p></p><dt><a name="driscoll88">61</a>
<dd>James R. Driscoll, Harold N. Gabow, Ruth Shrairman, and Robert E. Tarjan<br>
<em>Relaxed Heaps: An alternative for Fibonacci Heaps with applications to parallel computation.</em><br>
Communications of the ACM, 31 (11), pp. 1343-1354, November 1988.
<p></p><dt><a name="king70">62</a>
<dd>King, I. P.<br>
<em>An automatic reordering scheme for simultaneous equations derived from network analysis.</em><br>
Int. J. Numer. Methods Engrg. 2, pp. 523-533, 1970.
<p></p><dt><a name="palmer2000">63</a>
<dd>C. Palmer and J. Steffan<br>
<em>Generating Network Topologies That Obey Power Laws</em><br>
Proceedings of GLOBECOM. November, 2000.
<p></p><dt><a name="edmonds65">64</a>
<dd>J. Edmonds<br>
<em>Paths, trees, and flowers</em><br>
Canadian Journal of Mathematics 17 (1965), pp. 449-467.
<p></p><dt><a name="lengauer-tarjan79">65</a>
<dd>Thomas Lengauer and Robert Endre Tarjan<br>
<em>A fast algorithm for finding dominators in a flowgraph</em><br>
ACM Transactions on Programming Language and Systems, 1(1):121-141, 1979.
<p></p><dt><a name="muchnick97">66</a>
<dd>Steven S. Muchnick<br>
<em>Advanced Compiler Design and Implementation</em><br>
Morgan Kaufmann Publishers, San Fransisco, 1997.
<p></p><dt><a name="appel98">67</a>
<dd>Andrew W. Appel<br>
<em>Modern Compiler Implementation in JAVA</em><br>
Cambridge University Press, 1998.
<p></p><dt><a name="kolmogorov03">68</a>
<dd>Vladimir Kolmogorov<br>
<em>Graph Based Algorithms for Scene Reconstruction from Two or More Views</em><br>
PhD thesis, Cornell University, September 2003.
<p></p><dt><a name="boykov-kolmogorov04">69</a>
<dd>Yuri Boykov and Vladimir Kolmogorov<br>
<em><a href="http://www.csd.uwo.ca/faculty/yuri/Abstracts/pami04-abs.html">An Experimental Comparison of Min-Cut/Max-Flow Algorithms for Energy Minimization in Vision</a></em><br>
In <em>IEEE Transactions on Pattern Analysis and Machine Intelligence</em>, vol. 26, no. 9, pp. 1124-1137, Sept. 2004.
<p></p><dt><a name="boyermyrvold04">70</a>
<dd>John M. Boyer and Wendy J. Myrvold<br>
<em><a href="http://www.emis.de/journals/JGAA/accepted/2004/BoyerMyrvold2004.8.3.pdf">
On the Cutting Edge: Simplified O(n) Planarity by Edge Addition</a>
</em><br>
Journal of Graph Algorithms and Applications, 8(2): 241-273, 2004.
<p></p><dt><a name="chrobakpayne95">71</a>
<dd>M. Chrobak, T. Payne<br>
<em>
A Linear-time Algorithm for Drawing a Planar Graph on the Grid
</em><br>
Information Processing Letters 54: 241-246, 1995.
<p></p><dt><a name="defraysseixpachpollack90">72</a>
<dd>H. de Fraysseix, J. Pach, R. Pollack<br>
<em>
How to Draw a Planar Graph on a Grid
</em><br>
Combinatorica 10: 41-51, 1990.
<P></P><DT><A NAME="wilson96generating">73</A>
<DD>
David&nbsp;Bruce&nbsp;Wilson
<BR><em>Generating random spanning trees more quickly than the cover time</em>.
ACM Symposium on the Theory of Computing, pp. 296-303, 1996.
<p></p><dt><a name="edmonds65:_max_weighted_match">74</a>
<dd>J. Edmonds<br>
<em>Maximum Matching and a Polyhedron with 0, 1-Vertices</em><br>
Journal of Research of the National Bureau of Standards B 69, pp. 125-130, 1965.
<p></p><dt><a name="gabow76">75</a>
<dd>Harold N. Gabow<br>
<em>An Efficient Implementation of Edmonds' Algorithm for Maximum Matching on Graphs</em><br>
Journal of the ACM (JACM), 23(2): 221-234, 1976.
<p></p><dt><a name="gabow90">76</a>
<dd>Harold N. Gabow<br>
<em>Data Structures for Weighted Matching and Nearest Common Ancestors with Linking</em><br>
Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 434-443, 1990.
</dl>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+263
View File
@@ -0,0 +1,263 @@
<HTML>
<!--
Copyright 2001-2004 The Trustees of Indiana University.
Use, modification and distribution is 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)
Authors: Douglas Gregor
Jeremy Siek
Andrew Lumsdaine
-->
<Head>
<Title>Boost Graph Library: Biconnected Components and Articulation Points</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h1>
<TT>
<img src="figs/python.gif" alt="(Python)"/>
<A NAME="sec:biconnected-components">biconnected_components
</A>
</TT>
and
<tt>articulation_points</tt>
</h1>
<PRE>
<i>// named parameter version</i>
template &lt;typename Graph, typename ComponentMap, typename OutputIterator,
typename P, typename T, typename R&gt;
std::pair&lt;std::size_t, OutputIterator&gt;
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
const bgl_named_params&lt;P, T, R&gt;&amp; params)
template &lt;typename Graph, typename ComponentMap,
typename P, typename T, typename R&gt;
std::size_t
biconnected_components(const Graph& g, ComponentMap comp,
const bgl_named_params&lt;P, T, R&gt;&amp; params)
template &lt;typename Graph, typename OutputIterator,
typename P, typename T, typename R&gt;
OutputIterator articulation_points(const Graph& g, OutputIterator out,
const bgl_named_params&lt;P, T, R&gt;&amp; params)
<i>// non-named parameter version</i>
template &lt;typename Graph, typename ComponentMap, typename OutputIterator,
typename DiscoverTimeMap, typename LowPointMap&gt;
std::pair&lt;std::size_t, OutputIterator&gt;
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
DiscoverTimeMap discover_time, LowPointMap lowpt);
template &lt;typename Graph, typename ComponentMap, typename OutputIterator&gt;
std::pair&lt;std::size_t, OutputIterator&gt;
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out);
template &lt;typename Graph, typename ComponentMap&gt;
std::size_t biconnected_components(const Graph& g, ComponentMap comp);
<a name="sec:articulation_points">
template &lt;typename Graph, typename OutputIterator&gt;
OutputIterator articulation_points(const Graph& g, OutputIterator out);
</PRE>
<P>
A connected graph is <i>biconnected</i> if the removal of any single
vertex (and all edges incident on that vertex) can not disconnect the
graph. More generally, the biconnected components of a graph are the
maximal subsets of vertices such that the removal of a vertex from a
particular component will not disconnect the component. Unlike
connected components, vertices may belong to multiple biconnected
components: those vertices that belong to more than one biconnected
component are called <em>articulation points</em> or, equivalently,
<em>cut vertices</em>. Articulation points are vertices whose removal
would increase the number of connected components in the graph. Thus,
a graph without articulation points is biconnected. The following
figure illustrates the articulation points and biconnected components
of a small graph:
<p><center><img src="figs/biconnected.png"></center>
<p>Vertices can be present in multiple biconnected components, but each
edge can only be contained in a single biconnected component. The
output of the <tt>biconnected_components</tt> algorithm records the
biconnected component number of each edge in the property map
<tt>comp</tt>. Articulation points will be emitted to the (optional)
output iterator argument to <tt>biconnected_components</tt>, or can be
computed without the use of a biconnected component number map via
<tt>articulation_points</tt>. These functions return the number of
biconnected components, the articulation point output iterator, or a
pair of these quantities, depending on what information was
recorded.
<p>The algorithm implemented is due to Tarjan [<a href="bibliography.html#tarjan72:dfs_and_linear_algo">41</a>].
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/biconnected_components.hpp"><TT>boost/graph/biconnected_components.hpp</TT></a>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
An undirected graph. The graph type must be a model of <a
href="VertexListGraph.html">Vertex List Graph</a> and <a
href="IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
OUT: <tt>ComponentMap c</tt>
<blockquote>
The algorithm computes how many biconnected components are in the graph,
and assigning each component an integer label. The algorithm then
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 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>
<b>Python</b>: Must be an <tt>edge_int_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_int_map("bicomponent")</tt>
</blockquote>
OUT: <tt>OutputIterator out</tt>
<blockquote>
The algorithm writes articulation points via this output
iterator and returns the resulting iterator.<br>
<b>Default</b>: a dummy iterator that ignores values written to it.<br>
<b>Python</b>: this parameter is not used in Python. Instead, both
algorithms return a Python <tt>list</tt> containing the articulation
points.
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>discover_time_map(DiscoverTimeMap discover_time)</tt>
<blockquote>
The discovery time of each vertex in the depth-first search. The
type <tt>DiscoverTimeMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The value type of the map must be an integer
type. The vertex descriptor type of the graph needs to be usable as
the key type of the map.<br>
<b>Default</b>: an <a
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>vertices_size_type</tt> of size
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
the index map.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>lowpoint_map(LowPointMap lowpt)</tt>
<blockquote>
The low point of each vertex in the depth-first search, which is the
smallest vertex reachable from a given vertex with at most one back
edge. The type <tt>LowPointMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The value type of the map must be an integer
type. The vertex descriptor type of the graph needs to be usable as
the key type of the map.<br>
<b>Default</b>: an <a
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>vertices_size_type</tt> of size
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
the index map.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the depth first search tree.
The <tt>PredecessorMap</tt> type
must be a <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> whose key and value types are the same as the vertex
descriptor type of the graph.<br>
<b>Default:</b> an <a
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>vertex_descriptor</tt> of size
<tt>num_vertices(g)</tt> and using <tt>get(vertex_index, g)</tt> for
the index map.<br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote>
IN: <tt>visitor(DFSVisitor vis)</tt>
<blockquote>
A visitor object that is invoked inside the algorithm at the
event-points specified by the <a href="./DFSVisitor.html">DFS
Visitor</a> concept. The visitor object is passed by value <a
href="#1">[1]</a>. <br> <b>Default:</b>
<tt>dfs_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a href="DFSVisitor.html#python"><tt>DFSVisitor</tt></a> type of
the graph.
</blockquote>
<H3>Complexity</H3>
<P>
The time complexity for the biconnected components and articulation
points algorithms
<i>O(V + E)</i>.
<P>
<H3>Example</H3>
<P> The file <a
href="../example/biconnected_components.cpp"><tt>examples/biconnected_components.cpp</tt></a>
contains an example of calculating the biconnected components and
articulation points of an undirected graph.
<h3>Notes</h3>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
passed in. Therefore you may want the visitor to hold this state by
pointer or reference.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2004</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana
University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<a href="http://www.boost.org/people/doug_gregor.html">Doug Gregor</a>, Indiana University
</TD></TR></TABLE>
</BODY>
</HTML>
+9 -8
View File
@@ -5,7 +5,7 @@
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{latexsym}
\usepackage{latexsym}
\usepackage{jweb}
\usepackage{times}
\usepackage{graphicx}
@@ -156,11 +156,11 @@ template.
@d Concept checking of type parameters
@{
function_requires< VertexListGraphConcept<Graph> >();
function_requires< IncidenceGraphConcept<Graph> >();
function_requires< WritablePropertyMapConcept<ComponentMap, edge_t> >();
function_requires< ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> >();
function_requires< ReadWritePropertyMapConcept<LowPointMap, vertex_t> >();
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, edge_t> ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<LowPointMap, vertex_t> ));
@}
The first step of the algorithm is to initialize the discover times of
@@ -285,7 +285,8 @@ S.pop();
#include <boost/limits.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/graph_concepts.hpp>
#include <boost/property_map.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/concept/assert.hpp>
namespace boost {
@<Biconnected Components Algorithm@>
@@ -357,7 +358,7 @@ int main()
% \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that
% \paragraph{Definition.} A \emph{palm tree} $P$ is a directed graph that
% consists of two disjoint sets of edges, denoted by $v \rightarrow w$
% and $v \backedge w$ respectively, with the following properties:
+259
View File
@@ -0,0 +1,259 @@
<HTML>
<!-- Copyright 2007 Aaron Windsor
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: Boyer-Myrvold Planarity Testing/Embedding</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>Boyer-Myrvold Planarity Testing/Embedding</H1>
<p>
A graph is <a href="./planar_graphs.html#planar"><i>planar</i></a> if it can
be drawn in two-dimensional space without any of its edges crossing. Such a
drawing of a planar graph is called a
<a href="./planar_graphs.html#plane_drawing"><i>plane drawing</i></a>. Each
plane drawing belongs to an equivalence class called a <i>planar embedding</i>
<a href="#1">[1]</a> that is defined by the clockwise ordering of adjacent
edges around each vertex in the graph. A planar embedding is a convenient
intermediate representation of an actual drawing of a planar graph, and many
planar graph drawing algorithms are formulated as functions mapping a planar
embedding to a plane drawing.
<br>
<br>
<table align="center" class="image">
<caption align="bottom"><h5>A planar graph (top left), along with a planar
embedding of that graph (bottom left) can be used to create a plane drawing
(right) by embedding edges around each vertex in the order in which they
appear in the planar embedding.
</h5></caption>
<tr><td>
<img src="./figs/embedding_illustration.png">
</td></tr>
<tr></tr>
<tr></tr>
</table>
<br>
<p>
The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity
testing/embedding algorithm of Boyer and Myrvold
[<a href="./bibliography.html#boyermyrvold04">70</a>].
<tt>boyer_myrvold_planarity_test</tt> returns <tt>true</tt> if the input graph
is planar and <tt>false</tt> otherwise. As a side-effect of this test, a planar
embedding can be constructed if the graph is planar or a minimal set of edges
that form a <a href = "./planar_graphs.html#kuratowskisubgraphs">Kuratowski
subgraph</a> can be found if the graph is not planar.
<tt>boyer_myrvold_planarity_test</tt> uses named parameter arguments (courtesy
of the <a href="../../parameter/doc/html/index.html">Boost.Parameter</a>
library) to specify what the function actually does. Some examples are:
<ul>
<li>Testing whether or not a graph is planar:
<pre>
bool is_planar = boyer_myrvold_planarity_test(g);
</pre>
<li>Computing a planar embedding for a graph if it is planar, otherwise finding
a set of edges that forms an obstructing Kuratowski subgraph:
<pre>
if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
boyer_myrvold_params::embedding = embedding_pmap,
boyer_myrvold_params::kuratowski_subgraph = out_itr
)
)
{
//do something with the embedding in embedding_pmap
}
else
{
//do something with the kuratowski subgraph output to out_itr
}
</pre>
</ul>
<p>
The parameters passed to <tt>boyer_myrvold_planarity_test</tt> in the examples
above do more than just carry the data structures used for input and output -
the algorithm is optimized at compile time based on which parameters are
present. A complete list of parameters accepted and their interactions are
described below.
<p>
<tt>boyer_myrvold_planarity_test</tt> accepts as input any undirected graph,
even those with self-loops and multiple edges.
However, many planar graph drawing algorithms make additional restrictions
on the structure of the input graph - for example, requiring that the input
graph is connected, biconnected, or even maximal planar (triangulated.)
Fortunately, any planar graph on <i>n</i> vertices that lacks one of these
properties can be augmented with additional edges so that it satisfies that
property in <i>O(n)</i> time - the functions
<tt><a href="./make_connected.html">make_connected</a></tt>,
<tt><a href="./make_biconnected_planar.html">make_biconnected_planar</a></tt>,
and <tt><a href="./make_maximal_planar.html">make_maximal_planar</a></tt>
exist for this purpose. If the graph drawing algorithm you're using requires,
say, a biconnected graph, then you must make your input graph biconnected
<i>before</i> passing it into <tt>boyer_myrvold_planarity_test</tt> so that the
computed planar embedding includes these additional edges. This may require
more than one call to <tt>boyer_myrvold_planarity_test</tt> depending on the
structure of the graph you begin with, since both
<tt>make_biconnected_planar</tt> and <tt>make_maximal_planar</tt> require a
planar embedding of the existing graph as an input parameter.
<p><p>
The named parameters accepted by <tt>boyer_myrvold_planarity_test</tt> are:
<ul>
<li><b><tt>graph</tt></b> : The input graph - this is the only required
parameter.
<li><b><tt>vertex_index_map</tt></b> : A mapping from vertices of the input
graph to indexes in the range <tt>[0..num_vertices(g))</tt>. If this parameter
is not provided, the vertex index map is assumed to be available as an interior
property of the graph, accessible by calling <tt>get(vertex_index, g)</tt>.
<li><b><tt>edge_index_map</tt></b>: A mapping from the edges of the input graph
to indexes in the range <tt>[0..num_edges(g))</tt>. This parameter is only
needed if the <tt>kuratowski_subgraph</tt> argument is provided. If the
<tt>kuratowski_subgraph</tt> argument is provided and this parameter is not
provided, the EdgeIndexMap is assumed to be available as an interior property
accessible by calling <tt>get(edge_index, g)</tt>.
<li><b><tt>embedding</tt></b> : If the graph is planar, this will be populated
with a mapping from vertices to the clockwise order of neighbors in the planar
embedding.
<li><b><tt>kuratowski_subgraph</tt></b> : If the graph is not planar, a minimal
set of edges that form the obstructing Kuratowski subgraph will be written to
this iterator.
</ul>
These named parameters all belong to the namespace
<tt>boyer_myrvold_params</tt>. See below for more information on the concepts
required for these arguments.
<H3>Verifying the output</H3>
Whether or not the input graph is planar, <tt>boyer_myrvold_planarity_test</tt>
can produce a certificate that can be automatically checked to verify that the
function is working properly.
<p>
If the graph is planar, a planar embedding can be produced. The
planar embedding can be verified by passing it to a plane drawing routine
(such as <tt><a href="straight_line_drawing.html">
chrobak_payne_straight_line_drawing</a></tt>) and using the function
<tt><a href="is_straight_line_drawing.html">is_straight_line_drawing</a></tt>
to verify that the resulting graph is planar.
<p>
If the graph is not planar, a set of edges that forms a Kuratowski subgraph in
the original graph can be produced. This set of edges can be passed to the
function <tt><a href="is_kuratowski_subgraph.html">is_kuratowski_subgraph</a>
</tt> to verify that they can be contracted into a <i>K<sub>5</sub></i> or
<i>K<sub>3,3</sub></i>. <tt>boyer_myrvold_planarity_test</tt> chooses the set
of edges forming the Kuratowski subgraph in such a way that the contraction to
a <i>K<sub>5</sub></i> or <i>K<sub>3,3</sub></i> can be done by a simple
deterministic process which is described in the documentation to
<tt>is_kuratowski_subgraph</tt>.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/boyer_myrvold_planar_test.hpp">
<TT>boost/graph/boyer_myrvold_planar_test.hpp</TT>
</a>
<H3>Parameters</H3>
IN: <tt>Graph&amp; g</tt>
<blockquote>
Any undirected graph. The graph type must be a model of
<a href="VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a> and
<a href="IncidenceGraph.html">IncidenceGraph</a>.
</blockquote>
OUT <tt>PlanarEmbedding embedding</tt>
<blockquote>
Must model the <a href="PlanarEmbedding.html">PlanarEmbedding</a> concept.
</blockquote>
IN <tt>OutputIterator kuratowski_subgraph</tt>
<blockquote>
An OutputIterator which accepts values of the type
<tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</blockquote>
IN <tt>VertexIndexMap vm</tt>
<blockquote>
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
</a> that maps vertices from <tt>g</tt> to distinct integers in the range
<tt>[0, num_vertices(g) )</tt><br>
<b>Default</b>: <tt>get(vertex_index,g)</tt><br>
</blockquote>
IN <tt>EdgeIndexMap em</tt>
<blockquote>
A <a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map
</a> that maps edges from <tt>g</tt> to distinct integers in the range
<tt>[0, num_edges(g) )</tt><br>
<b>Default</b>: <tt>get(edge_index,g)</tt>, but this parameter is only used if
the <tt>kuratowski_subgraph_iterator</tt> is provided.<br>
</blockquote>
<H3>Complexity</H3>
Assuming that both the vertex index and edge index supplied take time
<i>O(1)</i> to return an index and there are <i>O(n)</i>
total self-loops and parallel edges in the graph, most combinations of
arguments given to
<tt>boyer_myrvold_planarity_test</tt> result in an algorithm that runs in time
<i>O(n)</i> for a graph with <i>n</i> vertices and <i>m</i> edges. The only
exception is when Kuratowski subgraph isolation is requested for a dense graph
(a graph with <i>n = o(m)</i>) - the running time will be <i>O(n+m)</i>
<a href = "#2">[2]</a>.
<H3>Examples</H3>
<P>
<ul>
<li><a href="../example/simple_planarity_test.cpp">A simple planarity test</a>
<li><a href="../example/kuratowski_subgraph.cpp">Isolating a Kuratowski
Subgraph</a>
<li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to
create a straight line drawing</a>
</ul>
<h3>See Also</h3>
<a href="./planar_graphs.html">Planar Graphs in the Boost Graph Library</a>
<h3>Notes</h3>
<p><a name="1">[1] A planar embedding is also called a <i>combinatorial
embedding</i>.
<p><a name="2">[2] The algorithm can still be made to run in time <i>O(n)</i>
for this case, if needed. <a href="planar_graphs.html#EulersFormula">Euler's
formula</a> implies that a planar graph with <i>n</i> vertices can have no more
than <i>3n - 6</i> edges, which means that any non-planar graph on <i>n</i>
vertices has a subgraph of only <i>3n - 5</i> edges that contains a Kuratowski
subgraph. So, if you need to find a Kuratowski subgraph of a graph with more
than <i>3n - 5</i> edges in time <i>O(n)</i>, you can create a subgraph of the
original graph consisting of any arbitrary <i>3n - 5</i> edges and pass that
graph to <tt>boyer_myrvold_planarity_test</tt>.
<br>
<HR>
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</BODY>
</HTML>
+395
View File
@@ -0,0 +1,395 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">
<TITLE>Boost Graph Library: Boykov-Kolmogorov Maximum Flow</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Linux)">
<META NAME="CREATED" CONTENT="20060820;17315200">
<META NAME="CHANGEDBY" CONTENT="Stephan Diederich">
<META NAME="CHANGED" CONTENT="20060820;23125100">
<!--
// Copyright (c) 2006 Stephan Diederich
//
// This documentation may be used under either of the following two licences:
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE. OF SUCH DAMAGE.
//
// Or:
//
// 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)
-->
<STYLE>
<!--
TD P { color: #000000 }
H1 { color: #000000 }
P { color: #000000 }
PRE { color: #000000 }
H3 { color: #000000 }
BLOCKQUOTE { color: #000000 }
A:link { color: #0000ee }
A:visited { color: #551a8b }
-->
</STYLE>
</HEAD>
<BODY LANG="de-DE" TEXT="#000000" LINK="#0000ee" VLINK="#551a8b" BGCOLOR="#ffffff" DIR="LTR">
<P><IMG SRC="../../../boost.png" NAME="Grafik1" ALT="C++ Boost" ALIGN=BOTTOM WIDTH=277 HEIGHT=86 BORDER=0>
</P>
<H1><A NAME="sec:boykov_kolmogorov_max_flow"></A><TT>boykov_kolmogorov_max_flow</TT>
</H1>
<PRE><I>// named parameter version</I>
template &lt;class Graph, class P, class T, class R&gt;
typename property_traits&lt;typename property_map&lt;Graph, edge_capacity_t&gt;::const_type&gt;::value_type
boykov_kolmogorov_max_flow(Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <I>all defaults</I>)
<I>// non-named parameter version</I>
template &lt;class Graph, class CapacityEdgeMap, class ResidualCapacityEdgeMap, class ReverseEdgeMap,
class PredecessorMap, class ColorMap, class DistanceMap, class IndexMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type
boykov_kolmogorov_max_flow(Graph&amp; g,
CapacityEdgeMap cap,
ResidualCapacityEdgeMap res_cap,
ReverseEdgeMap rev_map,
PredecessorMap pre_map,
ColorMap color,
DistanceMap dist,
IndexMap idx,
typename graph_traits &lt;Graph&gt;::vertex_descriptor src,
typename graph_traits &lt;Graph &gt;::vertex_descriptor sink)</PRE><P>
<FONT SIZE=3>Additional overloaded versions for non-named parameters
are provided (without DistanceMap/ColorMap/DistanceMap; for those
iterator_property_maps with the provided index map are used)</FONT></P>
<P>The <TT>boykov_kolmogorov_max_flow()</TT> function calculates the maximum
flow of a network. See Section <A HREF="graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</A> for a description of maximum flow. The calculated
maximum flow will be the return value of the function. The function
also calculates the flow values <I>f(u,v)</I> for all <I>(u,v)</I> in
<I>E</I>, which are returned in the form of the residual capacity
<I>r(u,v) = c(u,v) - f(u,v)</I>.
</P>
<P><B>Requirements:</B><BR>The directed graph <I>G=(V,E)</I> that
represents the network must include a reverse edge for every edge in
<I>E</I>. That is, the input graph should be <I>G<SUB>in</SUB> =
(V,{E U E<SUP>T</SUP>})</I>. The <TT>ReverseEdgeMap</TT> argument <TT>rev</TT>
must map each edge in the original graph to its reverse edge, that is
<I>(u,v) -&gt; (v,u)</I> for all <I>(u,v)</I> in <I>E</I>.
</P>
<P>Remarks: While the push-relabel method states that each edge in <I>E<SUP>T</SUP></I>
has to have capacity of 0, the reverse edges for this algorithm ARE
allowed to carry capacities. If there are already reverse edges in
the input Graph <I><FONT FACE="Courier New, monospace">G</FONT></I>,
those can be used. This can halve the amount of edges and will
noticeably increase the performance.</P>
<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 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.
Instead of finding a new shortest path from source to sink in the graph in each
iteration, the Boykov-Kolmogorov algorithm keeps the already found paths as
follows:</P>
<P>The algorithm builds up two search trees, a source-tree and a
sink-tree. Each vertex has a label (stored in <I>ColorMap</I>) to
which tree it belongs and a status-flag if this vertex is active or
passive. In the beginning of the algorithm only the source and the
sink are colored (source==black, sink==white) and have active status.
All other vertices are colored gray. The algorithm consists of three
phases:</P>
<P><I>grow-phase</I>: In this phase active vertices are allowed to
acquire neighbor vertices that are connected through an edge that has
a capacity-value greater than zero. Acquiring means that those vertices
become active and belong now to the search tree of the current
active vertex. If there are no more valid connections to neighbor
vertices, the current vertex becomes passive and the grow phase
continues with the next active vertex. The grow phase terminates if
there are no more active vertices left or a vertex discovers a vertex
from the other search tree through an unsaturated edge. In this case
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 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
saturated edge. That means, that the search trees collapse to
forests, because a condition for the search trees is, that each
vertex in them has a valid (=non-saturated) connection to a terminal.</P>
<P><I>adoption-phase</I>: Here the search trees are reconstructed. A
simple solution would be to mark all vertices coming after the first
orphan in the found path free vertices (gray). A more sophisticated
solution is to give those orphans new parents: The neighbor vertices
are checked if they have a valid connection to the same terminal like
this vertex had (a path with unsaturated edges). If there is one,
this vertex becomes the new parent of the current orphan and this
forest is re-included into the search tree. If no new valid parent is
found, this vertex becomes a free vertex (marked gray), and it's
children become orphans. The adoption phase terminates if there are
no more orphans.</P>
<P><IMG SRC="figs/bk_max_flow.gif" NAME="Grafik2" ALIGN=LEFT WIDTH=827 HEIGHT=311 BORDER=0><BR CLEAR=LEFT><B>Details:</B></P>
<UL>
<LI><P>Marking heuristics: A timestamp is stored for each vertex
which shows in which iteration of the algorithm the distance to the
corresponding terminal was calculated.
</P>
<UL>
<LI><P>This distance is used and gets calculated in the
adoption-phase. In order to find a valid new parent for an orphan,
the possible parent is checked for a connection to the terminal to
which tree it belongs. If there is such a connection, the path is
tagged with the current time-stamp, and the distance value. If
another orphan has to find a parent and it comes across a vertex
with a current timestamp, this information is used.</P>
<LI><P>The distance is also used in the grow-phase. If a vertex
comes across another vertex of the same tree while searching for
new vertices, the other's distance is compared to its distance. If
it is smaller, that other vertex becomes the new parent of the
current. This can decrease the length of the search paths, and so
amount of adoptions.</P>
</UL>
<LI><P>Ordering of orphans: As described above, the augment-phase
and the adoption phase can create orphans. The orphans the
augment-phase generates, are ordered according to their distance to
the terminals (smallest first). This combined with the
distance/timestamp heuristics results in the possibility for not
having to recheck terminal-connections too often. New orphans which
are generated in adoption phase are processed before orphans from
the main queue for the same reason.</P>
</UL>
<P><BR><B>Implementation notes:</B></P>
<P>The algorithm is mainly implemented as described by Boykov and Kolmogorov in
[<a href="bibliography.html#boykov-kolmogorov04">69</a>]. An extended version
can be found in the PhD Thesis of Kolmogorov [<A HREF="bibliography.html#kolmogorov03">68</a>].
The following changes are made to improve performance:</P>
<UL>
<LI>initialization: the algorithm first augments all paths from
source-&gt;sink and all paths from source-&gt;VERTEX-&gt;sink. This
improves especially graph-cuts used in image vision where nearly
each vertex has a source and sink connect. During this step, all
vertices that have an unsaturated connection from source are added
to the active vertex list and so the source is not.</LI>
<LI>active vertices: Boykov-Kolmogorov uses two lists for active nodes
and states that new active vertices are added to the rear of the
second. Fetching an active vertex is done from the beginning of the
first list. If the first list is empty, it is exchanged by the
second. This implementation uses just one list.</LI>
<LI>grow-phase: In the grow phase the first vertex in the
active-list is taken and all outgoing edges are checked if they are
unsaturated. This decreases performance for graphs with high-edge
density. This implementation stores the last accessed edge and
continues with it, if the first vertex in the active-list is the
same one as during the last grow-phase.</LI>
</UL>
<H3>Where Defined</H3>
<P><TT><A HREF="../../../boost/graph/boykov_kolmogorov_max_flow.hpp">boost/graph/boykov_kolmogorov_max_flow.hpp</A></TT>
</P>
<H3>Parameters</H3>
<P>IN: <TT>Graph&amp; g</TT>
</P>
<BLOCKQUOTE>A directed graph. The graph's type must be a model of
<A HREF="VertexListGraph.html">Vertex List Graph</A>, <A HREF="EdgeListGraph.html">Edge
List Graph</A> and <A HREF="IncidenceGraph.html">Incidence Graph</A>.
For each edge <I>(u,v)</I> in the graph, the reverse edge <I>(v,u)</I>
must also be in the graph. Performance of the algorithm will be slightly
improved if the graph type also models <a href="AdjacencyMatrix.html">Adjacency
Matrix</a>.
</BLOCKQUOTE>
<P>IN: <TT>vertex_descriptor src</TT>
</P>
<BLOCKQUOTE>The source vertex for the flow network graph.
</BLOCKQUOTE>
<P>IN: <TT>vertex_descriptor sink</TT>
</P>
<BLOCKQUOTE>The sink vertex for the flow network graph.
</BLOCKQUOTE>
<H3>Named Parameters</H3>
<P>IN: <TT>edge_capacity(EdgeCapacityMap cap)</TT>
</P>
<BLOCKQUOTE>The edge capacity property map. The type must be a model
of a constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_capacity, g)</TT>
</BLOCKQUOTE>
<P>OUT: <TT>edge_residual_capacity(ResidualCapacityEdgeMap res)</TT>
</P>
<BLOCKQUOTE>The edge residual capacity property map. The type must be
a model of a mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_residual_capacity,
g)</TT>
</BLOCKQUOTE>
<P>IN: <TT>edge_reverse(ReverseEdgeMap rev)</TT>
</P>
<BLOCKQUOTE>An edge property map that maps every edge <I>(u,v)</I> in
the graph to the reverse edge <I>(v,u)</I>. The map must be a model
of constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's edge
descriptor type.<BR><B>Default:</B> <TT>get(edge_reverse, g)</TT>
</BLOCKQUOTE>
<P>UTIL: <TT>vertex_predecessor(PredecessorMap pre_map)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores the edge to the vertex'
predecessor. The map must be a model of mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_predecessor, g)</TT>
</BLOCKQUOTE>
<P>OUT/UTIL: <TT>vertex_color(ColorMap color)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores a color for edge
vertex. If the color of a vertex after running the algorithm is black
the vertex belongs to the source tree else it belongs to the
sink-tree (used for minimum cuts). The map must be a model of mutable
<A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_color, g)</TT>
</BLOCKQUOTE>
<P>UTIL: <TT>vertex_distance(DistanceMap dist)</TT>
</P>
<BLOCKQUOTE>A vertex property map that stores the distance to the
corresponding terminal. It's a utility-map for speeding up the
algorithm. The map must be a model of mutable <A HREF="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</A>. The key type of the map must be the graph's vertex
descriptor type.<BR><B>Default:</B> <TT>get(vertex_distance, g)</TT>
</BLOCKQUOTE>
<P>IN: <TT>vertex_index(VertexIndexMap index_map)</TT>
</P>
<BLOCKQUOTE>Maps each vertex of the graph to a unique integer in the
range <TT>[0, num_vertices(g))</TT>. The map must be a model of
constant <A HREF="../../property_map/doc/LvaluePropertyMap.html">LvaluePropertyMap</A>.
The key type of the map must be the graph's vertex descriptor
type.<BR><B>Default:</B> <TT>get(vertex_index, g)</TT>
</BLOCKQUOTE>
<H3>Example</H3>
<P>This reads an example maximum flow problem (a graph with edge
capacities) from a file in the DIMACS format (<TT><A HREF="../example/max_flow.dat">example/max_flow.dat</A></TT>).
The source for this example can be found in
<TT><A HREF="../example/boykov_kolmogorov-eg.cpp">example/boykov_kolmogorov-eg.cpp</A></TT>.
</P>
<PRE>#include &lt;boost/config.hpp&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;boost/graph/adjacency_list.hpp&gt;
#include &lt;boost/graph/boykov_kolmogorov_max_flow.hpp&gt;
#include &lt;boost/graph/read_dimacs.hpp&gt;
#include &lt;boost/graph/graph_utility.hpp&gt;
int
main()
{
using namespace boost;
typedef adjacency_list_traits &lt; vecS, vecS, directedS &gt; Traits;
typedef adjacency_list &lt; vecS, vecS, directedS,
property &lt; vertex_name_t, std::string,
property &lt; vertex_index_t, long,
property &lt; vertex_color_t, boost::default_color_type,
property &lt; vertex_distance_t, long,
property &lt; vertex_predecessor_t, Traits::edge_descriptor &gt; &gt; &gt; &gt; &gt;,
property &lt; edge_capacity_t, long,
property &lt; edge_residual_capacity_t, long,
property &lt; edge_reverse_t, Traits::edge_descriptor &gt; &gt; &gt; &gt; Graph;
Graph g;
property_map &lt; Graph, edge_capacity_t &gt;::type
capacity = get(edge_capacity, g);
property_map &lt; Graph, edge_residual_capacity_t &gt;::type
residual_capacity = get(edge_residual_capacity, g);
property_map &lt; Graph, edge_reverse_t &gt;::type rev = get(edge_reverse, g);
Traits::vertex_descriptor s, t;
read_dimacs_max_flow(g, capacity, rev, s, t);
std::vector&lt;default_color_type&gt; color(num_vertices(g));
std::vector&lt;long&gt; distance(num_vertices(g));
long flow = boykov_kolmogorov_max_flow(g ,s, t);
std::cout &lt;&lt; "c The total flow:" &lt;&lt; std::endl;
std::cout &lt;&lt; "s " &lt;&lt; flow &lt;&lt; std::endl &lt;&lt; std::endl;
std::cout &lt;&lt; "c flow values:" &lt;&lt; std::endl;
graph_traits &lt; Graph &gt;::vertex_iterator u_iter, u_end;
graph_traits &lt; Graph &gt;::out_edge_iterator ei, e_end;
for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (boost::tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
if (capacity[*ei] &gt; 0)
std::cout &lt;&lt; "f " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; target(*ei, g) &lt;&lt; " "
&lt;&lt; (capacity[*ei] - residual_capacity[*ei]) &lt;&lt; std::endl;
return EXIT_SUCCESS;
}</PRE><P>
The output is:
</P>
<PRE>c The total flow:
s 13
c flow values:
f 0 6 3
f 0 1 0
f 0 2 10
f 1 5 1
f 1 0 0
f 1 3 0
f 2 4 4
f 2 3 6
f 2 0 0
f 3 7 5
f 3 2 0
f 3 1 1
f 4 5 4
f 4 6 0
f 5 4 0
f 5 7 5
f 6 7 3
f 6 4 0
f 7 6 0
f 7 5 0</PRE><H3>
See Also</H3>
<P STYLE="margin-bottom: 0cm">
<TT><A HREF="edmonds_karp_max_flow.html">edmonds_karp_max_flow()</A></TT>,
<TT><A HREF="push_relabel_max_flow.html">push_relabel_max_flow()</A></TT>.
</P>
<HR>
<TABLE CELLPADDING=2 CELLSPACING=2>
<TR VALIGN=TOP>
<TD>
<P>Copyright &copy; 2006</P>
</TD>
<TD>
<P>Stephan Diederich, University
Mannheim(<A HREF="mailto:diederich@ti.uni-manheim.de">diederich@ti.uni-manheim.de</A>)</P>
</TD>
</TR>
</TABLE>
<P><BR><BR>
</P>
</BODY>
</HTML>
+82 -63
View File
@@ -1,41 +1,38 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000, 2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek 2000, 2001
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: Breadth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:bfs">
<img src="figs/python.gif" alt="(Python)"/>
<TT>breadth_first_search</TT>
</H1>
<P>
<PRE>
<i>// named paramter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class P, class T, class R&gt;
void breadth_first_search(VertexListGraph& G,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
<i>// named parameter version</i>
template &lt;class Graph, class P, class T, class R&gt;
void breadth_first_search(Graph& G,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i>
template &lt;class VertexListGraph, class Buffer, class BFSVisitor,
template &lt;class Graph, class Buffer, class BFSVisitor,
class ColorMap&gt;
void breadth_first_search(const VertexListGraph&amp; g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
void breadth_first_search(const Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
Buffer&amp; Q, BFSVisitor vis, ColorMap color);
</PRE>
@@ -73,25 +70,25 @@ BFS algorithm is a listed below.
<pre>
BFS(<i>G</i>, <i>s</i>)
<b>for</b> each vertex <i>u in V[G]</i>
<i>color[u] :=</i> WHITE
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<i>color[u] :=</i> WHITE
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<b>end for</b>
<i>color[s] :=</i> GRAY
<i>d[s] := 0</i>
<i>color[s] :=</i> GRAY
<i>d[s] := 0</i>
ENQUEUE(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> DEQUEUE(Q)
<b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>color[v] =</i> WHITE)
<i>color[v] :=</i> GRAY
<i>d[v] := d[u] + 1</i>
<i>p[v] := u</i>
<i>color[v] :=</i> GRAY
<i>d[v] := d[u] + 1</i>
<i>p[v] := u</i>
ENQUEUE(<i>Q</i>, <i>v</i>)
<b>else</b>
<b>if</b> (<i>color[v] =</i> GRAY)
<b>if</b> (<i>color[v] =</i> GRAY)
...
<b>else</b>
<b>else</b>
...
<b>end for</b>
<i>color[u] :=</i> BLACK
@@ -102,29 +99,29 @@ BFS(<i>G</i>, <i>s</i>)
<td valign="top">
<pre>
initialize vertex <i>u</i>
initialize vertex <i>u</i>
discover vertex <i>s</i>
discover vertex <i>s</i>
examine vertex <i>u</i>
examine vertex <i>u</i>
examine edge <i>(u,v)</i>
<i>(u,v)</i> is a tree edge
<i>(u,v)</i> is a tree edge
discover vertex <i>v</i>
discover vertex <i>v</i>
<i>(u,v)</i> is a non-tree edge
<i>(u,v)</i> has a gray target
<i>(u,v)</i> has a gray target
<i>(u,v)</i> has a black target
<i>(u,v)</i> has a black target
finish vertex <i>u</i>
finish vertex <i>u</i>
</pre>
</tr>
</table>
@@ -153,15 +150,20 @@ event visitors.
<h3>Parameters</h3>
IN: <tt>VertexListGraph&amp; g</tt>
IN: <tt>Graph&amp; g</tt>
<blockquote>
A directed or undirected graph. The graph type must
be a model of <a href="./VertexListGraph.html">Vertex List Graph</a>.
be a model of <a href="./VertexListGraph.html">Vertex List Graph</a>
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The source vertex where the search is started.
The source vertex where the search is started.<br>
<b>Python</b>: The parameter is named <tt>root_vertex</tt>.
</blockquote>
@@ -173,7 +175,11 @@ IN: <tt>visitor(BFSVisitor vis)</tt>
event-points specified by the <a href="BFSVisitor.html">BFS
Visitor</a> concept. The visitor object is passed by value <a
href="#1">[1]</a>.<br> <b>Default:</b>
<tt>bfs_visitor&lt;null_visitor&gt;</tt>
<tt>bfs_visitor&lt;null_visitor&gt;</tt> <br>
<b>Python</b>: The parameter should be an object that derives from
the <a href="BFSVisitor.html#python"><tt>BFSVisitor</tt></a> type of the graph.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap color)</tt>
@@ -188,16 +194,19 @@ UTIL/OUT: <tt>color_map(ColorMap color)</tt>
function and do your own color initialization.
<p>The type <tt>ColorMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> and its key type must be the graph's vertex
descriptor type and the value type of the color map must model
<a href="./ColorValue.html">ColorValue</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.
map.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
@@ -206,12 +215,18 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
num_vertices(g))</tt>. This parameter is only necessary when the
default color property map is used. The type <tt>VertexIndexMap</tt>
must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an integer type. The
vertex descriptor type of the graph needs to be usable as the key
type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</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>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>
UTIL: <tt>buffer(Buffer&amp; Q)</tt>
@@ -223,9 +238,13 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
For example Dijkstra's algorithm can be implemented
using a priority queue. The type <tt>Buffer</tt> must be a model of
<a href="./Buffer.html">Buffer</a>.<br> The <tt>value_type</tt>
of the buffer must be the <tt>vertex_descriptor</tt> type for the graph.
<b>Default:</b> <tt>boost::queue</tt>
</blockquote>
of the buffer must be the <tt>vertex_descriptor</tt> type for the graph.<br>
<b>Default:</b> <tt>boost::queue</tt><br>
<b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph.
</blockquote>
<H3><A NAME="SECTION001330300000000000000">
@@ -233,7 +252,7 @@ Complexity</A>
</H3>
<P>
The time complexity is <i>O(E + V)</i>.
The time complexity is <i>O(E + V)</i>.
<P>
@@ -241,13 +260,13 @@ The time complexity is <i>O(E + V)</i>.
<ul>
<li><b><tt>vis.initialize_vertex(v, g)</tt></b> is invoked on every vertex
before the start of the search.
before the start of the search.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>r is invoked in each
vertex as it is removed from the queue.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex immediately after the vertex is removed from the queue.
of each vertex immediately after the vertex is removed from the queue.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is a tree edge. The
@@ -256,20 +275,20 @@ The time complexity is <i>O(E + V)</i>.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
algorithm encounters vertex <i>u</i>. All vertices closer to the
source vertex have been discovered, and vertices further from the
source have not yet been discovered.
source have not yet been discovered.
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is not a tree edge.
<tt>examine_edge()</tt>) if the edge is not a tree edge.
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
time of examination. The color gray indicates that
the vertex is currently in the queue.
the vertex is currently in the queue.
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the
time of examination. The color black indicates that the
vertex is no longer in the queue.
vertex is no longer in the queue.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
edges of <i>u</i> have been examined and all of the adjacent vertices
@@ -286,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
@@ -300,7 +319,7 @@ to <tt>listS</tt>.
<h3>Notes</h3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -311,9 +330,9 @@ to <tt>listS</tt>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+44 -38
View File
@@ -1,39 +1,35 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000, 2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek 2000, 2001
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: Breadth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:bfv">
<H1><A NAME="sec:bfv"><img src="figs/python.gif" alt="(Python)"/>
<TT>breadth_first_visit</TT>
</H1>
<P>
<PRE>
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class P, class T, class R&gt;
void breadth_first_visit(IncidenceGraph& G,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
void breadth_first_visit(IncidenceGraph& G,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./Buffer.html">Buffer</a>, class <a href="./BFSVisitor.html">BFSVisitor</a>, class ColorMap&gt;
void breadth_first_visit
(const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
(const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
Buffer&amp; Q, BFSVisitor vis, ColorMap color)
</PRE>
@@ -60,12 +56,16 @@ only reaches a small portion of the graph.
IN: <tt>IncidenceGraph&amp; g</tt>
<blockquote>
A directed or undirected graph. The graph type must
be a model of <a href="./IncidenceGraph.html">Incidence Graph</a>.
be a model of <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The source vertex where the search is started.
The source vertex where the search is started.<br>
<b>Python</b>: The parameter is named <tt>root_vertex</tt>.
</blockquote>
@@ -77,18 +77,24 @@ IN: <tt>visitor(BFSVisitor vis)</tt>
event-points specified by the <a href="BFSVisitor.html">BFS
Visitor</a> concept. The visitor object is passed by value <a
href="#1">[1]</a>.<br> <b>Default:</b>
<tt>bfs_visitor&lt;null_visitor&gt;</tt>
<tt>bfs_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a href="BFSVisitor.html#python"><tt>BFSVisitor</tt></a> type of the graph.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap color)</tt>
<blockquote>
This is used by the algorithm to keep track of its progress through
the graph. The type <tt>ColorMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> and its key type must be the graph's vertex
descriptor type and the value type of the color map must model
<a href="./ColorValue.html">ColorValue</a>.<br>
<b>Default:</b> <tt>get(vertex_color, g)</tt>
<b>Default:</b> <tt>get(vertex_color, g)</tt><br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
UTIL: <tt>buffer(Buffer&amp; Q)</tt>
@@ -100,8 +106,11 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
For example Dijkstra's algorithm can be implemented
using a priority queue. The type <tt>Buffer</tt> must be a model of
<a href="./Buffer.html">Buffer</a>.<br>
<b>Default:</b> <tt>boost::queue</tt>
</blockquote>
<b>Default:</b> <tt>boost::queue</tt><br>
<b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph.
</blockquote>
<H3><A NAME="SECTION001330300000000000000">
@@ -109,21 +118,18 @@ Complexity</A>
</H3>
<P>
The time complexity is <i>O(E)</i>.
The time complexity is <i>O(E)</i>.
<P>
<h3>Visitor Event Points</h3>
<ul>
<li><b><tt>vis.initialize_vertex(v, g)</tt></b> is invoked on every vertex
before the start of the search.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>r is invoked in each
vertex as it is removed from the queue.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex immediately after the vertex is removed from the queue.
of each vertex immediately after the vertex is removed from the queue.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is a tree edge. The
@@ -132,20 +138,20 @@ The time complexity is <i>O(E)</i>.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked the first time the
algorithm encounters vertex <i>u</i>. All vertices closer to the
source vertex have been discovered, and vertices further from the
source have not yet been discovered.
source have not yet been discovered.
<li><b><tt>vis.non_tree_edge(e, g)</tt></b> is invoked (in addition to
<tt>examine_edge()</tt>) if the edge is not a tree edge.
<tt>examine_edge()</tt>) if the edge is not a tree edge.
<li><b><tt>vis.gray_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored gray at the
time of examination. The color gray indicates that
the vertex is currently in the queue.
the vertex is currently in the queue.
<li><b><tt>vis.black_target(e, g)</tt></b> is invoked (in addition to
<tt>non_tree_edge()</tt>) if the target vertex is colored black at the
time of examination. The color black indicates that the
vertex is no longer in the queue.
vertex is no longer in the queue.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked after all of the out
edges of <i>u</i> have been examined and all of the adjacent vertices
@@ -161,7 +167,7 @@ The time complexity is <i>O(E)</i>.
<h3>Notes</h3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -172,9 +178,9 @@ The time complexity is <i>O(E)</i>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+228
View File
@@ -0,0 +1,228 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--
Copyright Doug Gregor 2004. Use, modification and
distribution is 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)
For more information, see http://www.boost.org
-->
<head>
<title>Bundled Properties</title>
</head>
<body BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"/>
<h1>Bundled Properties</h1>
<p>Class templates <code><a
href="adjacency_list.html">adjacency_list</a></code> and
<code><a href="adjacency_matrix.html">adjacency_matrix</a></code> support
the introduction of named properties via <a
href="using_adjacency_list.html#sec:adjacency-list-properties">internal
properties</a>. However, this method is cumbersome in many uses,
where it would be more intuitive to just specify a structure or
class that contains internal properties for edges or
vertices. Bundled properties allow one to use
<code>adjacency_list</code> and <code>adjacency_matrix</code> in this
manner, providing a simple
way to introduce and access any number of internal properties
for vertices and edges.</p>
<p>One can introduce bundled properties into an
either graph type by providing a user-defined class
type for the <code>VertexProperties</code> or
<code>EdgeProperties</code> template arguments. The user-defined
class may alternatively be placed at the end of a
<code>property</code> list, replacing the (implicit)
<code>boost::no_property</code> argument.</p>
<h2>Example: Route planning</h2>
<p>Consider the implementation of a simple route planner that
should find the shortest directions from one city to another
via a set of highways. The vertices of the graph are cities,
and we may wish to store several bits of information about the
city within each vertex:</p>
<pre>
struct City
{
string name;
int population;
vector&lt;int&gt; zipcodes;
};
</pre>
<p>
The edges in the graph represent highways, which also have several interesting
attributes:
</p>
<pre>
struct Highway
{
string name;
double miles;
int speed_limit;
int lanes;
bool divided;
};
</pre>
<p>With bundled properties, we can directly use the <code>City</code> and
<code>Highway</code> structures to define the graph:</p>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
City, Highway&gt;
Map;
</pre>
<p>Without bundled properties, translating this example directly
into an instantiation of <code>adjacency_list</code> would
involve several custom properties and would result in a type
like this:</p>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
// Vertex properties
boost::property&lt;boost::vertex_name_t, std::string,
boost::property&lt;population_t, int,
boost::property&lt;zipcodes_t, std::vector&lt;int&gt; &gt; &gt; &gt;,
// Edge properties
boost::property&lt;boost::edge_name_t, std::string,
boost::property&lt;boost::edge_weight_t, double,
boost::property&lt;edge_speed_limit_t, int,
boost::property&lt;edge_lanes_t, int,
boost::property&lt;edge_divided, bool&gt; &gt; &gt; &gt; &gt; &gt;
Map;
</pre>
<p>
Bundling vertex and edge properties greatly simplifies the declaration of
graphs.
</p>
<p>
In addition to vertex and edge bundles, we can also bundle properties of the
graph itself. Suppopse we extend the application to include a portfolio of
route-planning maps for different countries. In addition to the <code>City</code>
and <code>Highway</code> bundles above, we can declare a graph bundle,
<code>Country</Code>.
</p>
<pre>
struct Country {
string name;
bool use_right; // Drive on the left or right
bool use_metric; // mph or km/h
};
</pre>
<p>The graph would now be declared as:</p>
<pre>
<pre>
typedef boost::adjacency_list&lt;
boost::listS, boost::vecS, boost::bidirectionalS,
City, Highway, Country&gt;
Map;
</pre>
</pre>
<h2>Accessing bundled properties</h2>
<p>To access a bundled property for a particular edge or vertex,
subscript your graph with the descriptor of the edge or vertex
whose bundled property you wish to access. For instance:</p>
<pre>
Map map; // load the map
Map::vertex_descriptor v = *vertices(map).first;
map[v].name = "Troy";
map[v].population = 49170;
map[v].zipcodes.push_back(12180);
Map::edge_descriptor e = *out_edges(v, map).first;
map[e].name = "I-87";
map[e].miles = 10.;
map[e].speed_limit = 65;
map[e].lanes = 4;
map[e].divided = true;
</pre>
<p>
The graph bundle, since it does not correspond to a vertex or edge descripor
is accessed using the graph_bundle object as a key.
</p>
<pre>
map[graph_bundle].name = "United States";
map[graph_bundle].use_right = true;
map[graph_bundle].use_metric = false;
</pre>
<h2>Properties maps from bundled properties</h2>
<p>Often one needs to create a property map from an internal
property for use in a generic algorithm. For instance, using the
graph without bundled properties we might invoke <a
href="dijkstra_shortest_paths.html">Dijkstra's shortest
paths</a> algorithm like this:</p>
<pre>
vector&lt;double&gt; distances(num_vertices(map));
dijkstra_shortest_paths(map, from,
weight_map(get(edge_length, map))
.distance_map(make_iterator_property_map(distances.begin(),
get(vertex_index, map))));
</pre>
<p>With bundled properties, we can just pass a <em>member pointer</em>
as the property for <code>get</code>. The equivalent example using bundled
properties is:</p>
<pre>
vector&lt;double&gt; distances(num_vertices(map));
dijkstra_shortest_paths(map, from,
weight_map(get(<font color="#ff0000">&amp;Highway::miles</font>, map))
.distance_map(make_iterator_property_map(distances.begin(),
get(vertex_index, map))));
</pre>
<p>The type of the returned property map is <code>property_map&lt;Map, double Highway::*&gt;::type</code>
or <code>property_map&lt;Map, double Highway::*&gt;::const_type</code>, depending on whether the graph
<code>map</code> is non-constant or constant.
<p> You may also access the entire vertex or edge bundle as a property map
using the <code>vertex_bundle</code> or <code>edge_bundle</code> properties,
respectively. For instance, the property map returned by <code>get(vertex_bundle, map)</code> is
an <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a> providing access to the
<code>City</code> values stored in each vertex.
<h2>Property maps for a graph bundle</h2>
There is currently no support for creating property maps from the bundled
properties of a graph.
<h2>Getting the type of bundled properties</h2>
<p>To get the type of the vertex or edge bundle for a given graph
type <tt>Graph</tt>, you can use the trait
classes <tt>vertex_bundle_type</tt>
and <tt>edge_bundle_type</tt>. The
type <tt>vertex_bundle_type&lt;Graph&gt;::type</tt> will be the
type bundled with vertices (or <tt>no_vertex_bundle</tt> if the
graph supports bundles but no vertex bundle
exists). Likewise, <tt>edge_bundle_type&lt;Graph&gt;::type</tt>
will be the type bundled with edges (or <tt>no_edge_bundle</tt> if
no edge bundle exists).</p>
<h2>Compatibility</h2> <p>Bundled properties will only work
properly on compilers that support class template partial
specialization.</p>
<hr>
Copyright &copy; 2004 <a href="http://www.boost.org/people/doug_gregor.html">Doug Gregor</a>.
<address><a href="mailto:gregod@cs.rpi.edu"></a></address>
<!-- Created: Fri May 7 09:59:21 EDT 2004 -->
<!-- hhmts start -->
Last modified: Fri May 7 10:56:01 EDT 2004
<!-- hhmts end -->
</body>
</html>
+32 -34
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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>Challenge</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,9 +22,9 @@
<ul>
<li>Dynamic graph algorithms such as described in <a
href="http://citeseer.nj.nec.com/eppstein99dynamic.html">Dynamic Graph
href="http://citeseer.ist.psu.edu/eppstein99dynamic.html">Dynamic Graph
Algorithms</a> and <a
href="http://citeseer.nj.nec.com/alberts98software.html">A Software
href="http://citeseer.ist.psu.edu/alberts98software.html">A Software
Library of Dynamic Graph Algorithms</a>.
<li>Polish up code/docs for pending items and champion the formal
@@ -41,18 +37,18 @@ review. The pending items are:</li>
<tt>mutable_queue.hpp</tt>, <tt>fibonacci_heap.hpp</tt>.
Somehow merge implementation with Dietmer's heaps and queues.</li>
<li><tt>disjoint_sets</tt> </li>
<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">)</li>
</ul>
<li>Construct a set of planar graph algorithms.</li>
<ul>
<li> Is the graph planar?</li>
<li> &quot;Walk around the block&quot; and similar open and closed neighborhood
traversals. Note that edge traversals need to resolve to particular ends
<li> &quot;Walk around the block&quot; and similar open and closed neighborhood
traversals. Note that edge traversals need to resolve to particular ends
and sides (see below), not just to the edge as a whole.</li>
<li> Given a point, find the nearest vertex, edge, or bounded polygon.
<li> Given a point, find the nearest vertex, edge, or bounded polygon.
Again, edges are viewed as having left and right sides.</li>
<li> Given a line segment, find intersecting vertices, edges, or bounded
<li> Given a line segment, find intersecting vertices, edges, or bounded
polygons.</li>
<li> Given a polygon, find intersecting whatever...</li>
<li> Various minimum bounding rectangle and clipping problems.</li>
@@ -62,17 +58,15 @@ polygons.</li>
according to a user defined comparison object.</li>
</ul>
<li>Floyd-Warshall algorithm.</li>
<li>Rewrite the Qhull algorithm using the Boost Graph Library (this is
high difficulty challenge). Or, for a more manageable challenge,
write an interface for Qhull with the BGL. <a
href="http://www.geom.umn.edu/locate/qhull">Qhull</a> computes the
href="http://www.qhull.org/">Qhull</a> computes the
convex hull, Delaunay triangulation, Voronoi diagram, and halfspace
intersection about a point. Qhull runs in 2-d, 3-d, 4-d, and higher
dimensions. Qhull is used for collision detection, animation, plate
tectonics, 3-d modeling, robot motion planning, and other <a
href="http://www.geom.umn.edu/~bradb/qhull-news.html#use">applications</a>.
href="http://www.qhull.org/news/qhull-news.html#users">applications</a>.
It is currently difficult to use from a C++ program.
</li>
@@ -95,28 +89,32 @@ It is currently difficult to use from a C++ program.
<li>Modularize the tests in test/graph.cpp to apply to particular
concepts. Make sure there are run-time tests for every BGL concept.</li>
<li>Write tests for the BGL algorithms. Currently the examples
are used as a sanity check, but they do not constitute a real test. </li>
<li>Write tests for the BGL algorithms. There are a few, but
more are needed. The example provide a sanity check but do not
provide full coverage.</li>
<li>Write up the examples from Knuth's <i>Stanford GraphBase</i> using
the BGL. The file <a
href="../example/miles_span.cpp"><tt>examples/miles_span.cpp</tt></a>
is a start.
is a start.</li>
<li>Create a class to support sub-graph views of a graph, where a
sub-graph behaves just like a graph, but shares vertex and edge
properties with the original graph. Perhaps even support sub-graphs
of sub-graphs, etc.
<li>Further testing of the <tt>subgraph</tt> class and add more
features.</li>
<li>Implement a minimum-cost maximum-flow algorithm.</li>
<li>Make the <tt>type</tt> of all (internal) property maps convertible to the <tt>const_type</tt> of the property maps.<li>
<li>Add static functions to <tt>adjacency_list</tt> to return the per-vertex, per-edge, and per-graph overhead.</li>
</ul>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+51
View File
@@ -0,0 +1,51 @@
<html><!--
Copyright (c) 2004 Trustees of Indiana University
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><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Function template circle_graph_layout</title></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table cellpadding="2" width="100%"><td valign="top"><img src="../../../boost.png" alt="boost.png (6897 bytes)" width="277" height="86"></td><td align="center"><a href="../../../index.htm">Home</a></td><td align="center"><a href="../../libraries.htm">Libraries</a></td><td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td><td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td><td align="center"><a href="../../../more/index.htm">More</a></td></table><hr><div class="refentry" lang="en"><a name="id103562-bb"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function template circle_graph_layout</span></h2><p>boost::circle_graph_layout &#8212; Layout the graph with the vertices at the points of a regular n-polygon. </p></div><h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2><div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
<span class="bold"><b>template</b></span>&lt;<span class="bold"><b>typename</b></span> VertexListGraph, <span class="bold"><b>typename</b></span> PositionMap, <span class="bold"><b>typename</b></span> Radius&gt;
  <span class="type"><span class="bold"><b>void</b></span></span> circle_graph_layout(<span class="bold"><b>const</b></span> VertexListGraph &amp; g, PositionMap position,
                           Radius radius);</pre></div><div class="refsect1" lang="en"><a name="id821794"></a><h2>Where Defined</h2><a href="../../../boost/graph/circle_layout.hpp">boost/graph/circle_layout.hpp</a><h2>Description</h2><p>The distance from the center of the polygon to each point is determined by the <tt class="computeroutput">radius</tt> parameter. The <tt class="computeroutput">position</tt> parameter must be an Lvalue Property Map whose value type is a class type containing <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> members that will be set to the <tt class="computeroutput">x</tt> and <tt class="computeroutput">y</tt> coordinates.
<h2>Parameters</h2>
IN: <tt>const VertexListGraph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied. The type
<tt>VertexListGraph</tt> must be a model of <a
href="VertexListGraph.html">Vertex List Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
OUT: <tt>PositionMap position</tt>
<blockquote>
This property map is used to store the position of each vertex. The
type <tt>PositionMap</tt> must be a model of <a
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
Map</a>, with the graph's edge descriptor type as its key type. The
value type of this property map should be assignable from the
type <tt>Radius</tt>. <br>
<b>Python</b>: The position map must be a <tt>vertex_point2d_map</tt> for
the graph.<br>
<b>Python default</b>: <tt>graph.get_vertex_point2d_map("position")</tt>
</blockquote>
IN: <tt>Radius radius</tt>
<blockquote>
This is the radius of the circle on which points will be layed
out. It must be compatible with <tt>double</tt>.<br>
</blockquote>
</p></div></div><table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr><td align="left"></td><td align="right"><small></small></td></tr></table><hr>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.boost.org/people/doug_gregor.html">Douglas Gregor</A>, Indiana University (dgregor -at- cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (lums -at- osl.iu.edu)
</TD></TR></TABLE>
</body></html>
Binary file not shown.
+971
View File
@@ -0,0 +1,971 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--
Copyright (c) 2005-2009 Trustees of Indiana University
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>Compressed Sparse Row Graph</title>
<STYLE TYPE="text/css">
<!--
.indent
{
padding-left: 50pt;
padding-right: 50pt;
}
-->
</STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function address(host, user) {
var atchar = '@';
var thingy = user+atchar+host;
thingy = '<a hre' + 'f=' + "mai" + "lto:" + thingy + '>' + user+atchar+host + '</a>';
document.write(thingy);
}
//-->
</script>
</head>
<body>
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86"></img>
<h1>Compressed Sparse Row Graph</h1>
<p>The class template <code>compressed_sparse_row_graph</code> is
a graph class that uses the compact Compressed Sparse Row (CSR)
format to store directed (and bidirectional) graphs. While CSR graphs have
much less
overhead than many other graph formats (e.g., <a
href="adjacency_list.html"><code>adjacency_list</code></a>), they
do not provide any mutability: one cannot add or remove vertices
or edges from a CSR graph. Use this format in high-performance
applications or for very large graphs that you do not need to
change.</p>
<p>The CSR format stores vertices and edges in separate arrays,
with the indices into these arrays corresponding to the identifier
for the vertex or edge, respectively. The edge array is sorted by
the source of each edge, but contains only the targets for the
edges. The vertex array stores offsets into the edge array,
providing the offset of the first edge outgoing from each
vertex. Iteration over the out-edges for the <i>i</i><sup>th</sup>
vertex in the graph is achieved by
visiting <tt>edge_array[vertex_array[i]]</tt>,
<tt>edge_array[vertex_array[i]+1]</tt>,
..., <tt>edge_array[vertex_array[i+1]]</tt>. This format minimizes
memory use to <i>O(n + m)</i>, where <i>n</i> and <i>m</i> are the
number of vertices and edges, respectively. The constants
multiplied by <i>n</i> and <i>m</i> are based on the size of the
integers needed to represent indices into the edge and vertex
arrays, respectively, which can be controlled using
the <a href="#template-parms">template parameters</a>. The
<tt>Directed</tt> template parameter controls whether one edge direction
(the default) or both directions are stored. A directed CSR graph has
<tt>Directed</tt> = <tt>directedS</tt> and a bidirectional CSR graph (with
a limited set of constructors)
has <tt>Directed</tt> = <tt>bidirectionalS</tt>.</p>
<ul>
<li><a href="#synopsis">Synopsis</a></li>
<li><a href="#where">Where Defined</a></li>
<li><a href="#models">Models</a></li>
<li><a href="#template-parms">Template parameters</a></li>
<li><a href="#properties">Properties</a></li>
<li><a href="#member-functions">Member functions</a>
<ul>
<li><a href="#constructors">Constructors</a></li>
<li><a href="#mutators">Mutators</a></li>
<li><a href="#property-access">Property access</a></li>
</ul></li>
<li><a href="#non-members">Non-member functions</a>
<ul>
<li><a href="#vertex-access">Vertex access</a></li>
<li><a href="#edge-access">Edge access</a></li>
<li><a href="#property-map-accessors">Property map accessors</a></li>
<li><a href="#incremental-construction-functions">Incremental construction functions</a></li>
</ul></li>
<li><a href="#example">Example</a></li>
</ul>
<a name="synopsis"></a><h2>Synopsis</h2>
<pre>
namespace boost {
template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = no_property,
typename <a href="#EdgeProperty">EdgeProperty</a> = no_property, typename <a href="#GraphProperty">GraphProperty</a> = no_property,
typename <a href="#Vertex">Vertex</a> = std::size_t, typename <a href="#EdgeIndex">EdgeIndex</a> = Vertex&gt;
class compressed_sparse_row_graph
{
public:
<i>// <a href="#constructors">Graph constructors</a></i>
<a href="#default-const">compressed_sparse_row_graph</a>();
<i>// Unsorted edge list constructors </i>
template&lt;typename InputIterator&gt;
<a href="#edge-const">compressed_sparse_row_graph</a>(edges_are_unsorted_t,
InputIterator edge_begin, InputIterator edge_end,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
template&lt;typename InputIterator, typename EdgePropertyIterator&gt;
<a href="#edge-prop-const">compressed_sparse_row_graph</a>(edges_are_unsorted_t,
InputIterator edge_begin, InputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
template&lt;typename MultiPassInputIterator&gt;
<a href="#edge-multi-const">compressed_sparse_row_graph</a>(edges_are_unsorted_multi_pass_t,
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
template&lt;typename MultiPassInputIterator, typename EdgePropertyIterator&gt;
<a href="#edge-multi-prop-const">compressed_sparse_row_graph</a>(edges_are_unsorted_multi_pass_t,
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
<i>// New sorted edge list constructors <b>(directed only)</b></i>
template&lt;typename InputIterator&gt;
<a href="#edge-sorted-const">compressed_sparse_row_graph</a>(edges_are_sorted_t,
InputIterator edge_begin, InputIterator edge_end,
vertices_size_type numverts,
edges_size_type numedges = 0,
const GraphProperty&amp; prop = GraphProperty());
template&lt;typename InputIterator, typename EdgePropertyIterator&gt;
<a href="#edge-sorted-prop-const">compressed_sparse_row_graph</a>(edges_are_sorted_t,
InputIterator edge_begin, InputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
edges_size_type numedges = 0,
const GraphProperty&amp; prop = GraphProperty());
<i>// In-place unsorted edge list constructors <b>(directed only)</b></i>
template&lt;typename InputIterator&gt;
<a href="#edge-inplace-const">compressed_sparse_row_graph</a>(construct_inplace_from_sources_and_targets_t,
std::vector&lt;vertex_descriptor&gt;&amp; sources,
std::vector&lt;vertex_descriptor&gt;&amp; targets,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
template&lt;typename InputIterator&gt;
<a href="#edge-inplace-prop-const">compressed_sparse_row_graph</a>(construct_inplace_from_sources_and_targets_t,
std::vector&lt;vertex_descriptor&gt;&amp; sources,
std::vector&lt;vertex_descriptor&gt;&amp; targets,
std::vector&lt;EdgeProperty&gt;&amp; edge_props,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
<i>// Miscellaneous constructors <b>(directed only)</b></i>
template&lt;typename Graph, typename VertexIndexMap&gt;
<a href="#graph-const">compressed_sparse_row_graph</a>(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts,
edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
template&lt;typename Graph&gt;
explicit <a href="#graph-const">compressed_sparse_row_graph</a>(const Graph&amp; g);
<i>// <a href="#mutators">Graph mutators <b>(directed only)</b></a></i>
template&lt;typename Graph, typename VertexIndexMap&gt;
void <a href="#assign">assign</a>(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts, edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
void <a href="#assign">assign</a>(const Graph&amp; g, const VertexIndexMap&amp; vi);
template&lt;typename Graph&gt;
void <a href="#assign">assign</a>(const Graph&amp; g);
<i>// <a href="#property-access">Property Access</a></i>
VertexProperty&amp; <a href="#vertex-subscript">operator[]</a>(vertex_descriptor v);
const VertexProperty&amp; <a href="#vertex-subscript">operator[]</a>(vertex_descriptor v) const;
EdgeProperty&amp; <a href="#edge-subscript">operator[]</a>(edge_descriptor v);
const EdgeProperty&amp; <a href="#edge-subscript">operator[]</a>(edge_descriptor v) const;
};
<i>// <a href="IncidenceGraph.html">Incidence Graph requirements</a></i>
vertex_descriptor source(edge_descriptor, const compressed_sparse_row_graph&amp;);
vertex_descriptor target(edge_descriptor, const compressed_sparse_row_graph&amp;);
std::pair&lt;out_edge_iterator, out_edge_iterator&gt;
out_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
degree_size_type out_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
<i>// <a href="BidirectionalGraph.html">Bidirectional Graph requirements <b>(bidirectional only)</b></a></i>
std::pair&lt;in_edge_iterator, in_edge_iterator&gt;
in_edges(vertex_descriptor, const compressed_sparse_row_graph&amp;);
degree_size_type in_degree(vertex_descriptor v, const compressed_sparse_row_graph&amp;);
<i>// <a href="AdjacencyGraph.html">Adjacency Graph requirements</a></i>
std::pair&lt;adjacency_iterator, adjacency_iterator&gt;
adjacent_vertices(vertex_descriptor, const compressed_sparse_row_graph&amp;);
<i>// <a href="VertexListGraph.html">Vertex List Graph requirements</a></i>
std::pair&lt;vertex_iterator, vertex_iterator&gt; vertices(const compressed_sparse_row_graph&amp;);
vertices_size_type num_vertices(const compressed_sparse_row_graph&amp;);
<i>// <a href="EdgeListGraph.html">Edge List Graph requirements</a></i>
std::pair&lt;edge_iterator, edge_iterator&gt; edges(const compressed_sparse_row_graph&amp;);
edges_size_type num_edges(const compressed_sparse_row_graph&amp;);
<i>// <a href="#vertex-access">Vertex access</a></i>
vertex_descriptor <a href="#vertex-lookup">vertex</a>(vertices_size_type i, const compressed_sparse_row_graph&amp;);
<i>// <a href="#edge-access">Edge access</a></i>
std::pair&lt;edge_descriptor, bool&gt;
<a href="#edge">edge</a>(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
edge_descriptor <a href="#edge_from_index">edge_from_index</a>(edges_size_type i, const compressed_sparse_row_graph&amp;);
<i>// <a href="#property-map-accessors">Property map accessors</a></i>
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>&gt;
property_map&lt;compressed_sparse_row_graph, PropertyTag&gt;::type
<a href="#get">get</a>(PropertyTag, compressed_sparse_row_graph&amp; g)
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>&gt;
property_map&lt;compressed_sparse_row_graph, Tag&gt;::const_type
<a href="#get">get</a>(PropertyTag, const compressed_sparse_row_graph&amp; g)
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>, class X&gt;
typename property_traits&lt;property_map&lt;compressed_sparse_row_graph, PropertyTag&gt;::const_type&gt;::value_type
<a href="#get-x">get</a>(PropertyTag, const compressed_sparse_row_graph&amp; g, X x)
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>, class X, class Value&gt;
void <a href="#put-x">put</a>(PropertyTag, const compressed_sparse_row_graph&amp; g, X x, const Value&amp; value);
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type&amp;
<a href="#get_property">get_property</a>(compressed_sparse_row_graph&amp; g, GraphPropertyTag);
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type const &amp;
<a href="#get_property">get_property</a>(const compressed_sparse_row_graph&amp; g, GraphPropertyTag);
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
void <a href="#set_property">set_property</a>(const compressed_sparse_row_graph&amp; g, GraphPropertyTag,
const typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type&amp; value);
<i>// <a href="#incremental-construction-functions">Incremental construction functions</a></i>
<b>(directed only)</b>
template&lt;typename InputIterator, typename Graph&gt;
void <a href="#add_edges">add_edges</a>(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g);
<b>(directed only)</b>
template&lt;typename InputIterator, typename EPIter, typename Graph&gt;
void <a href="#add_edges_prop">add_edges</a>(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph&amp; g);
<b>(directed only)</b>
template&lt;typename BidirectionalIterator, typename Graph&gt;
void <a href="#add_edges_sorted">add_edges_sorted</a>(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph&amp; g);
<b>(directed only)</b>
template&lt;typename BidirectionalIterator, typename EPIter, typename Graph&gt;
void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph&amp; g);
} <i>// end namespace boost</i>
</pre>
<a name="where"></a><h2>Where Defined</h2>
<p><code>&lt;<a href="../../../boost/graph/compressed_sparse_row_graph.hpp">boost/graph/compressed_sparse_row_graph.hpp</a>&gt;</code></p>
<a name="models"></a><h2>Models</h2>
<p>The <tt>compressed_sparse_row_graph</tt> class template models
(i.e., implements the requirements of) many of the
BGL <a href="graph_concepts.html">graph concepts</a>, allowing it
to be used with most of the BGL algorithms. In particular, it
models the following specific graph concepts:</p>
<ul>
<li><a href="Graph.html">Graph</a></li>
<li><a href="IncidenceGraph.html">IncidenceGraph</a></li>
<li><a href="AdjacencyGraph.html">AdjacencyGraph</a></li>
<li><a href="VertexListGraph.html">VertexListGraph</a></li>
<li><a href="EdgeListGraph.html">EdgeListGraph</a></li>
<li><a href="PropertyGraph.html">PropertyGraph</a></li>
</ul>
<a name="template-parms"></a><h2>Template Parameters</h2>
<p>The <tt>compressed_sparse_row_graph</tt> class has several
template parameters that can customize the layout in memory and
what properties are attached to the graph itself. All
parameters have defaults, so users interested only in the
structure of a graph can use the
type <tt>compressed_sparse_row_graph&lt;&gt;</tt> and ignore
the parameters.</p>
<b>Parameters</b>
<br>
<br>
<a name="Directed"></a><code>Directed</code>
<blockquote>
A selector that determines whether the graph will be directed,
bidirectional or undirected. At this time, the CSR graph type
only supports directed and bidirectional graphs, so this value must
be either <code>boost::directedS</code> or
<code>boost::bidirectionalS</code>.<br>
<b>Default</b>: <code>boost::directedS</code>
</blockquote>
<a name="VertexProperty"></a><code>VertexProperty</code>
<blockquote>
A class type that will be
attached to each vertex in the graph. If this value
is <code>void</code>, no properties will be attached to
the vertices of the graph.<br>
<b>Default</b>: <code>void</code>
</blockquote>
<a name="EdgeProperty"></a><code>EdgeProperty</code>
<blockquote>
A class type that will be attached to each edge in the graph. If
this value is <code>void</code>, no properties will be
attached to the edges of the graph.<br>
<b>Default</b>: <code>void</code>
</blockquote>
<a name="GraphProperty"></a><code>GraphProperty</code>
<blockquote>
A nested set
of <code>property</code> templates that describe the
properties of the graph itself. If this value
is <code>no_property</code>, no properties will be attached to
the graph.<br>
<b>Default</b>: <code>no_property</code>
</blockquote>
<a name="Vertex"></a><code>Vertex</code>
<blockquote>
An unsigned integral type that will be
used as both the index into the array of vertices and as the
vertex descriptor itself. Larger types permit the CSR graph to
store more vertices; smaller types reduce the storage required
per vertex.<br>
<b>Default</b>: <code>std::size_t</code>
</blockquote>
<a name="EdgeIndex"></a><code>EdgeIndex</code>
<blockquote>
An unsigned integral type that will be used as the index into
the array of edges. As with the <code>Vertex</code> parameter,
larger types permit more edges whereas smaller types reduce
the amount of storage needed per
edge. The <code>EdgeIndex</code> type shall not be smaller
than the <code>Vertex</code> type, but it may be larger. For
instance, <code>Vertex</code> may be a 16-bit integer
(allowing 32,767 vertices in the graph)
whereas <code>EdgeIndex</code> could then be a 32-bit integer
to allow a complete graph to be stored in the CSR format.<br>
<b>Default</b>: <code>Vertex</code>
</blockquote>
<a name="properties"></a><h2>Interior Properties</h2>
<p> The <tt>compressed_sparse_row_graph</tt> allows properties to
be attached to its vertices, edges, or to the graph itself by way
of its <a href="#template-parms">template parameters</a>. These
properties may be accessed via
the <a href="#property-access">member</a>
and <a href="#property-map-accessors">non-member</a> property
access functions, using the <a href="bundles.html">bundled
properties</a> scheme.</p>
<p>The CSR graph provides two kinds of built-in
properties: <tt>vertex_index</tt>, which maps from vertices to
values in <tt>[0, n)</tt> and <tt>edge_index</tt>, which maps
from edges to values in <tt>[0, m)</tt>, where <tt>n</tt>
and <tt>m</tt> are the number of vertices and edges in the graph,
respectively. </p>
<a name="member-functions"></a><h2>Member Functions</h2>
<a name="constructors"></a><h3>Constructors</h3>
<pre><a name="default-const"></a>
compressed_sparse_row_graph();
</pre>
<p class="indent">Constructs a graph with no vertices or edges.</p>
<hr></hr>
<pre><a name="edge-const"></a>
template&lt;typename InputIterator&gt;
compressed_sparse_row_graph(edges_are_unsorted_t,
InputIterator edge_begin, InputIterator edge_end,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
Constructs a graph with <code>numverts</code> vertices whose
edges are specified by the iterator range <code>[edge_begin,
edge_end)</code>. The <tt>InputIterator</tt> must be a model of
<a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
whose <code>value_type</code> is an <code>std::pair</code> of
integer values. These integer values are the source and target
vertices for the edges, and must fall within the range <code>[0,
numverts)</code>. The edges in <code>[edge_begin,
edge_end)</code> do not need to be sorted. This constructor uses extra
memory to save the edge information before adding it to the graph,
avoiding the requirement for the iterator to have multi-pass capability.
</p>
<p class="indent">
The value <code>prop</code> will be used to initialize the graph
property.
</p>
<hr></hr>
<pre><a name="edge-prop-const"></a>
template&lt;typename InputIterator, typename EdgePropertyIterator&gt;
compressed_sparse_row_graph(edges_are_unsorted_t,
InputIterator edge_begin, InputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
This constructor constructs a graph with <code>numverts</code>
vertices and the edges provided in the iterator range
<code>[edge_begin, edge_end)</code>. Its semantics are identical
to the <a href="#edge-const">edge range constructor</a>, except
that edge properties are also initialized. The type
<tt>EdgePropertyIterator</tt> must be a model of the <a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
concept whose <tt>value_type</tt> is convertible to
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
m)</tt> will be used to initialize the properties on the edges
of the graph, where <tt>m</tt> is distance from
<tt>edge_begin</tt> to <tt>edge_end</tt>. This constructor uses extra
memory to save the edge information before adding it to the graph,
avoiding the requirement for the iterator to have multi-pass capability.
</p>
<hr></hr>
<pre><a name="edge-multi-const"></a>
template&lt;typename MultiPassInputIterator&gt;
compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
Constructs a graph with <code>numverts</code> vertices whose
edges are specified by the iterator range <code>[edge_begin,
edge_end)</code>. The <tt>MultiPassInputIterator</tt> must be a model of
<a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>
whose <code>value_type</code> is an <code>std::pair</code> of
integer values. These integer values are the source and target
vertices for the edges, and must fall within the range <code>[0,
numverts)</code>. The edges in <code>[edge_begin,
edge_end)</code> do not need to be sorted. Multiple passes will be made
over the edge range.
</p>
<p class="indent">
The value <code>prop</code> will be used to initialize the graph
property.
</p>
<hr></hr>
<pre><a name="edge-multi-prop-const"></a>
template&lt;typename MultiPassInputIterator, typename EdgePropertyIterator&gt;
compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
MultiPassInputIterator edge_begin, MultiPassInputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
This constructor constructs a graph with <code>numverts</code>
vertices and the edges provided in the iterator range
<code>[edge_begin, edge_end)</code>. Its semantics are identical
to the <a href="#edge-const">edge range constructor</a>, except
that edge properties are also initialized. The type
<tt>EdgePropertyIterator</tt> must be a model of the <a
href="../../utility/MultiPassInputIterator.html">MultiPassInputIterator</a>
concept whose <tt>value_type</tt> is convertible to
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
m)</tt> will be used to initialize the properties on the edges
of the graph, where <tt>m</tt> is distance from
<tt>edge_begin</tt> to <tt>edge_end</tt>. Multiple passes will be made
over the edge and property ranges.
</p>
<hr></hr>
<pre><a name="edge-sorted-const"></a>
template&lt;typename InputIterator&gt;
compressed_sparse_row_graph(edges_are_sorted_t,
InputIterator edge_begin, InputIterator edge_end,
vertices_size_type numverts,
edges_size_type numedges = 0,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
Constructs a graph with <code>numverts</code> vertices whose
edges are specified by the iterator range <code>[edge_begin,
edge_end)</code>. The argument of type <code>edges_are_sorted_t</code> is
a tag used to distinguish this constructor; the value
<code>edges_are_sorted</code> can be used to initialize this parameter.
The <tt>InputIterator</tt> must be a model of
<a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
whose <code>value_type</code> is an <code>std::pair</code> of
integer values. These integer values are the source and target
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> precede any edges originating from all
vertices <i>j</i> where <i>j &gt; i</i>.
</p>
<p class="indent">
The value <code>numedges</code>, if provided, tells how many
edges are in the range <code>[edge_begin, edge_end)</code> and
will be used to preallocate data structures to save both memory
and time during construction.
</p>
<p class="indent">
The value <code>prop</code> will be used to initialize the graph
property.
</p>
<hr></hr>
<pre><a name="edge-sorted-prop-const"></a>
template&lt;typename InputIterator, typename EdgePropertyIterator&gt;
compressed_sparse_row_graph(edges_are_sorted_t,
InputIterator edge_begin, InputIterator edge_end,
EdgePropertyIterator ep_iter,
vertices_size_type numverts,
edges_size_type numedges = 0,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
This constructor constructs a graph with <code>numverts</code>
vertices and the edges provided in the iterator range
<code>[edge_begin, edge_end)</code>. Its semantics are identical
to the <a href="#edge-const">edge range constructor</a>, except
that edge properties are also initialized. The type
<tt>EdgePropertyIterator</tt> must be a model of the <a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
concept whose <tt>value_type</tt> is convertible to
<tt>EdgeProperty</tt>. The iterator range <tt>[ep_iter, ep_ter +
m)</tt> will be used to initialize the properties on the edges
of the graph, where <tt>m</tt> is distance from
<tt>edge_begin</tt> to <tt>edge_end</tt>.
</p>
<hr></hr>
<pre><a name="edge-inplace-const"></a>
template&lt;typename InputIterator&gt;
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
std::vector&lt;vertex_descriptor&gt;&amp; sources,
std::vector&lt;vertex_descriptor&gt;&amp; targets,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
This constructor constructs a graph with <code>numverts</code> vertices
and the edges provided in the two vectors <code>sources</code> and
<code>targets</code>. The two vectors are mutated in-place to sort them
by source vertex. They are returned with unspecified values, but do not
share storage with the constructed graph (and so are safe to destroy).
The parameter <code>prop</code>, if provided, is used to initialize the
graph property.
</p>
<hr></hr>
<pre><a name="edge-inplace-prop-const"></a>
template&lt;typename InputIterator&gt;
compressed_sparse_row_graph(construct_inplace_from_sources_and_targets_t,
std::vector&lt;vertex_descriptor&gt;&amp; sources,
std::vector&lt;vertex_descriptor&gt;&amp; targets,
std::vector&lt;EdgeProperty&gt;&amp; edge_props,
vertices_size_type numverts,
const GraphProperty&amp; prop = GraphProperty());
</pre>
<p class="indent">
This constructor constructs a graph with <code>numverts</code> vertices
and the edges provided in the two vectors <code>sources</code> and
<code>targets</code>. Edge properties are initialized from the vector
<code>edge_props</code>. The three vectors are mutated in-place to sort
them by source vertex. They are returned with unspecified values, but do
not share storage with the constructed graph (and so are safe to
destroy). The parameter <code>prop</code>, if provided, is used to
initialize the graph property.
</p>
<hr></hr>
<pre><a name="graph-const"></a>
template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts,
edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
template&lt;typename Graph&gt;
explicit compressed_sparse_row_graph(const Graph&amp; g);
</pre>
<p class="indent">
Calls the <a href="#assign"><tt>assign</tt></a> function with
all of the arguments it is given.
</p>
<hr></hr>
<a name="mutators"></a><h3>Mutators</h3>
<pre><a name="assign"></a>
template&lt;typename Graph, typename VertexIndexMap&gt;
void assign(const Graph&amp; g, const VertexIndexMap&amp; vi,
vertices_size_type numverts, edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
void assign(const Graph&amp; g, const VertexIndexMap&amp; vi);
template&lt;typename Graph&gt;
void assign(const Graph&amp; g);
</pre>
<p class="indent">
Clears the CSR graph and builds a CSR graph in place from the
structure of another graph. The graph type <tt>Graph</tt> must
be a model of <a href="IncidenceGraph.html">IncidenceGraph</a>.
<br><b>Parameters</b>
<ul>
<li><tt>g</tt>: The incoming graph.</li>
<li><tt>vi</tt>: A map from vertices to indices. If not
provided, <tt>get(vertex_index, g)</tt> will be used.</li>
<li><tt>numverts</tt>: The number of vertices in the graph
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
<a href="VertexListGraph.html">VertexListGraph</a>.</li>
<li><tt>numedges</tt>: The number of edges in the graph
<tt>g</tt>. If not provided, <tt>Graph</tt> must be a model of
<a href="EdgeListGraph.html">EdgeListGraph</a>.</li>
</ul>
</p>
<hr></hr>
<a name="property-access"></a><h3>Property Access</h3>
<pre><a name="vertex-subscript"></a>
VertexProperty&amp; operator[](vertex_descriptor v);
const VertexProperty&amp; operator[](vertex_descriptor v) const;
</pre>
<p class="indent">
Retrieves the property value associated with vertex
<tt>v</tt>. Only valid when <tt>VertexProperty</tt> is a class
type that is not <tt>no_property</tt>.
</p>
<hr></hr>
<pre><a name="edge-subscript">
EdgeProperty&amp; operator[](edge_descriptor v);
const EdgeProperty&amp; operator[](edge_descriptor v) const;
</pre>
<p class="indent">
Retrieves the property value associated with edge
<tt>v</tt>. Only valid when <tt>EdgeProperty</tt> is a class
type that is not <tt>no_property</tt>.
</p>
<hr></hr>
<a name="non-members"></a><h2>Non-member Functions</h2>
<a name="vertex-access"></a><h3>Vertex access</h3>
<pre><a name="vertex-lookup"></a>
vertex_descriptor vertex(vertices_size_type i, const compressed_sparse_row_graph&amp;);
</pre>
<p class="indent">
Retrieves the <i>i</i><sup>th</sup> vertex in the graph in
constant time.
</p>
<hr></hr>
<a name="edge-access"></a><h3>Edge access</h3>
<pre><a name="edge"></a>
std::pair&lt;edge_descriptor, bool&gt;
edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
</pre>
<p class="indent">
If there exists an edge <i>(u, v)</i> in the graph, returns the
descriptor for that edge and <tt>true</tt>; otherwise, the
second value in the pair will be <tt>false</tt>. If multiple
edges exist from <tt>u</tt> to <tt>v</tt>, the first edge will
be returned; use <a href="IncidenceGraph.html"><tt>out_edges</tt></a> and a
conditional statement
to retrieve all edges to a given target. This function requires linear
time in the
number of edges outgoing from <tt>u</tt>.
</p>
<hr></hr>
<pre><a name="edge_from_index"></a>
edge_descriptor edge_from_index(edges_size_type i, const compressed_sparse_row_graph&amp;);
</pre>
<p class="indent">
Returns the <i>i</i><sup>th</sup> edge in the graph. This
operation requires logarithmic time in the number of vertices.
</p>
<hr></hr>
<h3><a name="property-map-accessors">Property Map Accessors</a></h3>
<pre><a name="get"></a>
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>&gt;
property_map&lt;compressed_sparse_row_graph, PropertyTag&gt;::type
get(PropertyTag, compressed_sparse_row_graph&amp; g)
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>&gt;
property_map&lt;compressed_sparse_row_graph, Tag&gt;::const_type
get(PropertyTag, const compressed_sparse_row_graph&amp; g)
</pre>
<p class="indent">
Returns the property map object for the vertex property
specified by <TT>PropertyTag</TT>. The <TT>PropertyTag</TT> must
be a member pointer to access one of the fields in
<tt>VertexProperty</tt> or <tt>EdgeProperty</tt>.
</p>
<hr></hr>
<pre><a name="get-x"></a>
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>, class X&gt;
typename property_traits&lt;property_map&lt;compressed_sparse_row_graph, PropertyTag&gt;::const_type&gt::value_type
get(PropertyTag, const compressed_sparse_row_graph&amp; g, X x)
</pre>
<p class="indent">
This returns the property value for <tt>x</tt>, where <tt>x</tt>
is either a vertex or edge descriptor.
</p>
<hr></hr>
<pre><a name="put-x"></a>
template&lt;typename <a href="./PropertyTag.html">PropertyTag</a>, class X, class Value&gt;
void put(PropertyTag, const compressed_sparse_row_graph&amp; g, X x, const Value&amp; value);
</pre>
<p class="indent">
This sets the property value for <tt>x</tt> to
<tt>value</tt>. <tt>x</tt> is either a vertex or edge
descriptor. <tt>Value</tt> must be convertible to <tt>typename
property_traits&lt;property_map&lt;compressed_sparse_row_graph,
PropertyTag&gt;::type&gt::value_type</tt>
</p>
<hr></hr>
<pre><a name="get_property"></a>
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type&amp;
get_property(compressed_sparse_row_graph&amp; g, GraphPropertyTag);
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type const &amp;
get_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag);
</pre>
<p class="indent">
Return the property specified by <tt>GraphPropertyTag</tt> that
is attached to the graph object <tt>g</tt>.
</p>
<hr></hr>
<pre><a name="set_property"></a>
template&lt;typename <a href="./PropertyTag.html#GraphPropertyTag">GraphPropertyTag</a>&gt;
void set_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag,
const typename graph_property&lt;compressed_sparse_row_graph, GraphPropertyTag&gt;::type&amp; value);
</pre>
<p class="indent">
Set the property specified by <tt>GraphPropertyTag</tt> that
is attached to the graph object <tt>g</tt>.
</p>
<hr></hr>
<h3><a name="incremental-construction-functions">Incremental construction functions</a></h3>
<pre><a name="add_edges"></a>
template&lt;typename InputIterator&gt;
void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_graph&amp; g)
</pre>
<p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>InputIterator</tt> must be a model of <a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
whose <code>value_type</code> is an <code>std::pair</code> of integer
values. These integer values are the source and target vertices of the
new edges. The edges do not need to be sorted.
</p>
<hr></hr>
<pre><a name="add_edges_prop"></a>
template&lt;typename InputIterator, typename EPIter&gt;
void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter ep_last, compressed_sparse_row_graph&amp; g)
</pre>
<p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) with
corresponding edge properties (from <tt>ep_first</tt> to
<tt>ep_last</tt>) to the graph. The <tt>InputIterator</tt> and
<tt>EPIter</tt> must be models of <a
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>;
the <code>value_type</code> of <tt>InputIterator</tt> must be an
<code>std::pair</code> of integer values, and the <code>value_type</code>
of <tt>EPIter</tt> must be the edge property type of the graph. The
integer values produced by the <tt>InputIterator</tt> are the source and
target vertices of the new edges. The edges do not need to be sorted.
</p>
<hr></hr>
<pre><a name="add_edges_sorted"></a>
template&lt;typename BidirectionalIterator&gt;
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, compressed_sparse_row_graph&amp; g)
</pre>
<p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>BidirectionalIterator</tt> must be a model of <a
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>
whose <code>value_type</code> is an <code>std::pair</code> of integer
values. These integer values are the source and target vertices of the
new edges. The edges must be sorted in increasing order by source vertex
index.
</p>
<hr></hr>
<pre><a name="add_edges_sorted_prop"></a>
template&lt;typename BidirectionalIterator, typename EPIter&gt;
void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, EPIter ep_iter, compressed_sparse_row_graph&amp; g)
</pre>
<p class="indent">
Add a range of edges (from <tt>first</tt> to <tt>last</tt>) to the graph.
The <tt>BidirectionalIterator</tt> and <tt>EPIter</tt> must be models of
<a
href="http://www.boost.org/sgi/stl/BidirectionalIterator.html">BidirectionalIterator</a>.
The <code>value_type</code> of the <tt>BidirectionalIterator</tt> must be
an <code>std::pair</code> of integer
values. These integer values are the source and target vertices of the
new edges.
The <code>value_type</code> of the <tt>EPIter</tt> must be the edge
property type of the graph.
The edges must be sorted in increasing order by source vertex
index.
</p>
<hr></hr>
<a name="example"></a><h2>Example</h2>
<br>[<a
href="../example/csr-example.cpp">libs/graph/example/csr-example.cpp</a>]
<p>We will use the <tt>compressed_sparse_row_graph</tt> graph
class to store a simple Web graph. In this web graph the vertices
represent web pages and the edges represent links from one web
page to another. With each web page we want to associate a URL, so
we initially create a <tt>WebPage</tt> class that stores the
URL. Then we can create our graph type by providing
<tt>WebPage</tt> as a parameter to the
<tt>compressed_sparse_row_graph</tt> class template.</p>
<pre>
class WebPage
{
public:
std::string url;
};
// ...
typedef compressed_sparse_row_graph&lt;directedS, WebPage&gt; WebGraph;
WebGraph g(&the_edges[0], &the_edges[0] + sizeof(the_edges)/sizeof(E), 6);
</pre>
<p>We can then set the properties on the vertices of the graph
using the <a href="bundles.html">bundled properties</a> syntax,
and display the edges for the user.</p>
<pre>
// Set the URLs of each vertex
int index = 0;
BGL_FORALL_VERTICES(v, g, WebGraph)
g[v].url = urls[index++];
// Output each of the links
std::cout &lt;&lt; "The web graph:" &lt;&lt; std::endl;
BGL_FORALL_EDGES(e, g, WebGraph)
std::cout &lt;&lt; " " &lt;&lt; g[source(e, g)].url &lt;&lt; " -> " &lt;&lt; g[target(e, g)].url
&lt;&lt; std::endl;
</pre>
<p>See the <a href="../example/csr-example.cpp">complete example
source</a> for other operations one can perform with a
<tt>compressed_sparse_row_graph</tt>.</p>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2005</TD><TD>
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University (<script language="Javascript">address("cs.indiana.edu", "dgregor")</script>)<br>
Jeremiah Willcock, Indiana University (<script language="Javascript">address("osl.iu.edu", "jewillco")</script>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")</script>)
</TD></TR></TABLE>
</body>
</html>
+35 -25
View File
@@ -1,27 +1,24 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000-2001
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek 2000-2001
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: Connected Components</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1>
<A NAME="sec:connected-components">
<img src="figs/python.gif" alt="(Python)"/>
<TT>connected_components</TT></A>
</H1>
@@ -65,7 +62,9 @@ IN: <tt>const Graph&amp; g</tt>
<blockquote>
An undirected graph. The graph type must be a model of <a
href="VertexListGraph.html">Vertex List Graph</a> and <a
href="IncidenceGraph.html">Incidence Graph</a>.
href="IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
OUT: <tt>ComponentMap c</tt>
@@ -75,10 +74,13 @@ and assigning each component an integer label. The algorithm then
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/WritablePropertyMap.html">Writable Property
Map</a>. The value type shouch be an integer type, preferably the same
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
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.
the graph's vertex descriptor type.<br>
<b>Python</b>: Must be an <tt>vertex_int_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_vertex_int_map("component")</tt>
</blockquote>
<h3>Named Parameters</h3>
@@ -87,16 +89,18 @@ UTIL: <tt>color_map(ColorMap color)</tt>
<blockquote>
This is used by the algorithm to keep track of its progress through
the graph. The type <tt>ColorMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> and its key type must be the graph's vertex
descriptor type and the value type of the color map must model
<a href="./ColorValue.html">ColorValue</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.
map.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
@@ -105,12 +109,18 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
num_vertices(g))</tt>. This parameter is only necessary when the
default color property map is used. The type <tt>VertexIndexMap</tt>
must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an integer type. The
vertex descriptor type of the graph needs to be usable as the key
type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</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>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>
@@ -139,9 +149,9 @@ undirected graph.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+32 -36
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Constructing Graph Algorithms</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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 +79,7 @@ those types that model <a
href="./VertexListGraph.html">VertexListGraph</a>. This is enforced by
the use of those graph operations in the algorithm, and furthermore by
our explicit requirement added as a concept check with
<TT>function_requires()</TT> (see Section <A
<TT>BOOST_CONCEPT_ASSERT()</TT> (see Section <A
HREF="../../concept_check/concept_check.htm">Concept
Checking</A> for more details about concept checking).
@@ -95,12 +91,12 @@ use the propery map interface. This gives the user of the
algorithm the ability to decide how they want to store the properties.
Since we will need to both read and write the colors we specify the
requirements as <a
href="../../property_map/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
href="../../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>. The
<TT>key_type</TT> of the color map must be the
<TT>vertex_descriptor</TT> from the graph, and the <TT>value_type</TT>
must be some kind of integer. We also specify the interface for the
<TT>order</TT> parameter as a property map, in this case a <a
href="../../property_map/ReadablePropertyMap.html">ReadablePropertyMap</a>. For
href="../../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a>. For
order, the <TT>key_type</TT> is an integer offset and the
<TT>value_type</TT> is a <TT>vertex_descriptor</TT>. Again we enforce
these requirements with concept checks. The return value of this
@@ -110,14 +106,14 @@ hence the return type of the function is the graph's
graph algorithm as a template function, the concept checks, and some
typedefs. The implementation is straightforward, the only step not
discussed above is the color initialization step, where we set the
color of all the vertices to ``uncolored''.
color of all the vertices to "uncolored."
<P>
<PRE>
namespace boost {
template &lt;class VertexListGraph, class Order, class Color&gt;
typename graph_traits&lt;VertexListGraph&gt;::vertices_size_type
sequential_vertex_color_ting(const VertexListGraph&amp; G,
sequential_vertex_color_ting(const VertexListGraph&amp; G,
Order order, Color color)
{
typedef graph_traits&lt;VertexListGraph&gt; GraphTraits;
@@ -126,32 +122,32 @@ namespace boost {
typedef typename property_traits&lt;Color&gt;::value_type ColorType;
typedef typename property_traits&lt;Order&gt;::value_type OrderType;
function_requires&lt; VertexListGraphConcept&lt;VertexListGraph&gt; &gt;();
function_requires&lt; ReadWritePropertyMapConcept&lt;Color, vertex_descriptor&gt; &gt;();
function_requires&lt; IntegerConcept&lt;ColorType&gt; &gt;();
function_requires&lt; size_type, ReadablePropertyMapConcept&lt;Order&gt; &gt;();
typedef typename same_type&lt;OrderType, vertex_descriptor&gt;::type req_same;
BOOST_CONCEPT_ASSERT(( VertexListGraphConcept&lt;VertexListGraph&gt; ));
BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept&lt;Color, vertex_descriptor&gt; ));
BOOST_CONCEPT_ASSERT(( IntegerConcept&lt;ColorType&gt; ));
BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept&lt;Order, size_type&gt; ));
BOOST_STATIC_ASSERT((is_same&lt;OrderType, vertex_descriptor&gt;::value));
size_type max_color = 0;
const size_type V = num_vertices(G);
std::vector&lt;size_type&gt;
std::vector&lt;size_type&gt;
mark(V, numeric_limits_max(max_color));
typename GraphTraits::vertex_iterator v, vend;
for (tie(v, vend) = vertices(G); v != vend; ++v)
for (boost::tie(v, vend) = vertices(G); v != vend; ++v)
color[*v] = V - 1; // which means "not colored"
for (size_type i = 0; i &lt; V; i++) {
vertex_descriptor current = order[i];
// mark all the colors of the adjacent vertices
typename GraphTraits::adjacency_iterator ai, aend;
for (tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
mark[color[*ai]] = i;
for (boost::tie(ai, aend) = adjacent_vertices(current, G); ai != aend; ++ai)
mark[color[*ai]] = i;
// find the smallest color unused by the adjacent vertices
size_type smallest_color = 0;
while (smallest_color &lt; max_color &amp;&amp; mark[smallest_color] == i)
while (smallest_color &lt; max_color &amp;&amp; mark[smallest_color] == i)
++smallest_color;
// if all the colors are used up, increase the number of colors
@@ -173,15 +169,15 @@ namespace boost {
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+24 -24
View File
@@ -1,28 +1,24 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Copy Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><TT>copy_graph</TT></H1>
<PRE>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>&gt;
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="./MutableGraph.html">MutableGraph</a>&gt;
void copy_graph(const VertexListGraph&amp; G, MutableGraph&amp; G_copy,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>)
</PRE>
@@ -46,7 +42,7 @@ IN: <tt>const VertexListGraph&amp; G</tt>
A directed or undirected graph. The graph type must be a model of <a href="./VertexListGraph.html">Vertex List Graph</a>.
</blockquote>
OUT: <tt>const MutableGraph&amp; G_copy</tt>
OUT: <tt>MutableGraph&amp; G_copy</tt>
<blockquote>
The resulting copy of the graph. The graph type must be a model of <a
href="./MutableGraph.html">Mutable Graph</a>.
@@ -56,7 +52,7 @@ href="./MutableGraph.html">Mutable Graph</a>.
IN: <tt>vertex_copy(VertexCopier vc)</tt>
<blockquote>
This is a <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary Function</a> that copies the properties of a vertex in the original graph
This is a <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary Function</a> that copies the properties of a vertex in the original graph
into the corresponding vertex in the copy.<br>
<b>Default:</b> <tt>vertex_copier&lt;VertexListGraph, MutableGraph&gt;</tt>
@@ -66,7 +62,7 @@ map from the graph.
IN: <tt>edge_copy(EdgeCopier ec)</tt>
<blockquote>
This is a <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary Function</a> that copies the properties of an edge in the original graph
This is a <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary Function</a> that copies the properties of an edge in the original graph
into the corresponding edge in the copy.<br>
<b>Default:</b> <tt>edge_copier&lt;VertexListGraph, MutableGraph&gt;</tt>
@@ -77,11 +73,15 @@ map from the graph.
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
The vertex index map type must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a> and must map the vertex descriptors of <tt>G</tt> to the
integers from 0 to <tt>num_vertices(G)</tt>.<br>
integers in the half-open range <tt>[0,num_vertices(G))</tt>.<br>
<b>Default:</b> <tt>get(vertex_index, G)</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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
@@ -90,7 +90,7 @@ UTIL/OUT: <tt>orig_to_copy(Orig2CopyMap c)</tt>
This maps vertices in the original graph to vertices in the copy.
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the output graph's vertex descriptor type of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
@@ -108,9 +108,9 @@ The time complexity is <i>O(V + E)</i>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+115 -49
View File
@@ -1,25 +1,24 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
<!-- 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: Cuthill-Mckee Ordering</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
</Head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:bfs">
<H1>
<img src="figs/python.gif" alt="(Python)"/>
<TT>cuthill_mckee_ordering</TT>
</H1>
@@ -34,7 +33,7 @@
<TD ALIGN="LEFT">color, degree</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(log(m)|E|)</i> where <i>m = max { degree(v) | v in V }</i> </TD>
<TD ALIGN="LEFT">time: <i>O(m log(m)|V|)</i> where <i>m = max { degree(v) | v in V }</i> </TD>
</TR>
</TABLE>
</DIV>
@@ -44,17 +43,36 @@
(1)
template &lt;class IncidenceGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
void
cuthill_mckee_ordering(IncidenceGraph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
OutputIterator inverse_permutation,
OutputIterator
cuthill_mckee_ordering(const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
(2)
template &lt;class VertexListGraph, class OutputIterator,
template &lt;class VertexListGraph, class OutputIterator&gt;
OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation);
template &lt;class VertexListGraph, class OutputIterator, class VertexIndexMap&gt;
OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
VertexIndexMap index_map);
template &lt;class VertexListGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
void
cuthill_mckee_ordering(VertexListGraph&amp; G, OutputIterator inverse_permutation,
OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
(3)
template &lt;class IncidenceGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
OutputIterator
cuthill_mckee_ordering(const IncidenceGraph&amp; g,
std::deque&lt; typename
graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor &gt; vertex_queue,
OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
</pre>
@@ -62,7 +80,7 @@ The goal of the Cuthill-Mckee (and reverse Cuthill-Mckee) ordering
algorithm[<A
HREF="bibliography.html#george81:__sparse_pos_def">14</A>, <A
HREF="bibliography.html#cuthill69:reducing_bandwith">43</A>, <a
href="bibliography.html#liu75:rcm">44</a>, <a
href="bibliography.html#liu75:anal_cm_rcm">44</a>, <a
href="bibliography.html#george71:fem">45</a> ] is to reduce the <a
href="./bandwidth.html">bandwidth</a> of a graph by reordering the
indices assigned to each vertex. The Cuthill-Mckee ordering algorithm
@@ -73,9 +91,13 @@ increasing degree.
<p>
Version 1 of the algorithm lets the user choose the ``starting
vertex'' whereas version 2 finds a good starting vertex using the
pseudo-peripheral pair heuristic. The choice of the ``starting
vertex'' can have a significant effect on the quality of the ordering.
vertex'', version 2 finds a good starting vertex using the
pseudo-peripheral pair heuristic (among each component), while version 3
contains the starting nodes for each vertex in the deque. The choice of the
``starting vertex'' can have a significant effect on the quality of the
ordering. For versions 2 and 3, <tt>find_starting_vertex</tt> will be called
for each component in the graph, increasing run time significantly.
</p>
<p>
The output of the algorithm are the vertices in the new ordering.
@@ -83,15 +105,17 @@ Depending on what kind of output iterator you use, you can get either
the Cuthill-Mckee ordering or the reverse Cuthill-McKee ordering. For
example, if you store the output into a vector using the vector's
reverse iterator, then you get the reverse Cuthill-McKee ordering.
</p>
<pre>
std::vector&lt;vertex_descriptor&gt; inv_perm(num_vertices(G));
cuthill_mckee_ordering(G, inv_perm.rbegin());
cuthill_mckee_ordering(G, inv_perm.rbegin(), ...);
</pre>
<p>
Either way, storing the output into a vector gives you the
permutation from the new ordering to the old ordering.
</p>
<pre>
inv_perm[new_index[u]] == u
@@ -101,6 +125,7 @@ permutation from the new ordering to the old ordering.
Often times, it is the opposite permutation that you want, the
permutation from the old index to the new index. This can easily be
computed in the following way.
</p>
<pre>
for (size_type i = 0; i != inv_perm.size(); ++i)
@@ -115,25 +140,30 @@ For version 1:
<ul>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a
href="./IncidenceGraph.html">IncidenceGraph</a>.
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
<li> <tt>vertex_descriptor s</tt> &nbsp(IN) <br>
The starting vertex.
The starting vertex.<br>
<b>Python</b>: Unsupported parameter.
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the <a
href="http://www.sgi.com/tech/stl/OutputIterator.html">output
iterator</a> in their new order.
href="http://www.boost.org/sgi/stl/OutputIterator.html">output
iterator</a> in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex
ordering is returned as a Python <tt>list</tt>.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).
(to avoid visiting the same vertex twice).<br>
<b>Python</b>: Unsupported parameter.
<li> <tt>DegreeMap degree_map</tt> &nbsp(IN) <br>
This must map vertices to their degree.
This must map vertices to their degree.<br>
<b>Python</b>: Unsupported parameter.
</ul>
@@ -141,25 +171,61 @@ For version 2:
<ul>
<li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br>
<li> <tt>VertexListGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>.
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
<li> <tt><a href="http://www.sgi.com/tech/stl/OutputIterator.html">
OutputIterator</a> inverse_permutation</tt> &nbsp(OUT) <br>
<li> <tt><a href="http://www.boost.org/sgi/stl/OutputIterator.html">
OutputIterator</a> inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the
output iterator in their new order.
output iterator in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex
ordering is returned as a Python <tt>list</tt>.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).
(to avoid visiting the same vertex twice).<br>
<b>Python</b>: Unsupported parameter.
<li> <tt>DegreeMap degree_map</tt> &nbsp(IN) <br>
This must map vertices to their degree.
This must map vertices to their degree.<br>
<b>Python</b>: Unsupported parameter.
</ul>
For version 3:
<ul>
<li> <tt>IncidenceGraph&amp; g</tt> &nbsp;(IN) <br>
An undirected graph. The graph's type must be a model of <a
href="./IncidenceGraph.html">IncidenceGraph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
<li> <tt> std::deque&lt; typename graph_traits&lt;Graph&gt;::vertex_descriptor &gt; vertex_queue </tt> &nbsp(IN) <br>
The deque containing the starting vertices for each component.<br>
<b>Python</b>: Unsupported parameter.
<li> <tt>OutputIterator inverse_permutation</tt> &nbsp(OUT) <br>
The new vertex ordering. The vertices are written to the <a
href="http://www.boost.org/sgi/stl/OutputIterator.html">output
iterator</a> in their new order.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex
ordering is returned as a Python <tt>list</tt>.
<li> <tt>ColorMap color_map</tt> &nbsp(WORK) <br>
Used internally to keep track of the progress of the algorithm
(to avoid visiting the same vertex twice).<br>
<b>Python</b>: Unsupported parameter.
<li> <tt>DegreeMap degree_map</tt> &nbsp(IN) <br>
This must map vertices to their degree.<br>
<b>Python</b>: Unsupported parameter.
</ul>
<h3>Example</h3>
See <a
@@ -174,9 +240,9 @@ and <tt>degree_property_map</tt> in <tt>boost/graph/properties.hpp</tt>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+223
View File
@@ -0,0 +1,223 @@
<HTML>
<!--
Copyright (c) Piotr Wygocki 2013
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: Cycle Canceling for Min Cost Max Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:cycle_canceling">
<TT>cycle_canceling</TT>
</H1>
<PRE>
<i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt;
void cycle_canceling(
Graph &amp;g,
const bgl_named_params&lt;P, T, R&gt; &amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class Pred, class Distance, class Reversed, class ResidualCapacity, class Weight&gt;
void cycle_canceling(const Graph &amp; g, Weight weight, Reversed rev, ResidualCapacity residual_capacity, Pred pred, Distance distance)
</PRE>
<P>
The <tt>cycle_canceling()</tt> function calculates the minimum cost flow of a network with given flow. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow.
For given flow values <i> f(u,v)</i> function minimizes flow cost in such a way, that for each <i>v in V</i> the
<i> sum<sub> u in V</sub> f(v,u) </i> is preserved. Particularly if the input flow was the maximum flow, the function produces min cost max flow.
The function calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
<i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<p>
There are several special requirements on the input graph and property
map parameters for this algorithm. First, the directed graph
<i>G=(V,E)</i> that represents the network must be augmented to
include the reverse edge for every edge in <i>E</i>. That is, the
input graph should be <i>G<sub>in</sub> = (V,{E U
E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt>
must map each edge in the original graph to its reverse edge, that is
<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>.
The <tt>WeightMap</tt> has to map each edge from <i>E<sup>T</sup></i> to <i>-weight</i> of its reversed edge.
Note that edges from <i>E</i> can have negative weights.
<p>
If weights in the graph are nonnegative, the
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a>
might be better choice for min cost max flow.
<p>
The algorithm is described in <a
href="./bibliography.html#ahuja93:_network_flows">Network Flows</a>.
<p>
In each round algorithm augments the negative cycle (in terms of weight) in the residual graph.
If there is no negative cycle in the network, the cost is optimized.
<p>
Note that, although we mention capacity in the problem description, the actual algorithm doesn't have to now it.
<p>
In order to find the cost of the result flow use:
<a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/successive_shortest_path_nonnegative_weights.hpp"><TT>boost/graph/successive_shortest_path_nonnegative_weights.hpp</TT></a>
<P>
<h3>Parameters</h3>
IN: <tt>Graph&amp; g</tt>
<blockquote>
A directed graph. The
graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a> For each edge
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph.
</blockquote>
<h3>Named Parameters</h3>
IN/OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote>
This maps edges to their residual capacity. The type must be a model
of a mutable <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a>. The key type of the map must be the graph's edge descriptor
type.<br>
<b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
</blockquote>
IN: <tt>reverse_edge_map(ReverseEdgeMap rev)</tt>
<blockquote>
An edge property map that maps every edge <i>(u,v)</i> in the graph
to the reverse edge <i>(v,u)</i>. The map must be a model of
constant <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</a>. The key type of the map must be the graph's edge
descriptor type.<br>
<b>Default:</b> <tt>get(edge_reverse, g)</tt>
</blockquote>
IN: <tt>weight_map(WeightMap w)</tt>
<blockquote>
The weight (also know as ``length'' or ``cost'') of each edge in the
graph. The <tt>WeightMap</tt> type must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type for this property map must be the edge
descriptor of the graph. The value type for the weight map must be
<i>Addable</i> with the distance map's value type. <br>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
</blockquote>
UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
<blockquote>
Use by the algorithm to store augmenting paths. The map must be a
model of mutable <a
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
The key type must be the graph's vertex descriptor type and the
value type must be the graph's edge descriptor type.<br>
<b>Default:</b> an <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of edge descriptors of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
</blockquote>
UTIL: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map.
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.<br>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
Maps each vertex of the graph to a unique integer in the range
<tt>[0, num_vertices(g))</tt>. This property map is only needed
if the default for the distance or predecessor map is used.
The vertex index map must be a model of <a
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type of the map must be the graph's vertex
descriptor type.<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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
<h3>Complexity</h3>
In the integer capacity and weight case, if <i>C</i> is the initial cost of the flow, then the complexity is <i> O(C * |V| * |E|)</i>,
where <i>O(|E|* |V|)</i> is the complexity of the bellman ford shortest paths algorithm and <i>C</i> is upper bound on number of iteration.
In many real world cases number of iterations is much smaller than <i>C</i>.
<h3>Example</h3>
The program in <a
href="../example/cycle_canceling_example.cpp"><tt>example/cycle_canceling_example.cpp</tt></a>.
<h3>See Also</h3>
<a href="./successive_shortest_path_nonnegative_weights.html"><tt>successive_shortest_path_nonnegative_weights()</tt></a><br>
<a href="./find_flow_cost.html"><tt>find_flow_cost()</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2013</TD><TD>
Piotr Wygocki, University of Warsaw (<A HREF="mailto:wygos@mimuw.edu.pl">wygos at mimuw.edu.pl</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
-->
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
-->
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
-->
<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
-->
<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
-->
<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
-->
<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
-->
<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
p -->
+98 -68
View File
@@ -1,25 +1,22 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Directed Acyclic Graph Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:dag_shortest_paths"></A>
<img src="figs/python.gif" alt="(Python)"/>
<TT>dag_shortest_paths</TT>
</H1>
@@ -33,27 +30,27 @@ void dag_shortest_paths(const VertexListGraph&amp; g,
const bgl_named_params&lt;Param,Tag,Rest&gt;&amp; params)
<i>// non-named parameter version</i>
template &lt;class VertexListGraph, class DijkstraVisitor,
class DistanceMap, class WeightMap, class ColorMap,
template &lt;class VertexListGraph, class DijkstraVisitor,
class DistanceMap, class WeightMap, class ColorMap,
class PredecessorMap,
class Compare, class Combine,
class Compare, class Combine,
class DistInf, class DistZero&gt;
void dag_shortest_paths(const VertexListGraph&amp; g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
DistanceMap distance, WeightMap weight, ColorMap color,
PredecessorMap pred, DijkstraVisitor vis,
PredecessorMap pred, DijkstraVisitor vis,
Compare compare, Combine combine, DistInf inf, DistZero zero)
</PRE>
<P>
This algorithm&nbsp;[<A HREF="bibliography.html#clr90">8</A>] solves
the single-source shortest-paths problem on a weighted, directed
the single-source shortest-paths problem on a weighted, directed
acyclic graph (DAG). This algorithm is more efficient for DAG's
than either the Dijkstra or Bellman-Ford algorithm.
Use breadth-first search instead of this algorithm
when all edge weights are equal to one. For the definition of the
shortest-path problem see Section <A
HREF="graph_theory_review.html#sec:shortest-path-algorithms">Shortest-Paths
HREF="graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A> for some background to the shortest-path problem.
</P>
@@ -77,44 +74,57 @@ algorithm's event points.</P>
<h3>Parameters</h3>
IN: <tt>const VertexListGraph&amp; g</tt>
IN: <tt>const VertexListGraph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied.
The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.
The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.
and the shortest paths tree will be rooted at this vertex.<br>
<b>Python</b>: The parameter is named <tt>root_vertex</tt>.
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap w_map)</tt>
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for the map must be
<i>Addable</i> with the value type of the distance map.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
<b>Python</b>: Must be an <tt>edge_double_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the
heap data structure when an edge is relaxed. The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</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>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>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
@@ -122,56 +132,61 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
u</i> then <i>u</i> is either the source vertex or a vertex that is
not reachable from the source. The <tt>PredecessorMap</tt> type
must be a <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> which key and vertex types the same as the vertex
descriptor type of the graph.<br>
<b>Default:</b> <tt>dummy_property_map</tt>
<b>Default:</b> <tt>dummy_property_map</tt><br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map.
be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</tt> formed with the <tt>combine</tt>
function object and the <tt>zero</tt> object for the identity
element. Also the distance value type must have a <a
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html">
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
StrictWeakOrdering</a> provided by the <tt>compare</tt> function
object.<br>
<b>Default:</b> <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.
map.<br>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.
</blockquote>
IN: <tt>distance_compare(CompareFunction cmp)</tt>
IN: <tt>distance_compare(CompareFunction cmp)</tt>
<blockquote>
This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>CompareFunction</tt> type
must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Binary
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
Predicate</a> and have argument types that match the value type of
the <tt>DistanceMap</tt> property map.<br>
<b>Default:</b>
<tt>std::less&lt;D&gt;</tt> with <tt>D=typename
property_traits&lt;DistanceMap&gt;::value_type</tt>
property_traits&lt;DistanceMap&gt;::value_type</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_combine(CombineFunction cmb)</tt>
IN: <tt>distance_combine(CombineFunction cmb)</tt>
<blockquote>
This function is used to combine distances to compute the distance
of a path. The <tt>CombineFunction</tt> type must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary
href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary
Function</a>. The first argument type of the binary function must
match the value type of the <tt>DistanceMap</tt> property map and
the second argument type must match the value type of the
@@ -179,27 +194,33 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
type as the distance value type.<br>
<b>Default:</b> <tt>std::plus&lt;D&gt;</tt> with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt>
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_inf(D inf)</tt>
IN: <tt>distance_inf(D inf)</tt>
<blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_zero(D zero)</tt>
IN: <tt>distance_zero(D zero)</tt>
<blockquote>
The <tt>zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values
and the <tt>combine</tt> function object.
The type \code{D} is the value type of the \code{DistanceMap}
<b>Default:</b> <tt>D()</tt>
<b>Default:</b> <tt>D()</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote>
This is used during the execution of the algorithm to mark the
vertices. The vertices start out white and become gray when they are
@@ -207,26 +228,35 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
from the queue. At the end of the algorithm, vertices reachable from
the source vertex will have been colored black. All other vertices
will still be white. The type <tt>ColorMap</tt> must be a model of
<a href="../../property_map/ReadWritePropertyMap.html">Read/Write
<a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. A vertex descriptor must be usable as the key type
of the map, and the value type of the map must be a model of
<a href="./ColorValue.html">Color Value</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
using the <tt>i_map</tt> for the index map.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt>
OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote>
Use this to specify actions that you would like to happen
during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a
href="#1">[1]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a
href="DijkstraVisitor.html#python"><tt>DijkstraVisitor</tt></a> type
of the graph.
</blockquote>
@@ -242,21 +272,21 @@ The time complexity is <i>O(V + E)</i>.
is invoked on each vertex in the graph before the start of the
algorithm.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is added to set <i>S</i>.
is invoked on a vertex as it is added to set <i>S</i>.
At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>.
been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge
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.
@@ -276,7 +306,7 @@ algorithm.
<H3>Notes</H3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -287,10 +317,10 @@ algorithm.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
Binary file not shown.
+98 -86
View File
@@ -1,48 +1,44 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Depth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:depth-first-search"></A>
<H1><A NAME="sec:depth-first-search"></A><img src="figs/python.gif" alt="(Python)"/>
<TT>depth_first_search</TT>
</H1>
<P>
<PRE>
<i>// named parameter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class class P, class T, class R&gt;
void depth_first_search(VertexListGraph&amp; G,
template &lt;class Graph, class class P, class T, class R&gt;
void depth_first_search(Graph&amp; G,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_search(const VertexListGraph&amp; g, DFSVisitor vis, ColorMap color)
template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color)
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_search(const VertexListGraph&amp; g, DFSVisitor vis, ColorMap color,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor start)
template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start)
</PRE>
<p>
The <tt>depth_first_search()</tt> function performs a depth-first
traversal of the vertices in a directed or undirected graph. When
traversal of the vertices in a directed graph. When
possible, a depth-first traversal chooses a vertex adjacent to the
current vertex to visit next. If all adjacent vertices have already
been discovered, or there are no adjacent vertices, then the algorithm
@@ -70,7 +66,7 @@ The <tt>depth_first_search()</tt> function invokes user-defined
actions at certain event-points within the algorithm. This provides a
mechanism for adapting the generic DFS algorithm to the many
situations in which it can be used. In the pseudo-code below, the
event points for DFS are indicated in by the triangles and labels on
event points for DFS are the labels on
the right. The user-defined actions must be provided in the form of a
visitor object, that is, an object whose type meets the requirements
for a <a href="./DFSVisitor.html">DFS Visitor</a>. In the pseudo-code
@@ -88,64 +84,67 @@ be used to do this.
<td valign="top">
<pre>
DFS(<i>G</i>)
<b>for</b> each vertex <i>u in V</i>
<b>for</b> each vertex <i>u in V</i>
<i>color[u] :=</i> WHITE
<i>p[u] = u</i>
<i>p[u] = u</i>
<b>end for</b>
<i>time := 0</i>
<b>if</b> there is a starting vertex <i>s</i>
<b>call</b> DFS-VISIT(<i>G</i>, <i>s</i>)
<b>for</b> each vertex <i>u in V</i>
<b>for</b> each vertex <i>u in V</i>
<b>if</b> <i>color[u] =</i> WHITE
<b>call</b> DFS-VISIT(<i>G</i>, <i>u</i>)
<b>end for</b>
return (<i>p</i>,<i>d_time</i>,<i>f_time</i>)
DFS-VISIT(<i>G</i>, <i>u</i>)
return (<i>p</i>,<i>d_time</i>,<i>f_time</i>) <br>
DFS-VISIT(<i>G</i>, <i>u</i>)
<i>color[u] :=</i> GRAY
<i>d_time[u] := time := time + 1</i>
<b>for</b> each <i>v in Adj[u]</i>
<i>d_time[u] := time := time + 1</i>
<b>for</b> each <i>v in Adj[u]</i>
<b>if</b> (<i>color[v] =</i> WHITE)
<i>p[v] = u</i>
<i>p[v] = u</i>
<b>call</b> DFS-VISIT(<i>G</i>, <i>v</i>)
<b>else if</b> (<i>color[v] =</i> GRAY)
<b>else if</b> (<i>color[v] =</i> GRAY)
<i>...</i>
<b>else if</b> (<i>color[v] =</i> BLACK)
<b>else if</b> (<i>color[v] =</i> BLACK)
<i>...</i>
<i>...</i>
<b>end for</b>
<i>color[u] :=</i> BLACK
<i>f_time[u] := time := time + 1</i>
<i>f_time[u] := time := time + 1</i>
<pre>
</td>
<td valign="top">
<pre>
-
-
initialize vertex <i>u</i>
-
-
-
-
start vertex <i>s</i>
start vertex <i>u</i>
discover vertex <i>u</i>
-
-
start vertex <i>u</i>
-
-
-
-
discover vertex <i>u</i>
-
examine edge <i>(u,v)</i>
-
<i>(u,v)</i> is a tree edge
<i>(u,v)</i> is a back edge
<i>(u,v)</i> is a cross or forward edge
-
-
<i>(u,v)</i> is a back edge
-
<i>(u,v)</i> is a cross or forward edge
-
finish edge <i>(u,v)</i>
-
finish vertex <i>u</i>
-
</pre>
</td>
</tr>
@@ -160,10 +159,13 @@ finish vertex <i>u</i>
<h3>Parameters</h3>
IN: <tt>VertexListGraph&amp; g</tt>
IN: <tt>Graph&amp; g</tt>
<blockquote>
A directed or undirected graph. The graph type must
be a model of <a href="./VertexListGraph.html">Vertex List Graph</a>.
A directed graph. The graph type must
be a model of <a href="./IncidenceGraph.html">Incidence Graph</a>
and <a href="./VertexListGraph.html">Vertex List Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
@@ -175,23 +177,30 @@ IN: <tt>visitor(DFSVisitor vis)</tt>
event-points specified by the <a href="./DFSVisitor.html">DFS
Visitor</a> concept. The visitor object is passed by value <a
href="#1">[1]</a>. <br> <b>Default:</b>
<tt>dfs_visitor&lt;null_visitor&gt;</tt>
<tt>dfs_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a href="DFSVisitor.html#python"><tt>DFSVisitor</tt></a> type of
the graph.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap color)</tt>
<blockquote>
This is used by the algorithm to keep track of its progress through
the graph. The type <tt>ColorMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> and its key type must be the graph's vertex
descriptor type and the value type of the color map must model
<a href="./ColorValue.html">ColorValue</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
</tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of <tt>default_color_type</tt> of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.
map.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
IN: <tt>root_vertex(typename
@@ -200,7 +209,7 @@ graph_traits&lt;VertexListGraph&gt;::vertex_descriptor start)</tt>
This specifies the vertex that the depth-first search should
originate from. The type is the type of a vertex descriptor for the
given graph.<br>
<b>Default:</b> <tt>*vertices(g).first</tt>
<b>Default:</b> <tt>*vertices(g).first</tt><br>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
@@ -209,12 +218,18 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
num_vertices(g))</tt>. This parameter is only necessary when the
default color property map is used. The type <tt>VertexIndexMap</tt>
must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The value type of the map must be an integer type. The
vertex descriptor type of the graph needs to be usable as the key
type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</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>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>
<P>
@@ -237,31 +252,27 @@ The time complexity is <i>O(E + V)</i>.
<li><b><tt>vis.start_vertex(s, g)</tt></b> is invoked on the source
vertex once before the start of the search.
<li><b><tt>vis.discover_vertex(u, g)</tt></b> is invoked when a vertex
is encountered for the first time.
<li><b><tt>vis.examine_edge(e, g)</tt></b> is invoked on every out-edge
of each vertex after it is discovered.
<li><b><tt>vis.tree_edge(e, g)</tt></b> is invoked on each edge as it
becomes a member of the edges that form the search tree. If you
wish to record predecessors, do so at this event point.
<li><b><tt>vis.back_edge(e, g)</tt></b> is invoked on the back edges in
the graph. For an undirected graph there is some ambiguity
between tree edges and back edges since the edge <i>(u,v)</i>
and <i>(v,u)</i> are the same edge, but both the <tt>tree_edge()</tt>
and <tt>back_edge()</tt> functions will be invoked. One way to
resolve this ambiguity is to record the tree edges, and then
disregard the back-edges that are already marked as tree edges.
An easy way to record tree edges is to record predecessors at the
<tt>tree_edge</tt> event point.
the graph.
<li><b><tt>vis.forward_or_cross_edge(e, g)</tt></b> is invoked on
forward or cross edges in the graph. In an undirected graph this
method is never called.
<li><b><tt>vis.finish_edge(e, g)</tt></b> is invoked on the non-tree edges in
the graph as well as on each tree edge after its target vertex is finished.
<li><b><tt>vis.finish_vertex(u, g)</tt></b> is invoked on a vertex after
all of its out edges have been added to the search tree and all of
the adjacent vertices have been discovered (but before their
@@ -280,10 +291,11 @@ The example in <a href="../example/dfs-example.cpp">
<h3>See Also</h3>
<a href="./depth_first_visit.html"><tt>depth_first_visit</tt></a>
<a href="./undirected_dfs.html"><tt>undirected_dfs</tt></a>
<h3>Notes</h3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -294,15 +306,15 @@ The example in <a href="../example/dfs-example.cpp">
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+54 -25
View File
@@ -1,35 +1,38 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Depth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H2><A NAME="sec:dfs"></A>
<img src="figs/python.gif" alt="(Python)"/>
<TT>depth_first_visit</TT>
</H2>
<P>
<PRE>
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class <a href="#ColorMap">ColorMap</a>&gt;
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap&gt;
void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color)
template &lt;class <a href="./IncidenceGraph.html">IncidenceGraph</a>, class <a href="./DFSVisitor.html">DFSVisitor</a>, class ColorMap,
class TerminatorFunc&gt;
void depth_first_visit(IncidenceGraph& g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color, TerminatorFunc func = TerminatorFunc())
</PRE>
<P>
@@ -38,7 +41,7 @@ component as the source vertex <tt>s</tt>, using the <a
href="./graph_theory_review.html#sec:dfs-algorithm">depth-first
pattern</a>. The main purpose of the function is for the
implementation of <TT>depth_first_search()</TT> though sometimes it is
useful on its own.
useful on its own.
<p>
The <tt>DFSVisitor</tt> supplied by the user determines what
@@ -48,6 +51,11 @@ actions are taken at each event-point within the algorithm.
The <tt>ColorMap</tt> is used by the algorithm to keep track
of which vertices have been visited.
<p>The second variant can be used, for example, to find all marked vertices
reachable from a start vertex by a path which does not contain any another
marked vertices.
<P>
<h3>Where Defined:</h3>
@@ -60,12 +68,16 @@ of which vertices have been visited.
IN <tt>IncidenceGraph&amp; g</tt>
<blockquote>
A directed or undirected graph. The graph's type must be a model of
<a href="./IncidenceGraph.html">Incidence Graph</a>.
<a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The source vertex from which to start the search.
The source vertex from which to start the search.<br>
<b>Python</b>: The parameter is named <tt>root_vertex</tt>.
</blockquote>
IN: <tt>DFSVisitor visitor</tt>
@@ -73,19 +85,36 @@ IN: <tt>DFSVisitor visitor</tt>
A visitor object that is invoked inside the algorithm at the
event-points specified by the <a href="./DFSVisitor.html">DFS
Visitor</a> concept. The visitor object is passed by value <a
href="#1">[1]</a>.
href="#1">[1]</a>.<br>
<b>Python</b>: The parameter should be an object that derives from
the <a href="DFSVisitor.html#python"><tt>DFSVisitor</tt></a> type of
the graph.
</blockquote>
UTIL: <tt>ColorMap color</tt>
<blockquote>
This is used by the algorithm to keep track of its progress through
the graph. The type <tt>ColorMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> and its key type must be the graph's vertex
descriptor type and the value type of the color map map must model
<a href="./ColorValue.html">Color Value</a>.
<a href="./ColorValue.html">Color Value</a>.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
IN: <tt>TerminatorFunc func</tt>
<blockquote>
A function object callable with two parameters - the descriptor of
vertex and the graph instance - and returning bool. The call is made
immediately after call to 'discover_vertex' visitor
event. If <tt>true</tt> is returned, the out edges of the vertex are
not examined, as if they don't exist.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
<P>
<h3>Complexity</h3>
@@ -95,7 +124,7 @@ Time complexity is <i>O(E)</i>.
<h3>Notes</h3>
<p><a name="1">[1]</a>
<p><a name="1">[1]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -107,9 +136,9 @@ Time complexity is <i>O(E)</i>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -20
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: dfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ dfs_visitor&lt;EventVisitorList&gt;
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
href="./EventVisitor.html">EventVisitor</a>s (constructed using
<tt>std::pair</tt>) into a <a href="./DFSVisitor.html">DFSVisitor</a>.
@@ -67,7 +63,7 @@ with <tt>std::pair</tt>.
This class implements all of the member functions required by <a
href="./DFSVisitor.html">DFSVisitor</a>. In each function the
appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
<h3>Non-Member Functions</h3>
@@ -101,15 +97,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+160 -101
View File
@@ -1,50 +1,59 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Jeremy Siek makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Dijkstra's Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<H1><A NAME="sec:dijkstra"></A>
<H1><A NAME="sec:dijkstra"></A><img src="figs/python.gif" alt="(Python)"/>
<TT>dijkstra_shortest_paths</TT>
</H1>
<P>
<PRE>
<i>// named paramter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class P, class T, class R&gt;
<i>// named parameter version</i>
template &lt;typename Graph, typename P, typename T, typename R&gt;
void
dijkstra_shortest_paths(VertexListGraph&amp; g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
dijkstra_shortest_paths(Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
class PredecessorMap, class DistanceMap,
class WeightMap, class IndexMap, class <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Compare</a>, class <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">Combine</a>,
class DistInf, class DistZero&gt;
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">CombineFunction</a>,
typename DistInf, typename DistZero, typename ColorMap = <i>default</i>&gt;
void dijkstra_shortest_paths
(const VertexListGraph&amp; g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
(const Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
VertexIndexMap index_map,
CompareFunction compare, CombineFunction combine, DistInf inf, DistZero zero,
DijkstraVisitor vis, ColorMap color = <i>default</i>)
<i>// version that does not initialize the property maps (except for the default color map)</i>
template &lt;class Graph, class DijkstraVisitor,
class PredecessorMap, class DistanceMap,
class WeightMap, class IndexMap, class Compare, class Combine,
class DistZero, class ColorMap&gt;
void
dijkstra_shortest_paths_no_init
(const Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
IndexMap index_map,
Compare compare, Combine combine, DistInf inf, DistZero zero,
DijkstraVisitor vis)
Compare compare, Combine combine, DistZero zero,
DijkstraVisitor vis, ColorMap color = <i>default</i>);
</PRE>
<P>
@@ -56,7 +65,7 @@ algorithm for the case when some edge weights are negative. Use
breadth-first search instead of Dijkstra's algorithm when all edge
weights are equal to one. For the definition of the shortest-path
problem see Section <A
HREF="graph_theory_review.html#sec:shortest-path-algorithms">Shortest-Paths
HREF="graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A> for some background to the shortest-path problem.
</P>
@@ -70,8 +79,8 @@ record the shortest paths tree in a predecessor map: for each vertex
<i>u in V</i>, <i>p[u]</i> will be the predecessor of <i>u</i> in
the shortest paths tree (unless <i>p[u] = u</i>, in which case <i>u</i> is
either the source or a vertex unreachable from the source). In
addition to these two options, the user can provide there own
custom-made visitor that can takes actions during any of the
addition to these two options, the user can provide their own
custom-made visitor that takes actions during any of the
algorithm's event points.</P>
<P>
@@ -96,7 +105,7 @@ track of which set each vertex is in. Vertices colored black are in
<i>S</i>. Vertices colored white or gray are in <i>V-S</i>. White vertices have
not yet been discovered and gray vertices are in the priority queue.
By default, the algorithm will allocate an array to store a color
marker for each vertex in the graph. You can provide you own storage
marker for each vertex in the graph. You can provide your own storage
and access for colors with the <tt>color_map()</tt> parameter.
</P>
<p>
@@ -113,13 +122,13 @@ indicated by the labels on the right.
<td valign="top">
<pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>u in V</i>
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<b>for</b> each vertex <i>u in V</i> <b>(This loop is not run in dijkstra_shortest_paths_no_init)</b>
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<i>color[u] :=</i> WHITE
<b>end for</b>
<i>color[s] := </i>GRAY
<i>d[s] := 0</i>
<i>color[s] := </i>GRAY
<i>d[s] := 0</i>
INSERT(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> EXTRACT-MIN(<i>Q</i>)
@@ -127,10 +136,10 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i>
<b>if</b> (<i>color[v] =</i> WHITE)
<i>p[v] := u</i>
<b>if</b> (<i>color[v] =</i> WHITE)
<i>color[v] :=</i> GRAY
INSERT(<i>Q</i>, <i>v</i>)
INSERT(<i>Q</i>, <i>v</i>)
<b>else if</b> (<i>color[v] =</i> GRAY)
DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>else</b>
@@ -179,101 +188,132 @@ finish vertex <i>u</i>
<h3>Parameters</h3>
IN: <tt>const VertexListGraph&amp; g</tt>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied.
The type <tt>VertexListGraph</tt> must be a model of \concept{VertexListGraph}.
The type <tt>Graph</tt> must be a model of
<a href="./VertexListGraph.html">Vertex List Graph</a>
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
IN: <tt>vertex_descriptor s</tt>
IN: <tt>vertex_descriptor s</tt>
<blockquote>
The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.
and the shortest paths tree will be rooted at this vertex.<br>
<b>Python</b>: The parameter is named <tt>root_vertex</tt>.
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap w_map)</tt>
IN: <tt>weight_map(WeightMap w_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph.
The weight or ``length'' of each edge in the graph. The weights
must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for the map must be
<i>Addable</i> with the value type of the distance map.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt>
map. The value type for this map must be
the same as the value type of the distance map.<br>
<b>Default:</b> <tt>get(edge_weight, g)</tt><br>
<b>Python</b>: Must be an <tt>edge_double_map</tt> for the graph.<br>
<b>Python default</b>: <tt>graph.get_edge_double_map("weight")</tt>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(g))</tt>. This is necessary for efficient updates of the
heap data structure when an edge is relaxed. The type
heap data structure&nbsp;[<A
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<br>
<b>Default:</b> <tt>get(vertex_index, g)</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>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>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
for all <i>u in V</i> are in the minimum spanning tree. If <i>p[u] =
The predecessor map records the edges in the shortest path tree, the tree computed
by the traversal of the graph. Upon completion of the algorithm, the edges
<i>(p[u],u)</i> for all <i>u in V</i> are in the tree. The shortest path
from vertex <i>s</i> to each vertex <i>v</i> in the graph consists of the
vertices <i>v</i>, <i>p[v]</i>, <i>p[p[v]]</i>, and so on until <i>s</i> is
reached, in reverse order. The
tree is not guaranteed to be a minimum spanning tree. If <i>p[u] =
u</i> then <i>u</i> is either the source vertex or a vertex that is
not reachable from the source. The <tt>PredecessorMap</tt> type
must be a <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
Property Map</a> which key and vertex types the same as the vertex
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> whose key and value types are the same as the vertex
descriptor type of the graph.<br>
<b>Default:</b> <tt>dummy_property_map</tt>
<b>Default:</b> <tt>dummy_property_map</tt><br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>s</tt> to each
vertex in the graph <tt>g</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/ReadWritePropertyMap.html">Read/Write
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map.
be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</tt> formed with the <tt>combine</tt>
href="./Monoid.html">Monoid</a> formed with the <tt>combine</tt>
function object and the <tt>zero</tt> object for the identity
element. Also the distance value type must have a <a
href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html">
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
StrictWeakOrdering</a> provided by the <tt>compare</tt> function
object.<br>
<b>Default:</b> <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
<tt>num_vertices(g)</tt> and using the <tt>i_map</tt> for the index
map.
map.<br>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
</blockquote>
IN: <tt>distance_compare(CompareFunction cmp)</tt>
IN: <tt>distance_compare(CompareFunction cmp)</tt>
<blockquote>
This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>CompareFunction</tt> type
must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryPredicate.html">Binary
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
Predicate</a> and have argument types that match the value type of
the <tt>DistanceMap</tt> property map.<br>
<b>Default:</b>
<tt>std::less&lt;D&gt;</tt> with <tt>D=typename
property_traits&lt;DistanceMap&gt;::value_type</tt>
property_traits&lt;DistanceMap&gt;::value_type</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_combine(CombineFunction cmb)</tt>
IN: <tt>distance_combine(CombineFunction cmb)</tt>
<blockquote>
This function is used to combine distances to compute the distance
of a path. The <tt>CombineFunction</tt> type must be a model of <a
href="http://www.sgi.com/tech/stl/BinaryFunction.html">Binary
href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary
Function</a>. The first argument type of the binary function must
match the value type of the <tt>DistanceMap</tt> property map and
the second argument type must match the value type of the
@@ -281,27 +321,36 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
type as the distance value type.<br>
<b>Default:</b> <tt>std::plus&lt;D&gt;</tt> with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt>
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_inf(D inf)</tt>
IN: <tt>distance_inf(D inf)</tt>
<blockquote>
The <tt>inf</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>compare(d, inf) == true</tt> for any <tt>d != inf</tt>.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt>
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>. Edges
are assumed to have a weight less than (using <tt>distance_compare</tt> for
comparison) this value.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
IN: <tt>distance_zero(D zero)</tt>
IN: <tt>distance_zero(D zero)</tt>
<blockquote>
The <tt>zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values
and the <tt>combine</tt> function object.
The type \code{D} is the value type of the \code{DistanceMap}
<b>Default:</b> <tt>D()</tt>
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
<b>Default:</b> <tt>D()</tt>with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<blockquote>
This is used during the execution of the algorithm to mark the
vertices. The vertices start out white and become gray when they are
@@ -309,34 +358,42 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
from the queue. At the end of the algorithm, vertices reachable from
the source vertex will have been colored black. All other vertices
will still be white. The type <tt>ColorMap</tt> must be a model of
<a href="../../property_map/ReadWritePropertyMap.html">Read/Write
<a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. A vertex descriptor must be usable as the key type
of the map, and the value type of the map must be a model of
<a href="./ColorValue.html">Color Value</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
using the <tt>i_map</tt> for the index map.<br>
<b>Python</b>: The color map must be a <tt>vertex_color_map</tt> for
the graph.
</blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt>
OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote>
Use this to specify actions that you would like to happen
during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a
href="#2">[2]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
<b>Python</b>: The parameter should be an object that derives from
the <a
href="DijkstraVisitor.html#python"><tt>DijkstraVisitor</tt></a> type
of the graph.
</blockquote>
<H3>Complexity</H3>
<P>
The time complexity is <i>O((V + E) log V)</i>, or just <i>O(E log V)</i>
if all vertices are reachable from the source.
The time complexity is <i>O(V log V + E)</i>.
<h3>Visitor Event Points</h3>
@@ -347,22 +404,22 @@ if all vertices are reachable from the source.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is removed from the priority queue
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>.
been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge
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).
@@ -378,6 +435,8 @@ 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>Notes</H3>
<a name="1">[1]</a>
@@ -386,7 +445,7 @@ S</i> vertices in the priority queue at once, but instead only those
vertices in <i>V - S</i> that are discovered and therefore have a
distance less than infinity.
<p><a name="2">[2]</a>
<p><a name="2">[2]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
@@ -397,9 +456,9 @@ distance less than infinity.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
@@ -0,0 +1,394 @@
<HTML>
<!--
Copyright (c) Michael Hansen 2009
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: Dijkstra's Shortest Paths (No Color Map)</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:dijkstra"></A>
<TT>dijkstra_shortest_paths_no_color_map</TT>
</H1>
<P>
<PRE>
<i>// named parameter version</i>
template &lt;typename Graph, typename Param, typename Tag, typename Rest&gt;
void dijkstra_shortest_paths_no_color_map
(const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
const bgl_named_params<Param,Tag,Rest>& params);
<i>// non-named parameter version</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
typename DistanceInfinity, typename DistanceZero&gt;
void dijkstra_shortest_paths_no_color_map
(const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
VertexIndexMap index_map,
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
DistanceInfinity distance_infinity, DistanceZero distance_zero);
<i>// version that does not initialize the property maps</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.boost.org/sgi/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.boost.org/sgi/stl/BinaryFunction.html">DistanceWeightCombine</a>,
typename DistanceInfinity, typename DistanceZero&gt;
void dijkstra_shortest_paths_no_color_map_no_init
(const Graph&amp; graph,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start_vertex,
PredecessorMap predecessor_map, DistanceMap distance_map, WeightMap weight_map,
VertexIndexMap index_map,
DistanceCompare distance_compare, DistanceWeightCombine distance_weight_combine,
DistanceInfinity distance_infinity, DistanceZero distance_zero);
</PRE>
<P>
This algorithm&nbsp;[<A HREF="bibliography.html#dijkstra59">10</A>,<A
HREF="bibliography.html#clr90">8</A>] solves the single-source
shortest-paths problem on a weighted, directed or undirected graph for
the case where all edge weights are nonnegative. Use the Bellman-Ford
algorithm for the case when some edge weights are negative. Use
breadth-first search instead of Dijkstra's algorithm when all edge
weights are equal to one. For the definition of the shortest-path
problem see Section <A
HREF="graph_theory_review.html#sec:shortest-paths-algorithms">Shortest-Paths
Algorithms</A> for some background to the shortest-path problem.
</P>
<P>
<tt>dijkstra_shortest_paths_no_color_map</tt> differs from the original <tt>dijkstra_shortest_paths</tt> algorithm by not using a color map to identify vertices as discovered or undiscovered. Instead, this is done with the distance map: a vertex <i>u</i> such that <i>distance_compare(distance_map[u], distance_infinity) == false</i> is considered to be undiscovered. Note that this means that edges with infinite weight will not work correctly in this algorithm.
</P>
<P>
There are two main options for obtaining output from the
<tt>dijkstra_shortest_paths_no_color_map()</tt> function. If you provide a
distance property map through the <tt>distance_map()</tt> parameter
then the shortest distance from the start vertex to every other
vertex in the graph will be recorded in the distance map. Also you can
record the shortest paths tree in a predecessor map: for each vertex
<i>u in V</i>, <i>p[u]</i> will be the predecessor of <i>u</i> in
the shortest paths tree (unless <i>p[u] = u</i>, in which case <i>u</i> is
either the source or a vertex unreachable from the source). In
addition to these two options, the user can provide their own
custom-made visitor that takes actions during any of the
algorithm's event points <a href="#4">[4]</a>.</P>
<P>
Dijkstra's algorithm finds all the shortest paths from the source
vertex to every other vertex by iteratively &quot;growing&quot; the set of
vertices <i>S</i> to which it knows the shortest path. At each step of
the algorithm, the next vertex added to <i>S</i> is determined by a
priority queue. The queue contains the vertices in <i>V - S</i><a
href="#1">[1]</a> prioritized by their distance label, which is the
length of the shortest path seen so far for each vertex. The vertex
<i>u</i> at the top of the priority queue is then added to <i>S</i>,
and each of its out-edges is relaxed: if the distance to <i>u</i> plus
the weight of the out-edge <i>(u,v)</i> is less than the distance
label for <i>v</i> then the estimated distance for vertex <i>v</i> is
reduced. The algorithm then loops back, processing the next vertex at
the top of the priority queue. The algorithm finishes when the
priority queue is empty.
</P>
<p>
The following is the pseudo-code for Dijkstra's single-source shortest
paths algorithm. <i>w</i> is the edge weight, <i>d</i> is the distance label,
and <i>p</i> is the predecessor of each vertex which is used to encode
the shortest paths tree. <i>Q</i> is a priority queue that supports the
DECREASE-KEY operation. The visitor event points for the algorithm are
indicated by the labels on the right.
</p>
<table>
<tr>
<td valign="top">
<pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<i>d[s] := 0</i>
INSERT(<i>Q</i>, <i>s</i>)
<b>while</b> (<i>Q != &Oslash;</i>)
<i>u :=</i> EXTRACT-MIN(<i>Q</i>)
<b>for</b> each vertex <i>v in Adj[u]</i>
<b>if</b> (<i>w(u,v) + d[u] < d[v]</i>)
<i>d[v] := w(u,v) + d[u]</i>
<i>p[v] := u</i>
<b>if</b> (<i>d[v]</i> was originally infinity)
INSERT(<i>Q</i>, <i>v</i>)
<b>else</b>
DECREASE-KEY(<i>Q</i>, <i>v</i>)
<b>else</b>
...
<b>end for</b>
<b>end while</b>
return (<i>d</i>, <i>p</i>)
</pre>
</td>
<td valign="top">
<pre>
discover vertex <i>s</i>
examine vertex <i>u</i>
examine edge <i>(u,v)</i>
edge <i>(u,v)</i> relaxed
discover vertex <i>v</i>
edge <i>(u,v)</i> not relaxed
finish vertex <i>u</i>
</pre>
</td>
</tr>
</table>
<h3>Where Defined</h3>
<a href="../../../boost/graph/dijkstra_shortest_paths_no_color_map.hpp"><tt>boost/graph/dijkstra_shortest_paths_no_color_map.hpp</tt></a>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; graph</tt>
<blockquote>
The graph object on which the algorithm will be applied.
The type <tt>Graph</tt> must be a model of
<a href="./VertexListGraph.html">Vertex List Graph</a>
and <a href="./IncidenceGraph.html">Incidence Graph</a>.<br>
</blockquote>
IN: <tt>vertex_descriptor start_vertex</tt>
<blockquote>
The source vertex. All distance will be calculated from this vertex,
and the shortest paths tree will be rooted at this vertex.<br>
</blockquote>
<h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap weight_map)</tt>
<blockquote>
The weight or ``length'' of each edge in the graph. The weights
must all be non-negative and non-infinite <a href="#3">[3]</a>. The algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></a>
exception is one of the edges is negative.
The type <tt>WeightMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The edge descriptor type of
the graph needs to be usable as the key type for the weight
map. The value type for this map must be
the same as the value type of the distance map.<br>
<b>Default:</b> <tt>get(edge_weight, graph)</tt><br>
</blockquote>
IN: <tt>index_map(VertexIndexMap index_map)</tt>
<blockquote>
This maps each vertex to an integer in the range <tt>[0,
num_vertices(graph))</tt>. This is necessary for efficient updates of the
heap data structure&nbsp;[<A
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
The type
<tt>VertexIndexMap</tt> must be a model of
<a href="../../property_map/doc/ReadablePropertyMap.html">Readable Property Map</a>. The value type of the map must be an
integer type. The vertex descriptor type of the graph needs to be
usable as the key type of the map.<br>
<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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt>
<blockquote>
The predecessor map records the edges in the minimum spanning
tree. Upon completion of the algorithm, the edges <i>(p[u],u)</i>
for all <i>u in V</i> are in the minimum spanning tree. If <i>p[u] =
u</i> then <i>u</i> is either the source vertex or a vertex that is
not reachable from the source. The <tt>PredecessorMap</tt> type
must be a <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a> whose key and value types are the same as the vertex
descriptor type of the graph.<br>
<b>Default:</b> <tt>dummy_property_map</tt><br>
<b>Python</b>: Must be a <tt>vertex_vertex_map</tt> for the graph.<br>
</blockquote>
UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
<blockquote>
The shortest path weight from the source vertex <tt>start_vertex</tt> to each
vertex in the graph <tt>graph</tt> is recorded in this property map. The
shortest path weight is the sum of the edge weights along the
shortest path. The type <tt>DistanceMap</tt> must be a model of <a
href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
Property Map</a>. The vertex descriptor type of the graph needs to
be usable as the key type of the distance map.
The value type of the distance map is the element type of a <a
href="./Monoid.html">Monoid</a> formed with the <tt>distance_weight_combine</tt>
function object and the <tt>distance_zero</tt> object for the identity
element. Also the distance value type must have a <a
href="http://www.boost.org/sgi/stl/StrictWeakOrdering.html">
StrictWeakOrdering</a> provided by the <tt>distance_compare</tt> function
object.<br>
<b>Default:</b> <a
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a
<tt>std::vector</tt> of the <tt>WeightMap</tt>'s value type of size
<tt>num_vertices(graph)</tt> and using the <tt>index_map</tt> for the index
map.<br>
</blockquote>
IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
<blockquote>
This function is use to compare distances to determine which vertex
is closer to the source vertex. The <tt>DistanceCompareFunction</tt> type
must be a model of <a
href="http://www.boost.org/sgi/stl/BinaryPredicate.html">Binary
Predicate</a> and have argument types that match the value type of
the <tt>DistanceMap</tt> property map.<br>
<b>Default:</b>
<tt>std::less&lt;D&gt;</tt> with <tt>D=typename
property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote>
IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
<blockquote>
This function is used to combine distances to compute the distance
of a path. The <tt>DistanceWeightCombineFunction</tt> type must be a model of <a
href="http://www.boost.org/sgi/stl/BinaryFunction.html">Binary
Function</a>. The first argument type of the binary function must
match the value type of the <tt>DistanceMap</tt> property map and
the second argument type must match the value type of the
<tt>WeightMap</tt> property map. The result type must be the same
type as the distance value type.<br>
<b>Default:</b> <tt>boost::closed_plus&lt;D&gt;</tt> with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote>
IN: <tt>distance_inf(D distance_infinity)</tt>
<blockquote>
The <tt>distance_infinity</tt> object must be the greatest value of any <tt>D</tt> object.
That is, <tt>distance_compare(d, distance_infinity) == true</tt> for any <tt>d != distance_infinity</tt>.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>. All edges
are assumed to have weight less than (by <tt>distance_compare</tt>) this
value.<br>
<b>Default:</b> <tt>std::numeric_limits&lt;D&gt;::max()</tt><br>
</blockquote>
IN: <tt>distance_zero(D distance_zero)</tt>
<blockquote>
The <tt>distance_zero</tt> value must be the identity element for the
<a href="./Monoid.html">Monoid</a> formed by the distance values
and the <tt>distance_weight_combine</tt> function object.
The type <tt>D</tt> is the value type of the <tt>DistanceMap</tt>.<br>
<b>Default:</b> <tt>D()</tt>with
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote>
OUT: <tt>visitor(DijkstraVisitor v)</tt>
<blockquote>
Use this to specify actions that you would like to happen
during certain event points within the algorithm.
The type <tt>DijkstraVisitor</tt> must be a model of the
<a href="./DijkstraVisitor.html">Dijkstra Visitor</a> concept.
The visitor object is passed by value <a
href="#2">[2]</a>.<br>
<b>Default:</b> <tt>dijkstra_visitor&lt;null_visitor&gt;</tt><br>
</blockquote>
<H3>Complexity</H3>
<P>
The time complexity is <i>O(V log V + E)</i>.
<h3>Visitor Event Points</h3>
<ul>
<li><b><tt>vis.initialize_vertex(u, g)</tt></b>
is invoked on each vertex in the graph before the start of the
algorithm.
<li><b><tt>vis.examine_vertex(u, g)</tt></b>
is invoked on a vertex as it is removed from the priority queue
and added to set <i>S</i>. At this point we know that <i>(p[u],u)</i>
is a shortest-paths tree edge so
<i>d[u] = delta(s,u) = d[p[u]] + w(p[u],u)</i>. Also, the distances
of the examined vertices is monotonically increasing
<i>d[u<sub>1</sub>] <= d[u<sub>2</sub>] <= d[u<sub>n</sub>]</i>.
<li><b><tt>vis.examine_edge(e, g)</tt></b>
is invoked on each out-edge of a vertex immediately after it has
been added to set <i>S</i>.
<li><b><tt>vis.edge_relaxed(e, g)</tt></b>
is invoked on edge <i>(u,v)</i> if <i>d[u] + w(u,v) < d[v]</i>.
The edge <i>(u,v)</i> that participated in the last
relaxation for vertex <i>v</i> is an edge in the shortest paths tree.
<li><b><tt>vis.discover_vertex(v, g)</tt></b>
is invoked on vertex <i>v</i> when the edge
<i>(u,v)</i> is examined and <i>v</i> has not yet been discovered (i.e. its distance was infinity before relaxation was attempted on the edge). 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).
<li><b><tt>vis.finish_vertex(u, g)</tt></b>
is invoked on a vertex after all of its out edges have
been examined.
</ul>
<H3>Example</H3>
<P>
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>Notes</H3>
<p>Based on the documentation for <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a>.
<p><a name="1">[1]</a>
The algorithm used here saves a little space by not putting all <i>V -
S</i> vertices in the priority queue at once, but instead only those
vertices in <i>V - S</i> that are discovered and therefore have a
distance less than infinity.
<p><a name="2">[2]</a>
Since the visitor parameter is passed by value, if your visitor
contains state then any changes to the state during the algorithm
will be made to a copy of the visitor object, not the visitor object
passed in. Therefore you may want the visitor to hold this state by
pointer or reference.
<p><a name="3">[3]</a>
The algorithm will not work correctly if any of the edge weights are equal to infinity since the infinite distance value is used to determine if a vertex has been discovered.
<p><a name="4">[4]</a>
Calls to the visitor events occur in the same order as <tt>dijkstra_shortest_paths</tt> (i.e. <i>discover_vertex(u)</i> will always be called after <i>examine_vertex(u)</i> for an undiscovered vertex <i>u</i>). However, the vertices of the graph given to <i>dijkstra_shortest_paths_no_color_map</i> will <b>not</b> necessarily be visited in the same order as <i>dijkstra_shortest_paths</i>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2009</TD><TD>
Trustees of Indiana University</TD></TR></TABLE>
</BODY>
</HTML>
+17 -21
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: dijkstra_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -26,7 +22,7 @@ dijkstra_visitor&lt;EventVisitorList&gt;
</H1>
This class is an adapter that converts a list of <a
href="./EventVisitor.html">EventVisitor</a>'s (constructed using
href="./EventVisitor.html">EventVisitor</a>s (constructed using
<tt>std::pair</tt>) into a <a
href="./DijkstraVisitor.html">DijkstraVisitor</a>.
@@ -41,7 +37,7 @@ by Dijkstra's algorithm.
<pre>
boost::dijkstra_shortest_paths
(G, vertex(a, G),
(G, vertex(a, G),
distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])).
predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])).
visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
@@ -81,7 +77,7 @@ with <tt>std::pair</tt>.
This class implements all of the member functions required by <a
href="./DijkstraVisitor.html">DijkstraVisitor</a>. In each
function the appropriate event is dispatched to the <a
href="./EventVisitor.html">EventVisitor</a>'s in the EventVisitorList.
href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
<h3>Non-Member Functions</h3>
@@ -115,15 +111,15 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+96
View File
@@ -0,0 +1,96 @@
<HTML>
<!--
Copyright (c) David Doria 2012
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: Directed Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:directed-graph-class"></A>
<pre>
directed_graph&lt;VertexProp, EdgeProp, GraphProp&gt;
</pre>
</H1>
<P>
The <tt>directed_graph</tt> class template is a simplified version
of the BGL adjacency list. This class is provided for ease of use, but
may not perform as well as custom-defined adjacency list classes. Instances
of this template model the BidirectionalGraph, VertexIndexGraph, and
EdgeIndexGraph concepts.
<H3>Example</H3>
A simple examples of creating a directed_graph is available here <a href="../../../libs/graph/example/directed_graph.cpp"><tt>libs/graph/example/directed_graph.cpp</tt></a>.
<P>
<PRE>
typedef boost::directed_graph&lt;&gt; Graph;
Graph g;
boost::graph_traits&lt;Graph&gt;::vertex_descriptor v0 = g.add_vertex();
boost::graph_traits&lt;Graph&gt;::vertex_descriptor v1 = g.add_vertex();
g.add_edge(v0, v1);
</PRE>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>VertexProp</TT></TD>
<TD>A property map for the graph vertices.</TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD><TT>EdgeProp</TT></TD>
<TD>A property map for the graph edges.</TD>
<TD>&nbsp;</TD>
</TR>
<TR>
<TD><TT>GraphProp</TT></TD>
<TD>A property map for the graph itself.</TD>
</TR>
</TABLE>
<P>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/directed_graph.hpp"><TT>boost/graph/directed_graph.hpp</TT></a>
<P>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+309
View File
@@ -0,0 +1,309 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<title>Boost Disjoint Sets</title>
</head>
<body bgcolor="#FFFFFF" link="#0000EE" text="#000000" vlink="#551A8B" alink=
"#FF0000">
<img src="../../../boost.png" alt="C++ Boost" width="277" height=
"86"><br clear="none">
<h1><a name="sec:disjoint-sets" id="sec:disjoint-sets"></a> Disjoint
Sets</h1>
<pre>
disjoint_sets&lt;Rank, Parent, FindCompress&gt;
</pre>
<p>This is a class that provides disjoint set operations with <i>union by
rank</i> and <i>path compression</i>. A disjoint-sets data structure
maintains a collection <i>S = {S<sub>1</sub>, S<sub>2</sub>, ...,
S<sub>k</sub>}</i> of disjoint sets. Each set is identified by a
<i>representative</i> which is some member of of the set. Sets are
represented by rooted trees which are encoded in the <tt>Parent</tt>
property map. Two heuristics: "union by rank" and "path compression" are
used to speed up the operations&nbsp;[<a href=
"./disjoint_sets_biblio.html#tarjan83:_data_struct_network_algo">1</a>, <a href=
"./disjoint_sets_biblio.html#clr90">2</a>].</p>
<h3>Where Defined</h3><a href=
"../../boost/pending/disjoint_sets.hpp"><tt>boost/pending/disjoint_sets.hpp</tt></a>
<h3>Template Parameters</h3>
<table border summary="">
<tr>
<td><tt>Rank</tt></td>
<td>must be a model of <a href=
"../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
with an integer value type and a key type equal to the set's element
type.</td>
</tr>
<tr>
<td><tt>Parent</tt></td>
<td>must be a model of <a href=
"../property_map/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
and the key and value type the same as the set's element type.</td>
</tr>
<tr>
<td><tt>FindCompress</tt></td>
<td>should be one of the find representative and path compress function
objects.</td>
</tr>
</table>
<h3>Example</h3>
<p>A typical usage pattern for <tt>disjoint_sets</tt> can be seen in the
<a href=
"../graph/doc/kruskal_min_spanning_tree.html"><tt>kruskal_minimum_spanning_tree()</tt></a>
algorithm. In this example, we call <tt>link()</tt> instead of
<tt>union_set()</tt> because <tt>u</tt> and <tt>v</tt> were obtained from
<tt>find_set()</tt> and therefore are already the representatives for their
sets.</p>
<pre>
...
disjoint_sets&lt;Rank, Parent, FindCompress&gt; dsets(rank, p);
for (ui = vertices(G).first; ui != vertices(G).second; ++ui)
dsets.make_set(*ui);
...
while ( !Q.empty() ) {
e = Q.front();
Q.pop();
u = dsets.find_set(source(e));
v = dsets.find_set(target(e));
if ( u != v ) {
*out++ = e;
dsets.link(u, v);
}
}
</pre>
<h3>Members</h3>
<table border summary="">
<tr>
<th>Member</th>
<th>Description</th>
</tr>
<tr>
<td><tt>disjoint_sets(Rank r, Parent p)</tt></td>
<td>Constructor.</td>
</tr>
<tr>
<td><tt>disjoint_sets(const disjoint_sets&amp; x)</tt></td>
<td>Copy constructor.</td>
</tr>
<tr>
<td><tt>template &lt;class Element&gt;<br>
void make_set(Element x)</tt></td>
<td>Creates a singleton set containing Element <tt>x</tt>.</td>
</tr>
<tr>
<td><tt>template &lt;class Element&gt;<br>
void link(Element x, Element y)</tt></td>
<td>Union the two sets <i>represented</i> by element <tt>x</tt> and
<tt>y</tt>.</td>
</tr>
<tr>
<td><tt>template &lt;class Element&gt;<br>
void union_set(Element x, Element y)</tt></td>
<td>Union the two sets that <i>contain</i> elements <tt>x</tt> and
<tt>y</tt>. This is equivalent to
<tt>link(find_set(x),find_set(y))</tt>.</td>
</tr>
<tr>
<td><tt>template &lt;class Element&gt;<br>
Element find_set(Element x)</tt></td>
<td>Return the representative for the set containing element
<tt>x</tt>.</td>
</tr>
<tr>
<td><tt>template &lt;class ElementIterator&gt;<br>
std::size_t count_sets(ElementIterator first, ElementIterator
last)</tt></td>
<td>Returns the number of disjoint sets.</td>
</tr>
<tr>
<td><tt>template &lt;class ElementIterator&gt;<br>
void compress_sets(ElementIterator first, ElementIterator
last)</tt></td>
<td>Flatten the parents tree so that the parent of every element is its
representative.</td>
</tr>
</table>
<h3>Complexity</h3>
<p>The time complexity is <i>O(m alpha(m,n))</i>, where <i>alpha</i> is the
inverse Ackermann's function, <i>m</i> is the number of disjoint-set
operations (<tt>make_set()</tt>, <tt>find_set()</tt>, and <tt>link()</tt>
and <i>n</i> is the number of elements. The <i>alpha</i> function grows
very slowly, much more slowly than the <i>log</i> function.</p>
<h3>See Also</h3><a href=
"../graph/doc/incremental_components.html"><tt>incremental_connected_components()</tt></a>
<hr>
<pre>
disjoint_sets_with_storage&lt;ID,InverseID,FindCompress&gt;
</pre>
<p>This class manages the storage for the rank and parent properties
internally. The storage is in arrays, which are indexed by element ID,
hence the requirement for the <tt>ID</tt> and <tt>InverseID</tt> functors.
The rank and parent properties are initialized during construction so the
each element is in a set by itself (so it is not necessary to initialize
objects of this class with the <a href=
"../graph/doc/incremental_components.html#sec:initialize-incremental-components">
<tt>initialize_incremental_components()</tt></a> function). This class is
especially useful when computing the (dynamic) connected components of an
<tt>edge_list</tt> graph which does not provide a place to store vertex
properties.</p>
<h3>Template Parameters</h3>
<table border summary="">
<tr>
<th>Parameter</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>ID</tt></td>
<td>must be a model of <a href=
"../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a> that
maps elements to integers between zero 0 and N, the total number of
elements in the sets.</td>
<td><tt>boost::identity_property_map</tt></td>
</tr>
<tr>
<td><tt>InverseID</tt></td>
<td>must be a model of <a href=
"../property_map/doc/ReadablePropertyMap.html">ReadablePropertyMap</a> that
maps integers to elements.</td>
<td><tt>boost::identity_property_map</tt></td>
</tr>
<tr>
<td><tt>FindCompress</tt></td>
<td>should be one of the find representative and path compress function
objects.</td>
<td><tt>representative_with_full_path_compression</tt></td>
</tr>
</table>
<h3>Members</h3>
<p>This class has all of the members in <tt>disjoint_sets</tt> as well as
the following members.</p>
<pre>
disjoint_sets_with_storage(size_type n = 0,
ID id = ID(),
InverseID inv = InverseID())
</pre>Constructor.
<pre>
template &lt;class ElementIterator&gt;
void disjoint_sets_with_storage::
normalize_sets(ElementIterator first, ElementIterator last)
</pre>This rearranges the representatives such that the representative of
each set is the element with the smallest ID.<br>
Postcondition: <tt>v &gt;= parent[v]</tt><br>
Precondition: the disjoint sets structure must be compressed.<br>
<hr>
<h2><a name="sec:representative-with-path-halving" id=
"sec:representative-with-path-halving"></a></h2>
<pre>
representative_with_path_halving&lt;Parent&gt;
</pre>
<p>This is a functor which finds the representative vertex for the same
component as the element <tt>x</tt>. While traversing up the representative
tree, the functor also applies the path halving technique to shorten the
height of the tree.</p>
<pre>
Element operator()(Parent p, Element x)
</pre>
<hr>
<h2><a name="sec:representative-with-full-path-compression" id=
"sec:representative-with-full-path-compression"></a><br></h2>
<pre>
representative_with_full_path_compression&lt;Parent&gt;
</pre>
<p>This is a functor which finds the representative element for the set
that element <tt>x</tt> belongs to.</p>
<pre>
Element operator()(Parent p, Element x)
</pre>
<p><br></p>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p>
<p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>
<table summary="">
<tr valign="top">
<td nowrap><i>Copyright &copy; 2000</i></td>
<td><i><a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>, Univ.of
Notre Dame (<a href="mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</a>)<br>
<a href="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</a>,
Univ.of Notre Dame (<a href=
"mailto:llee1@lsc.nd.edu">llee1@lsc.nd.edu</a>)<br>
<a href="http://www.lsc.nd.edu/~lums">Andrew Lumsdaine</a>, Univ.of
Notre Dame (<a href=
"mailto:lums@lsc.nd.edu">lums@lsc.nd.edu</a>)</i></td>
</tr>
</table>
<p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href=
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
</body>
</html>
+59
View File
@@ -0,0 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<title>Boost Utility Library: Bibliography</title>
</head>
<body bgcolor="#FFFFFF" link="#0000EE" text="#000000" vlink="#551A8B" alink=
"#FF0000">
<img src="../../../boost.png" alt="C++ Boost" width="277" height=
"86"><br clear="none">
<h2>Bibliography</h2>
<dl compact>
<dt><a name="tarjan83:_data_struct_network_algo" id=
"tarjan83:_data_struct_network_algo">1</a></dt>
<dd>R.&nbsp;E. Tarjan.<br>
<em>Data Structures and Network Algorithms</em>.<br>
Society for Industrial and Applied Mathematics, 1983.</dd>
<dt>&nbsp;</dt>
<dt><a name="clr90" id="clr90">2</a></dt>
<dd>T.&nbsp;Cormen, C.&nbsp;Leiserson, and R.&nbsp;Rivest.<br>
<em>Introduction to Algorithms</em>.<br>
McGraw-Hill, 1990.</dd>
</dl><br>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
height="31" width="88"></a></p>
<p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->01
December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38508" --></p>
<table summary="">
<tr valign="top">
<td nowrap><i>Copyright &copy; 2000</i></td>
<td><i><a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</a>, Univ.of
Notre Dame (<a href=
"mailto:jsiek@lsc.nd.edu">jsiek@lsc.nd.edu</a>)</i></td>
</tr>
</table>
<p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
copy at <a href=
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
</body>
</html>
+18 -22
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: distance_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -31,7 +27,7 @@ href="property_map.html">property map</a>) from some
source vertex during a graph search. When applied to edge <i>e =
(u,v)</i>, the distance of <i>v</i> is recorded to be one more than
the distance of <i>u</i>. The distance recorder is typically used with
the <tt>on_tree_edge</tt> or <tt>on_relax_edge</tt> events, and
the <tt>on_tree_edge</tt> or <tt>on_relax_edge</tt> events and
cannot be used with vertex events.
<p>
@@ -68,7 +64,7 @@ See the example for <a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>.
<TR><TD><TT>DistanceMap</TT></TD>
<TD>
A <a
href="../../property_map/WritablePropertyMap.html">WritablePropertyMap</a>,
href="../../property_map/doc/WritablePropertyMap.html">WritablePropertyMap</a>
where the key type and the value type are the vertex descriptor type
of the graph.
</TD>
@@ -128,7 +124,7 @@ template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
Given edge <i>e = (u,v)</i>, this records the distance of <i>v</i> as
one plus the distance of <i>u</i>.
</td>
</tr>
@@ -157,7 +153,7 @@ A convenient way to create a <tt>distance_recorder</tt>.
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are other event visitors: <a
href="./distance_recorder.html"><tt>predecessor_recorder</tt></a>,
href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
@@ -166,18 +162,18 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
<!-- LocalWords: DistanceMap EventTag EventVisitor map bfs dfs const Siek
-->
<!-- LocalWords: EventVisitorList WritablePropertyMap Univ Quan
+98
View File
@@ -0,0 +1,98 @@
<HTML>
<!--
~~ Copyright (c) Maciej Piechotka 2013
~~
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: 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">
<BR Clear>
<H1>
<!-- <img src="figs/python.gif" alt="(Python)"/> -->
<TT>edge_coloring</TT>
</H1>
<P>
<DIV ALIGN="LEFT">
<TABLE CELLPADDING=3 border>
<TR><TH ALIGN="LEFT"><B>Graphs:</B></TH>
<TD ALIGN="LEFT">undirected, loop-free</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Properties:</B></TH>
<TD ALIGN="LEFT">color</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>Complexity:</B></TH>
<TD ALIGN="LEFT">time: <i>O(|E| |V|)</i> </TD>
</TR>
</TABLE>
</DIV>
<pre>
template &lt;class Graph, class ColorMap&gt;
typename boost::property_traits<ColorMap>::value_type
edge_coloring(const Graph &amp;g, ColorMap color);
</pre>
<p>Computes an edge coloring for the vertices in the graph, using
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
at most m + 1 colors are used.
<!-- Misra, J., & Gries, D. (1992). A constructive proof of Vizing's theorem. In Information Processing Letters. -->
<h3>Where defined</h3>
<a href="../../../boost/graph/edge_coloring.hpp"><tt>boost/graph/edge_coloring.hpp</tt></a>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
<blockquote>
The graph object on which the algorithm will be applied. The type
<tt>Graph</tt> must be a model of <a href="EdgeListGraph.html">
Edge List Graph</a> and <a href="IncidenceGraph.html">Incidence
Graph</a>.
</blockquote>
OUT: <tt>ColorMap color</tt>
<blockquote>
This property map records the colors of each edges. It must be a
model of <A HREF="../../property_map/doc/ReadWritePropertyMap.html">
Read/Write Property Map</A> whose key type is the same as the edge
descriptor type of the graph and whose value type is an integral type
that can store all values smaller or equal to m.
</blockquote>
<h3>Example</h3>
See <A
href="../example/edge_coloring.cpp"><tt>example/edge_coloring.cpp</tt></A>.
<h3>See Also</h3>
<A href="./sequential_vertex_coloring.html">sequential vertex ordering</tt></A>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2013</TD><TD>
Maciej Piechotka (<A HREF="mailto:uzytkownik2@gmail.com">uzytkownik2@gmail.com</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
+20 -24
View File
@@ -1,21 +1,17 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: Edge List Class</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
@@ -56,7 +52,7 @@ Applying the Bellman-Ford shortest paths algorithm to an
E(x,y), E(x,v),
E(y,v), E(y,z),
E(z,u), E(z,x) };
int weight[] = { -4, 8, 5,
-2,
9, -3,
@@ -65,16 +61,16 @@ Applying the Bellman-Ford shortest paths algorithm to an
typedef boost::edge_list&lt;E*&gt; Graph;
Graph g(edges, edges + sizeof(edges) / sizeof(E));
std::vector&lt;int&gt; distance(N, std::numeric_limits&lt;short&gt;::max());
std::vector&lt;int&gt; parent(N,-1);
distance[z] = 0;
parent[z] = z;
bool r = boost::bellman_ford_shortest_paths(g, int(N), weight,
distance.begin(),
parent.begin());
if (r)
if (r)
for (int i = 0; i &lt; N; ++i)
std::cout &lt;&lt; name[i] &lt;&lt; ": " &lt;&lt; distance[i]
&lt;&lt; " " &lt;&lt; name[parent[i]] &lt;&lt; std::endl;
@@ -108,7 +104,7 @@ of each vertex in the shortest paths tree.
</tr>
<TR><TD><TT>EdgeIterator</TT></TD> <TD>Must be model of <a
href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
href="http://www.boost.org/sgi/stl/InputIterator.html">InputIterator</a>
who's <TT>value_type</TT> must be a pair of vertex descriptors.</TD>
</TR>
@@ -149,7 +145,7 @@ boost::graph_traits&lt;edge_list&gt;::edge_descriptor
</tt>
<br><br>
The type for the edge descriptors associated with the
<TT>edge_list</TT>.
<TT>edge_list</TT>.
<hr>
@@ -211,15 +207,15 @@ Returns the target vertex of edge <TT>e</TT>.
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>,
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>,
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+197
View File
@@ -0,0 +1,197 @@
<HTML>
<!--
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: edge_predecessor_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1>
<pre>
edge_predecessor_recorder&lt;PredEdgeMap, EventTag&gt;
</pre>
</H1>
This is an <a href="./EventVisitor.html">EventVisitor</a> that records
the predecessor (or parent) edge of a vertex in a property
map. This is particularly useful in graph search algorithms where
recording the predecessors is an efficient way to encode the search
tree that was traversed during the search. The edge predecessor recorder is
typically used with the <tt>on_tree_edge</tt> or
<tt>on_relax_edge</tt> events and cannot be used with vertex events. This
visitor is meant to be used instead of <a
href="predecessor_recorder.html"><tt>predecessor_recorder</tt></a> when a
graph has parallel edges and it is necessary to know which incoming edge a
search algorithm
used to get to a particular vertex.
<p>
<tt>edge_predecessor_recorder</tt> can be used with graph algorithms by
wrapping it with an algorithm-specific adaptor, such as <a
href="./bfs_visitor.html"><tt>bfs_visitor</tt></a> and <a
href="./dfs_visitor.html"><tt>dfs_visitor</tt></a>. Also, this event
visitor can be combined with other event visitors using
<tt>std::pair</tt> to form an EventVisitorList.
<p>
Algorithms such as Dijkstra's and breadth-first search will not assign
a predecessor edge to the source vertex (which is the root of the search
tree). It is often useful to initialize the source vertex's
predecessor to a special value, thereby identifying the root vertex.
When using an algorithm like
depth-first search that creates a forest (multiple search trees) it
is useful to do the same for every vertex. This
way all the root nodes can be distinguished.
<!-- <h3>Example</h3>
See the example for <a href="./bfs_visitor.html"><tt>bfs_visitor</tt></a>.
-->
<h3>Model of</h3>
<a href="./EventVisitor.html">EventVisitor</a>
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/visitors.hpp">
<TT>boost/graph/visitors.hpp</TT></a>
<H3>Template Parameters</H3>
<P>
<TABLE border>
<TR>
<th>Parameter</th><th>Description</th><th>Default</th>
</tr>
<TR><TD><TT>PredEdgeMap</TT></TD>
<TD>
A <a
href="../../property_map/doc/WritablePropertyMap.html">WritablePropertyMap</a>
where the key and value types are the vertex and edge descriptor types, respectively, of the graph.
</TD>
<TD>&nbsp;</TD>
</TR>
<TR><TD><TT>EventTag</TT></TD>
<TD>
The tag to specify when the <tt>edge_predecessor_recorder</tt> should be
applied during the graph algorithm. <tt>EventTag</tt> must be an
edge event.
</TD>
<TD>&nbsp;</TD>
</TR>
</table>
<H2>Associated Types</H2>
<table border>
<tr>
<th>Type</th><th>Description</th>
</tr>
<tr>
<td><tt>edge_predecessor_recorder::event_filter</tt></td>
<td>
This will be the same type as the template parameter <tt>EventTag</tt>.
</td>
</tr>
</table>
<h3>Member Functions</h3>
<p>
<table border>
<tr>
<th>Member</th><th>Description</th>
</tr>
<tr>
<td><tt>
edge_predecessor_recorder(PredEdgeMap pa);
</tt></td>
<td>
Construct an edge predecessor recorder object with predecessor property map
<tt>pa</tt>.
</td>
</tr>
<tr>
<td><tt>
template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>
Given edge <i>e = (u,v)</i>, this records <i>e</i> as the
predecessor (or parent) edge of <i>v</i>.
</td>
</tr>
</table>
<h3>Non-Member Functions</h3>
<table border>
<tr>
<th>Function</th><th>Description</th>
</tr>
<tr><td><tt>
template &lt;class PredEdgeMap, class Tag&gt;<br>
edge_predecessor_recorder&lt;PredEdgeMap, Tag&gt; <br>
record_edge_predecessors(PredEdgeMap pa, Tag);
</tt></td><td>
A convenient way to create a <tt>edge_predecessor_recorder</tt>.
</td></tr>
</table>
<h3>See Also</h3>
<a href="./visitor_concepts.html">Visitor concepts</a>
<p>
The following are other event visitors: <a
<a href="./distance_recorder.html"><tt>distance_recorder</tt></a>,
<a href="./time_stamper.html"><tt>time_stamper</tt></a>,
and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
Indiana University (<A
HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
<A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<A
HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: PredEdgeMap EventTag EventVisitor map bfs dfs const
-->
<!-- LocalWords: EventVisitorList WritablePropertyMap Siek Univ Quan
-->
<!-- LocalWords: Lumsdaine
-->
@@ -1,58 +1,54 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. Silicon Graphics makes no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
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: Edmunds-Karp Maximum Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
ALT="C++ Boost" width="277" height="86">
<Title>Boost Graph Library: Edmonds-Karp Maximum Flow</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:edmunds_karp_max_flow">
<TT>edmunds_karp_max_flow</TT>
<H1><A NAME="sec:edmonds_karp_max_flow">
<TT>edmonds_karp_max_flow</TT>
</H1>
<PRE>
<i>// named paramter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>, class P, class T, class R&gt;
typename detail::edge_capacity_value&lt;VertexListGraph, P, T, R&gt;::value_type
edmunds_karp_max_flow(VertexListGraph& g,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor src,
typename graph_traits&lt;VertexListGraph&gt;::vertex_descriptor sink,
<i>// named parameter version</i>
template &lt;class <a href="./Graph.html">Graph</a>, class P, class T, class R&gt;
typename detail::edge_capacity_value&lt;Graph, P, T, R&gt;::value_type
edmonds_karp_max_flow(Graph& g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
const bgl_named_params&lt;P, T, R&gt;&amp; params = <i>all defaults</i>)
<i>// non-named parameter version</i>
template &lt;class <a href="./VertexListGraph.html">VertexListGraph</a>,
template &lt;class <a href="./Graph.html">Graph</a>,
class CapacityEdgeMap, class ResidualCapacityEdgeMap,
class ReverseEdgeMap, class ColorMap, class PredEdgeMap&gt;
typename property_traits&lt;CapacityEdgeMap&gt;::value_type
edmunds_karp_max_flow(VertexListGraph&amp; g,
edmonds_karp_max_flow(Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor src,
typename graph_traits&lt;Graph&gt;::vertex_descriptor sink,
CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
ColorMap color, PredEdgeMap pred)
</PRE>
<P>
The <tt>edmunds_karp_max_flow()</tt> function calculates the maximum flow
The <tt>edmonds_karp_max_flow()</tt> function calculates the maximum flow
of a network. See Section <a
href="./graph_theory_review.html#sec:network-flow-algorithms">Network
Flow Algorithms</a> for a description of maximum flow. The calculated
maximum flow will be the return value of the function. The function
also calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
<i>E</i>, which are returned in the form of the residual capacity
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<i>r(u,v) = c(u,v) - f(u,v)</i>.
<p>
There are several special requirements on the input graph and property
@@ -79,6 +75,8 @@ This algorithm provides a very simple and easy to implement solution to
the maximum flow problem. However, there are several reasons why this
algorithm is not as good as the <a
href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>
or the <a
href="./boykov_kolmogorov_max_flow.html"><tt>boykov_kolmogorov_max_flow()</tt></a>
algorithm.
<ul>
@@ -95,17 +93,17 @@ algorithm.
<H3>Where Defined</H3>
<P>
<a href="../../../boost/graph/edmunds_karp_max_flow.hpp"><TT>boost/graph/edmunds_karp_max_flow.hpp</TT></a>
<a href="../../../boost/graph/edmonds_karp_max_flow.hpp"><TT>boost/graph/edmonds_karp_max_flow.hpp</TT></a>
<P>
<h3>Parameters</h3>
IN: <tt>VertexListGraph&amp; g</tt>
IN: <tt>Graph&amp; g</tt>
<blockquote>
A directed graph. The
graph's type must be a model of <a
href="./VertexListGraph.html">VertexListGraph</a>. For each edge
href="./VertexListGraph.html">VertexListGraph</a> and <a href="./IncidenceGraph.html">IncidenceGraph</a> For each edge
<i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
be in the graph.
</blockquote>
@@ -114,12 +112,12 @@ IN: <tt>vertex_descriptor src</tt>
<blockquote>
The source vertex for the flow network graph.
</blockquote>
IN: <tt>vertex_descriptor sink</tt>
<blockquote>
The sink vertex for the flow network graph.
</blockquote>
<h3>Named Parameters</h3>
@@ -127,16 +125,16 @@ IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
<blockquote>
The edge capacity property map. The type must be a model of a
constant <a
href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>. The
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>. The
key type of the map must be the graph's edge descriptor type.<br>
<b>Default:</b> <tt>get(edge_capacity, g)</tt>
</blockquote>
OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
<blockquote>
This maps edges to their residual capacity. The type must be a model
of a mutable <a
href="../../property_map/LvaluePropertyMap.html">Lvalue Property
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property
Map</a>. The key type of the map must be the graph's edge descriptor
type.<br>
<b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
@@ -146,7 +144,7 @@ IN: <tt>reverse_edge_map(ReverseEdgeMap rev)</tt>
<blockquote>
An edge property map that maps every edge <i>(u,v)</i> in the graph
to the reverse edge <i>(v,u)</i>. The map must be a model of
constant <a href="../../property_map/LvaluePropertyMap.html">Lvalue
constant <a href="../../property_map/doc/LvaluePropertyMap.html">Lvalue
Property Map</a>. The key type of the map must be the graph's edge
descriptor type.<br>
<b>Default:</b> <tt>get(edge_reverse, g)</tt>
@@ -158,13 +156,13 @@ UTIL: <tt>color_map(ColorMap color)</tt>
breadth-first search stage. At the end of the algorithm, the white
vertices define the minimum cut set. The map must be a model of
mutable <a
href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>.
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
The key type of the map should be the graph's vertex descriptor type, and
the value type must be a model of <a
href="./ColorValue.html">ColorValue</a>.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
@@ -174,12 +172,12 @@ UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
<blockquote>
Use by the algorithm to store augmenting paths. The map must be a
model of mutable <a
href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>.
href="../../property_map/doc/LvaluePropertyMap.html">Lvalue Property Map</a>.
The key type must be the graph's vertex descriptor type and the
value type must be the graph's edge descriptor type.<br>
<b>Default:</b> an <a
href="../../property_map/iterator_property_map.html">
href="../../property_map/doc/iterator_property_map.html">
<tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
of edge descriptors of size <tt>num_vertices(g)</tt> and
using the <tt>i_map</tt> for the index map.
@@ -191,10 +189,14 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<tt>[0, num_vertices(g))</tt>. This property map is only needed
if the default for the color or predecessor map is used.
The vertex index map must be a model of <a
href="../../property_map/ReadablePropertyMap.html">Readable Property
href="../../property_map/doc/ReadablePropertyMap.html">Readable Property
Map</a>. The key type of the map must be the graph's vertex
descriptor type.<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>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
@@ -207,28 +209,29 @@ some constant <i>U</i>.
<h3>Example</h3>
The program in <a
href="../example/edmunds-karp-eg.cpp"><tt>example/edmunds-karp-eg.cpp</tt></a>
href="../example/edmonds-karp-eg.cpp"><tt>example/edmonds-karp-eg.cpp</tt></a>
reads an example maximum flow problem (a graph with edge capacities)
from a file in the DIMACS format and computes the maximum flow.
<h3>See Also</h3>
<a href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>.
<a href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a><br>
<a href="./boykov_kolmogorov_max_flow.html"><tt>boykov_kolmogorov_max_flow()</tt></a>.
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy 2000-2001</TD><TD>
<A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
<TD nowrap>Copyright &copy; 2000-2001</TD><TD>
<A HREF="http://www.boost.org/users/people/jeremy_siek.html">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
<!-- LocalWords: HTML Siek Edmunds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
</HTML>
<!-- LocalWords: HTML Siek Edmonds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
-->
<!-- LocalWords: gif ALT BR sec edmunds karp TT DIV CELLPADDING TR TD PRE lt
<!-- LocalWords: gif ALT BR sec edmonds karp TT DIV CELLPADDING TR TD PRE lt
-->
<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
-->
+83 -70
View File
@@ -1,15 +1,10 @@
// Boost.Graph library isomorphism test
// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
// Copyright (C) 2001 Douglas Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
// Permission to modify the code and to distribute modified code is granted
// provided this copyright notice appears in all copies, and a notice
// that the code was modified is included with the copyright notice.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
// 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)
// For more information, see http://www.boost.org
//
@@ -25,7 +20,7 @@
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/isomorphism.hpp>
//#include "isomorphism-v3.hpp"
#include <boost/property_map.hpp>
#include <boost/property_map/property_map.hpp>
#include <iostream>
#include <fstream>
#include <map>
@@ -35,77 +30,95 @@
using namespace boost;
enum { a, b, c, d, e, f, g, h };
enum { _1, _2, _3, _4, _5, _6, _7, _8 };
void test_isomorphism()
enum
{
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphA;
typedef adjacency_list<vecS, vecS, bidirectionalS> GraphB;
a,
b,
c,
d,
e,
f,
g,
h
};
enum
{
_1,
_2,
_3,
_4,
_5,
_6,
_7,
_8
};
char a_names[] = "abcdefgh";
char b_names[] = "12345678";
void test_isomorphism()
{
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphA;
typedef adjacency_list< vecS, vecS, bidirectionalS > GraphB;
GraphA Ga(8);
add_edge(a, d, Ga);
add_edge(a, h, Ga);
add_edge(b, c, Ga);
add_edge(b, e, Ga);
add_edge(c, f, Ga);
add_edge(d, a, Ga);
add_edge(d, h, Ga);
add_edge(e, b, Ga);
add_edge(f, b, Ga);
add_edge(f, e, Ga);
add_edge(g, d, Ga);
add_edge(g, f, Ga);
add_edge(h, c, Ga);
add_edge(h, g, Ga);
char a_names[] = "abcdefgh";
char b_names[] = "12345678";
GraphB Gb(8);
add_edge(_1, _6, Gb);
add_edge(_2, _1, Gb);
add_edge(_2, _5, Gb);
add_edge(_3, _2, Gb);
add_edge(_3, _4, Gb);
add_edge(_4, _2, Gb);
add_edge(_4, _3, Gb);
add_edge(_5, _4, Gb);
add_edge(_5, _6, Gb);
add_edge(_6, _7, Gb);
add_edge(_6, _8, Gb);
add_edge(_7, _8, Gb);
add_edge(_8, _1, Gb);
add_edge(_8, _7, Gb);
GraphA Ga(8);
add_edge(a, d, Ga);
add_edge(a, h, Ga);
add_edge(b, c, Ga);
add_edge(b, e, Ga);
add_edge(c, f, Ga);
add_edge(d, a, Ga);
add_edge(d, h, Ga);
add_edge(e, b, Ga);
add_edge(f, b, Ga);
add_edge(f, e, Ga);
add_edge(g, d, Ga);
add_edge(g, f, Ga);
add_edge(h, c, Ga);
add_edge(h, g, Ga);
std::vector<std::size_t> in_degree_A(num_vertices(Ga));
boost::detail::compute_in_degree(Ga, &in_degree_A[0]);
GraphB Gb(8);
add_edge(_1, _6, Gb);
add_edge(_2, _1, Gb);
add_edge(_2, _5, Gb);
add_edge(_3, _2, Gb);
add_edge(_3, _4, Gb);
add_edge(_4, _2, Gb);
add_edge(_4, _3, Gb);
add_edge(_5, _4, Gb);
add_edge(_5, _6, Gb);
add_edge(_6, _7, Gb);
add_edge(_6, _8, Gb);
add_edge(_7, _8, Gb);
add_edge(_8, _1, Gb);
add_edge(_8, _7, Gb);
std::vector<std::size_t> in_degree_B(num_vertices(Gb));
boost::detail::compute_in_degree(Gb, &in_degree_B[0]);
std::vector< std::size_t > in_degree_A(num_vertices(Ga));
boost::detail::compute_in_degree(Ga, &in_degree_A[0]);
degree_vertex_invariant<std::size_t*, GraphA>
invariantA(&in_degree_A[0], Ga);
degree_vertex_invariant<std::size_t*, GraphB>
invariantB(&in_degree_B[0], Gb);
std::vector< std::size_t > in_degree_B(num_vertices(Gb));
boost::detail::compute_in_degree(Gb, &in_degree_B[0]);
std::vector<graph_traits<GraphB>::vertex_descriptor> f(num_vertices(Ga));
degree_vertex_invariant< std::size_t*, GraphA > invariantA(
&in_degree_A[0], Ga);
degree_vertex_invariant< std::size_t*, GraphB > invariantB(
&in_degree_B[0], Gb);
bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB,
invariantB.max(),
get(vertex_index, Ga), get(vertex_index, Gb));
assert(ret == true);
std::vector< graph_traits< GraphB >::vertex_descriptor > f(
num_vertices(Ga));
for (std::size_t i = 0; i < num_vertices(Ga); ++i)
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl;
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
bool ret = isomorphism(Ga, Gb, &f[0], invariantA, invariantB,
(invariantB.max)(), get(vertex_index, Ga), get(vertex_index, Gb));
assert(ret == true);
for (std::size_t i = 0; i < num_vertices(Ga); ++i)
std::cout << "f(" << a_names[i] << ")=" << b_names[f[i]] << std::endl;
BOOST_TEST(verify_isomorphism(Ga, Gb, &f[0]));
}
int test_main(int, char* [])
int test_main(int, char*[])
{
test_isomorphism();
return EXIT_SUCCESS;
test_isomorphism();
return boost::report_errors();
}
+152
View File
@@ -0,0 +1,152 @@
<HTML>
<!--
Copyright (c) 2004, 2005 The Trustees of Indiana University
Use, modification and distribution is 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)
Authors: Douglas Gregor
Jeremiah Willcock
Andrew Lumsdaine
-->
<Head>
<Title>Boost Graph Library: Erd&ouml;s-Renyi Generator</Title>
<script language="JavaScript" type="text/JavaScript">
<!--
function address(host, user) {
var atchar = '@';
var thingy = user+atchar+host;
thingy = '<a hre' + 'f=' + "mai" + "lto:" + thingy + '>' + user+atchar+host + '</a>';
document.write(thingy);
}
//-->
</script>
</head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<tt>erdos_renyi_iterator</tt>
<br>
<PRE>
template&lt;typename RandomGenerator, typename Graph&gt;
class erdos_renyi_iterator
{
public:
typedef std::input_iterator_tag iterator_category;
typedef std::pair&lt;vertices_size_type, vertices_size_type&gt; value_type;
typedef const value_type&amp; reference;
typedef const value_type* pointer;
typedef void difference_type;
erdos_renyi_iterator();
erdos_renyi_iterator(RandomGenerator&amp; gen, vertices_size_type n,
double fraction = 0.0, bool allow_self_loops = false);
erdos_renyi_iterator(RandomGenerator&amp; gen, vertices_size_type n,
edges_size_type m, bool allow_self_loops = false);
// Iterator operations
reference operator*() const;
pointer operator-&gt;() const;
erdos_renyi_iterator&amp; operator++();
erdos_renyi_iterator operator++(int);
bool operator==(const erdos_renyi_iterator&amp; other) const;
bool operator!=(const erdos_renyi_iterator&amp; other) const;
};
</PRE>
<p> This class template implements a generator for Erd&ouml;s-Renyi
graphs, suitable for initializing an <a
href="adjacency_list.html"><tt>adjacency_list</tt></a> or other graph
structure with iterator-based initialization. An Erd&ouml;s-Renyi
graph <em>G = (n, p)</em> is a graph with <em>n</em> vertices
that. The probability of having an edge <em>(u, v)</em> in <em>G</em>
is <em>p</em> for any vertices <em>u</em> and <em>v</em>. Typically,
there are no self-loops, but the generator can optionally introduce
self-loops with probability <em>p</em>. This generator will not
produce any parallel edges and will produce edges in sorted order (as
required by, e.g., the <a
href="compressed_sparse_row.html"><tt>compressed_sparse_row_graph</tt></a>).</p>
<p>Erd&ouml;s-Renyi graphs typically exhibit very little
structure. For this reason, they are rarely useful in modeling
real-world problems. However, they are often used when determining
the theoretical complexity of complex graph algorithms.</p>
<p>If you want the possibility of generating parallel edges and don't
care about sorted order, use the <a
href="erdos_renyi_generator.html"><tt>erdos_renyi_iterator</tt></a>.</p>
<h3>Where Defined</h3>
<a href="../../../boost/graph/erdos_renyi_generator.hpp"><tt>boost/graph/erdos_renyi_generator.hpp</tt></a>
<h3>Constructors</h3>
<a name="default-constructor"/>
<pre>erdos_renyi_iterator();</pre>
<blockquote>
Constructs a past-the-end iterator.
</blockquote>
<pre>
erdos_renyi_iterator(RandomGenerator&amp; gen, vertices_size_type n,
double fraction = 0.0, bool allow_self_loops = false);
</pre>
<blockquote>
Constructs an Erd&ouml;s-Renyi generator iterator that creates a
graph with <tt>n</tt> vertices and a given <tt>fraction</tt> of the
total number of edges that a simple graph may have.
<tt>probability</tt>. Random vertices and edges are selected using the
random number generator <tt>gen</tt>. Self-loops are permitted only when
<tt>allow_self_loops</tt> is <tt>true</tt>.
</blockquote>
<pre>
erdos_renyi_iterator(RandomGenerator&amp; gen, vertices_size_type n,
edges_size_type m, bool allow_self_loops = false);
</pre>
<blockquote>
Constructs an Erd&ouml;s-Renyi generator iterator that creates a
graph with <tt>n</tt> vertices and <tt>m</tt> edges.
<tt>probability</tt>. Random vertices and edges are selected using the
random number generator <tt>gen</tt>. Self-loops are permitted only when
<tt>allow_self_loops</tt> is <tt>true</tt>.
</blockquote>
<H3>Example</H3>
<pre>
#include &lt;boost/graph/adjacency_list.hpp&gt;
#include &lt;boost/graph/erdos_renyi_generator.hpp&gt;
#include &lt;boost/random/linear_congruential.hpp&gt;
typedef boost::adjacency_list&lt;&gt; Graph;
typedef boost::erdos_renyi_iterator&lt;boost::minstd_rand, Graph&gt; ERGen;
int main()
{
boost::minstd_rand gen;
// Create graph with 100 nodes and edges with probability 0.05
Graph g(ERGen(gen, 100, 0.05), ERGen(), 100);
return 0;
}
</pre>
<br>
<HR>
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2005</TD><TD>
<A HREF="http://www.boost.org/people/doug_gregor.html">Doug Gregor</A>, Indiana University (<script language="Javascript">address("cs.indiana.edu", "dgregor")</script>)<br>
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (<script language="Javascript">address("osl.iu.edu", "lums")</script>)
</TD></TR></TABLE>
</BODY>
</HTML>
+46
View File
@@ -0,0 +1,46 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2002
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: Exceptions</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<h1><a href="../../../boost/graph/exception.hpp"><tt>boost/graph/exception.hpp</tt></a></h1>
<P>
The BGL defines several exception classes for reporting errors from
BGL algorithms. Many of the BGL algorithms place certain requirements
on the input graph. If these requirements are not met then the
algorithm can not successfully complete, and instead throws the
appropriate exception.
</P>
<h3>Synopsis</h3>
<pre>
struct <a name="bad_graph">bad_graph</a> : public invalid_argument {
bad_graph(const string& what_arg);
};
struct <a name="not_a_dag">not_a_dag</a> : public bad_graph {
not_a_dag();
};
struct <a name="negative_edge">negative_edge</a> : public bad_graph {
negative_edge();
};
struct <a name="negative_cycle">negative_cycle</a> : public bad_graph {
negative_cycle();
};
struct <a name="not_connected">not_connected</a> : public bad_graph {
not_connected();
};
</pre>
+92 -18
View File
@@ -1,29 +1,97 @@
<HTML>
<!--
-- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
--
-- Permission to use, copy, modify, distribute and sell this software
-- and its documentation for any purpose is hereby granted without fee,
-- provided that the above copyright notice appears in all copies and
-- that both that copyright notice and this permission notice appear
-- in supporting documentation. We make no
-- representations about the suitability of this software for any
-- purpose. It is provided "as is" without express or implied warranty.
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 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: FAQ</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../c++boost.gif"
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>
<h1>Frequently Asked Questions</h1>
<ol>
<li>
How do I perform an early exit from an algorithm such as BFS?<br>
<p>
Create a visitor that throws an exception when you want to cut off the
search, then put your call to <tt>breadth_first_search</tt> inside of
an appropriate try/catch block. This strikes many programmers as a
misuse of exceptions, however, much thought was put into the decision
to have exceptions has the preferred way to exit early. See boost
email discussions for more details.
</p>
<li>
Why is the visitor parameter passed by value rather than reference
in the various BGL algorithms?<br>
<p>
One of the usage scenarios that we wanted to support with the
algorithms was creating visitor objects on the fly, within the
argument list of the call to the graph algorithm. In this situation,
the visitor object is a temporary object. Now there is a truly
unfortunate rule in the C++ standard that says a temporary cannot be
bound to a non-const reference parameter. So we had to decide whether
we wanted to support this kind of usage and call-by-value, or not and
call-by-reference. We chose call-by-value, following in the footsteps
of the STL (which passes functors by value). The disadvantage of this
decision is that if your visitor contains state and changes that state
during the algorithm, the change will be made to a copy of the visitor
object, not the visitor object passed in. Therefore you may want the
visitor to hold this state by pointer or reference.
</p>
<li>Why does the BGL interface use friend functions (or free functions)
instead of member functions?<br>
<p>
For the most part, the differences between member functions and free
functions are syntactic, and not very important, though people can get
religious about them. However, we had one technical reason for
favoring free functions. A programmer can overload a free function for
a type coming from a 3rd party without modifying the source
code/definition of that type. There are several uses of this in the
BGL. For example, Stanford GraphBase and LEDA graphs can both be used
in BGL algorithms because of overloads in <tt>stanford_graph.hpp</tt>
and <tt>leda_graph.hpp</tt>. One can even use
<tt>std::vector&lt;std::list&gt;</tt> as a graph due to the overloads
in <tt>vector_as_graph.hpp</tt>.
</p>
<p>
Of course, there is a way to adapt 3rd party classes into an interface
with member functions. You create an adaptor class. However, the
disadvantage of an adaptor class (compared to overloaded functions) is
that one has to physically wrap and unwrap the objects as they go
into/out of BGL algorithms. So the overloaded function route is more
convenient. Granted, this is not a huge difference, but since there
weren't other strong reasons, it was enough for us to choose free
functions.
</p>
<p>
Our religious reason for choosing free functions is to send the message
that BGL is a generic library, and not a traditional object-oriented
library. OO was hip in the 80s and 90s, but its time we moved beyond!
</p>
</li>
<li>How do I create a graph where the edges are sorted/ordered? <br>
<p>The example <a href="../example/ordered_out_edges.cpp">
<tt>ordered_out_edges.cpp</tt></a> shows how to do this.</p>
</li>
<li>Why does the algorithm X work with <tt>adjacency_list</tt> where
<tt>VertexList=vecS</tt> but not when <tt>VertexList=listS</tt>? <br><br>
Often the reason is that the algorithm expects to find the
@@ -47,7 +115,7 @@
// initialize the vertex_index property values
graph_traits&lt;graph_t&gt;::vertex_iterator vi, vend;
graph_traits&lt;graph_t&gt;::vertices_size_type cnt = 0;
for(tie(vi,vend) = vertices(G); vi != vend; ++vi)
for(boost::tie(vi,vend) = vertices(G); vi != vend; ++vi)
put(index, *vi, cnt++);
</pre>
</li>
@@ -56,13 +124,13 @@
not being found, such as:
<pre>
../../../boost/concept_check.hpp:209: no match for
`boost::detail::error_property_not_found & ==
boost::detail::error_property_not_found &'
`boost::detail::error_property_not_found &amp; ==
boost::detail::error_property_not_found &amp;'
</pre>
or a message such as:
<pre>
../../..\boost/graph/depth_first_search.hpp(78) : error C2664: 'white'
: cannot convert parameter 1 from
: cannot convert parameter 1 from
'struct boost::detail::error_property_not_found'
to 'enum boost::default_color_type'
</pre>
@@ -76,3 +144,9 @@ argument to the algorithm.</li>
</ol>
<!-- LocalWords: gif ALT BGL std const STL GraphBase LEDA BFS stanford hpp OO
-->
<!-- LocalWords: leda cpp VertexList vecS listS undirectedS num cnt struct
-->
<!-- LocalWords: enum
-->

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