Compare commits

...

793 Commits

Author SHA1 Message Date
John Maddock cea3ee8225 Merge branch 'develop' 2021-07-03 10:21:10 +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
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 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 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 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 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 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 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 4b1c5fe438 Fixed types in bundled property docs; fixes #5410
[SVN r70875]
2011-04-02 18:43:03 +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 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 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 086a94c8a5 Applied patch from Matthias Walter
[SVN r67031]
2010-12-05 20:17:48 +00:00
Jeremiah Willcock 10b41afc0f Fixed uninitialized variables
[SVN r67014]
2010-12-04 20:49:49 +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 9bcc1b9a69 Changed to Boost.Filesystem v3
[SVN r67008]
2010-12-04 20:31:33 +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 11187e5a25 Link fixes.
[SVN r66273]
2010-10-30 14:32:50 +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 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 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 7b97cbf393 Fixed const issue on VC++ 8; fixes #4715
[SVN r65836]
2010-10-08 17:32:57 +00:00
Jeremiah Willcock 89cd3d8a8a Added patch from Daniel Trebbien
[SVN r65593]
2010-09-26 02:29:42 +00:00
794 changed files with 134460 additions and 66470 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
+164
View File
@@ -0,0 +1,164 @@
# 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 03", "g++-10", packages="g++-10", image="cppalliance/droneubuntu2004:1", buildtype="boost", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': '03', }, 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),
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),
osx_cxx("XCode-7.3 14", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
osx_cxx("XCode-7.3 1z", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, 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
+223
View File
@@ -0,0 +1,223 @@
# 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:
compiler: [ g++-9, g++-10, 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 g++-10 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-latest
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-latest
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
+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()
+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).
+1
View File
@@ -21,6 +21,7 @@ lib boost_graph
# 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
:
:
;
+8 -8
View File
@@ -1,17 +1,17 @@
<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">
<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 +32,7 @@ href="./astar_search.html">astar_search()</a>.
<h3>Refinement of</h3>
<a href="http://www.sgi.com/tech/stl/UnaryFunction.html">Unary
<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>
@@ -129,10 +129,10 @@ Called for the target of every out edge of a vertex being examined.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
<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>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -204,10 +204,10 @@ happens after all of its out-edges have been examined.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
<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>
</HTML>
+29 -29
View File
@@ -1,21 +1,21 @@
<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">
<body alink="#ff0000"
bgcolor="#ffffff"
link="#0000ee"
text="#000000"
vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear="">
@@ -23,7 +23,7 @@
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
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.
@@ -38,8 +38,8 @@ allows for such operations to be defined independently from the algorithm.
<td> is a type that models the AddEdgeVisitor concept </td>
</tr>
<tr>
<td> <tt>vis</tt> </td>
<tr>
<td> <tt>vis</tt> </td>
<td> is an object of type Visitor </td>
</tr>
@@ -48,15 +48,15 @@ allows for such operations to be defined independently from the algorithm.
<td> is the type of a graph </td>
</tr>
<tr>
<td> <tt>u,v</tt> </td>
<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>
<tr>
<td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</td>
</tr>
@@ -66,7 +66,7 @@ allows for such operations to be defined independently from the algorithm.
</td>
</tr><tr>
<td>
<td>
</td></tr></tbody></table>
@@ -84,7 +84,7 @@ None
<tbody><tr><th>Name</th><th>Expression</th><th>Return Type</th>
<th>Description</th>
</tr><tr>
</tr><tr>
<td> Add an Edge </td>
<td> <tt>vis.visit_vertex_pair(u, v, g)</tt> </td>
<td> <tt>void</tt></td>
@@ -96,26 +96,26 @@ None
</p><h3>Models</h3>
Two models of this concept are defined in the file
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>.
<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
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
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>
@@ -125,6 +125,6 @@ and update the edge index for the newly created edge.
<br>
</p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
aaron.windsor@gmail.com</a>)
</body></html>
+7 -8
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>AdjacencyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -21,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
@@ -112,7 +112,6 @@ The <TT>adjacent_vertices()</TT> function must return in constant time.
typedef typename boost::graph_traits&lt;G&gt;::adjacency_iterator
adjacency_iterator;
void constraints() {
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;adjacency_iterator&gt; ));
p = adjacent_vertices(v, g);
@@ -165,4 +164,4 @@ experience with graph algorithm implementations.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+6 -6
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>AdjacencyMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -100,4 +100,4 @@ The <TT>edge()</TT> function must return in constant time.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+8 -8
View File
@@ -1,17 +1,17 @@
<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: BFSVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -142,7 +142,7 @@ edges for undirected graphs.
<td>
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>
@@ -211,10 +211,10 @@ class count_tree_edges_bfs_visitor(bgl.Graph.BFSVisitor):
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<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>BasicMatrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -78,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;
@@ -100,4 +100,4 @@ HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: Bellman Ford Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -175,10 +175,10 @@ class count_tree_edges_bellman_ford_visitor(bgl.Graph.BellmanFordVisitor):
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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 -6
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Bidirectional</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -149,16 +149,21 @@ undirected graphs).
BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept&lt;in_edge_iterator&gt; ));
p = in_edges(v, g);
n = in_degree(v, g);
n = degree(v, g);
e = *p.first;
const_constraints(g);
}
void const_constraints(const G&amp; g) {
p = in_edges(v, g);
n = in_degree(v, g);
n = degree(v, g);
e = *p.first;
}
std::pair&lt;in_edge_iterator, in_edge_iterator&gt; p;
typename boost::graph_traits&lt;G&gt;::vertex_descriptor v;
typename boost::graph_traits&lt;G&gt;::edge_descriptor e;
typename boost::graph_traits&lt;G&gt;::degree_size_type n;
G g;
};
</PRE>
@@ -172,4 +177,4 @@ undirected graphs).
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+10 -10
View File
@@ -1,7 +1,7 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
@@ -9,10 +9,10 @@
<Head>
<Title>Buffer</Title>
</HEAD>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -43,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>
@@ -70,7 +70,7 @@ 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>
@@ -99,7 +99,7 @@ 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="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>
@@ -114,5 +114,5 @@ most linear time complexity in the size of the Generalized Queue.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+9 -9
View File
@@ -1,17 +1,17 @@
<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: ColorValue Concept</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -28,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>
@@ -99,10 +99,10 @@ href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructibl
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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 -7
View File
@@ -1,17 +1,17 @@
<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>DFS Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -149,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>
@@ -203,10 +212,10 @@ class count_tree_edges_dfs_visitor(bgl.Graph.DFSVisitor):
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<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: Dijkstra Visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -80,7 +80,7 @@ the search.
<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>
@@ -213,10 +213,10 @@ class count_tree_edges_dijkstra_visitor(bgl.Graph.DijkstraVisitor):
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>EdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -109,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>
@@ -143,7 +143,7 @@ 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() {
BOOST_CONCEPT_ASSERT(( GraphConcept&lt;G&gt; ));
@@ -181,4 +181,4 @@ must all return in constant time.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -35,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>
@@ -105,4 +105,4 @@ UNDER CONSTRUCTION
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: EventVisitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -152,10 +152,10 @@ either a vertex or edge descriptor of the graph.
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: EventVisitorList</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -118,10 +118,10 @@ std::make_pair(<i>visitor1</i>,
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+15 -15
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -24,7 +24,7 @@ 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. 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>
@@ -51,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>
@@ -61,9 +61,9 @@ 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>
@@ -85,8 +85,8 @@ 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_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>.
</td>
</tr>
@@ -145,4 +145,4 @@ any vertex of graph object which type is <tt>G</tt>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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>IncidenceGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -193,10 +193,10 @@ Therefore, the extra requirement is added that the out-edge connecting
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+12 -12
View File
@@ -1,17 +1,17 @@
<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>IteratorConstructibleGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -22,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 <
@@ -44,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,
@@ -65,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);
@@ -152,10 +152,10 @@ constructor lacking the graph size information.
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+5 -5
View File
@@ -9,7 +9,7 @@
<head>
<title>KeyedUpdatableQueue</title>
</head>
<body>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:KeyedUpdatableQueue">KeyedUpdatableQueue</a></h2>
@@ -28,7 +28,7 @@ values are mapped via a read/write key map.
<h3>Members</h3>
For a type to model the KeyedUpdatableQueue concept it must have the following members
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>
@@ -61,17 +61,17 @@ in addition to the members that are required of types that model <a href="./Upda
{
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;
+1 -1
View File
@@ -41,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
+8 -8
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -33,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>
@@ -113,10 +113,10 @@ Return type: <TT>bool</TT>
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>MutableGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -58,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>
@@ -296,4 +296,4 @@ is no longer a valid vertex descriptor.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+6 -6
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>MutablePropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -147,4 +147,4 @@ Return type: <TT>vertex_descriptor</TT>
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+34 -34
View File
@@ -1,18 +1,18 @@
<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">
<body alink="#ff0000"
bgcolor="#ffffff"
link="#0000ee"
text="#000000"
vlink="#551a8b">
<img src="../../../boost.png" alt="C++ Boost" height="86" width="277">
<br clear="">
@@ -21,12 +21,12 @@
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
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 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.
@@ -36,24 +36,24 @@ map.
<table>
<tbody>
<tr>
<td> <tt>Embedding</tt> </td>
<tr>
<td> <tt>Embedding</tt> </td>
<td> is a type that models the Planar Embedding concept.</td>
</tr>
<tr>
<tr>
<td> <tt>embedding</tt> </td>
<td> is an object of type <tt>Embedding</tt>. </td>
</tr>
<tr>
<td> <tt>Graph</tt> </td>
<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>.
<tr>
<td> <tt>e</tt> </td>
<td> is an object of type <tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>.
</td>
</tr>
@@ -63,7 +63,7 @@ map.
</tt>.</td>
</tr><tr>
<td>
<td>
</td></tr></tbody></table>
@@ -72,12 +72,12 @@ map.
<table border="1">
<tbody><tr>
<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
<td> The iterator type used to iterate over the ordering of the edges in the
planar embedding of a particular vertex
</td>
</tr>
@@ -92,32 +92,32 @@ planar embedding of a particular vertex
<tbody><tr><th>Expression</th><th>Return Type</th><th>Description</th>
</tr><tr>
</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
<td> Returns an iterator to the beginning of the range of edges in the
embedding around vertex v</td>
</tr>
<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
<td> Returns an iterator to the end of the range of edges in the
embedding around vertex v</td>
</tr>
<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>
<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
<td> Adds an edge <tt>e</tt> to the end of the sequence of embedded edges
around the vertex <tt>v</tt> </td>
</tr>
@@ -126,12 +126,12 @@ planar embedding of a particular vertex
</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
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>,
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:
@@ -146,7 +146,7 @@ PlanarEmbedding:
// an instance of Graph in a variable g.
// A typedef for the storage - a vector of vectors of edge descriptors
typedef
typedef
std::vector&lt; std::vector&lt; graph_traits&lt;Graph&gt;::edge_descriptor &gt; &gt;
planar_embedding_storage_t;
@@ -173,6 +173,6 @@ planar_embedding_t planar_embedding(planar_embedding_storage.begin(),
<br>
</p><hr>
Copyright © 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
aaron.windsor@gmail.com</a>)
</body></html>
+19 -19
View File
@@ -1,28 +1,28 @@
<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">
<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
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>
@@ -79,8 +79,8 @@ This is invoked once per traversal, before the traversal begins.
<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.
This is invoked once for each face, before any vertices or edges on the face
are visited.
</td>
</tr>
@@ -108,7 +108,7 @@ This is invoked when an edge is encountered while traversing a face.
<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
This is invoked once for each face, after all vertices and edges on the face
are visited.
</td>
</tr>
@@ -129,13 +129,13 @@ This is invoked once per traversal, after the traversal ends.
<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.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
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
<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
<tt>make_maximal_planar</tt></a> uses a <tt>triangulation_visitor</tt> that is
a model of Planar Face Visitor.
</li>
</ul>
@@ -145,4 +145,4 @@ a model of Planar Face Visitor.
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>PropertyGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -90,7 +90,7 @@ 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/doc/ReadWritePropertyMap.html">ReadWritePropertyMap</a>
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>
@@ -207,4 +207,4 @@ The <tt>get()</tt> property map function must be constant time.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Property</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -67,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>
@@ -114,4 +114,4 @@ type is also required to specialize
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+5 -5
View File
@@ -9,7 +9,7 @@
<head>
<title>UpdatableQueue</title>
</head>
<body>
<body>
<img src="../../../boost.png" alt="C++ Boost">
<h2><a name="concept:UpdatableQueue">UpdatableQueue</a></h2>
@@ -30,7 +30,7 @@
<h3>Members</h3>
For a type to model the UpdatableQueue concept it must have the following members
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>
@@ -59,14 +59,14 @@ in addition to the members that are required of types that model <a href="./Buff
{
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;
};
+7 -7
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>VertexAndEdgeListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -27,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>
@@ -67,4 +67,4 @@ requirements are added.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>VertexListGraph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -118,7 +118,7 @@ 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() {
BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept&lt;G&gt; ));
@@ -151,4 +151,4 @@ groups these requirements together, hence the VertexListGraph concept.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+10 -10
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -28,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>
@@ -37,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>
@@ -56,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>
@@ -64,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>
@@ -79,5 +79,5 @@ No additional associated types.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: Acknowledgements</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -67,10 +67,10 @@ Science of the U.S. Department of Energy.
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+2 -2
View File
@@ -1,7 +1,7 @@
<html>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
@@ -115,7 +115,7 @@ 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:
+23 -23
View File
@@ -1,7 +1,7 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
@@ -86,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>
@@ -214,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);
@@ -247,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);
@@ -281,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>
@@ -397,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>
@@ -407,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>
@@ -418,13 +418,13 @@ href="http://www.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalItera
The type for the iterators returned by <TT>out_edges()</TT>.
When <tt>OutEdgeList=vecS</tt> then the <tt>out_edge_iterator</tt> models
<a href="http://www.sgi.com/tech/stl/RandomAccessIterator.html">
<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>
@@ -459,7 +459,7 @@ and<br>
<br><br>
This describes whether the graph class allows the insertion of
parallel edges (edges with the same source and target). The two tags
are <TT>allow_parallel_edge-_tag</TT> and
are <TT>allow_parallel_edge_tag</TT> and
<TT>disallow_parallel_edge_tag</TT>. The
<TT>setS</TT> and <TT>hash_setS</TT> variants disallow
parallel edges while the others allow parallel edges.
@@ -474,9 +474,9 @@ The type used for dealing with the number of vertices in the graph.
<hr>
<tt>graph_traits&lt;adjacency_list&gt;::edge_size_type</tt><br>
<tt>graph_traits&lt;adjacency_list&gt;::edges_size_type</tt><br>
and<br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::edge_size_type</tt><br>
<tt>adjacency_list_traits&lt;OutEdgeList, VertexList, Directed_list, EdgeList&gt;::edges_size_type</tt><br>
<br><br>
The type used for dealing with the number of edges in the graph.
@@ -578,7 +578,7 @@ adjacency_list(EdgeIterator&nbsp;first, EdgeIterator&nbsp;last,
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
@@ -599,7 +599,7 @@ 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
@@ -836,7 +836,7 @@ add_edge(vertex_descriptor&nbsp;u, vertex_descriptor&nbsp;v,
</pre>
Adds edge <i>(u,v)</i> to the graph and attaches <TT>p</TT> as the
value of the edge's internal property storage. Also see the previous
<TT>add_edge()</TT> member function for more details.
<TT>add_edge()</TT> non-member function for more details.
<hr>
@@ -884,7 +884,7 @@ 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>
@@ -899,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>
@@ -917,7 +917,7 @@ 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
@@ -1127,7 +1127,7 @@ Include <a href="../../../boost/graph/adj_list_serialize.hpp"><tt>boost/graph/ad
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+9 -9
View File
@@ -1,17 +1,17 @@
<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: Graph Traits</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -79,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>
@@ -149,10 +149,10 @@ parallel edges (<tt>disallow_parallel_edge_tag</tt>).
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+33 -33
View File
@@ -1,23 +1,23 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Adjacency Matrix</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<H1><A NAME="sec:adjacency-matrix-class"></A>
<pre>
adjacency_matrix&lt;Directed, VertexProperty,
adjacency_matrix&lt;Directed, VertexProperty,
EdgeProperty, GraphProperty,
Allocator&gt;
</pre>
@@ -61,7 +61,7 @@ href="adjacency_list.html"><tt>adjacency_list</tt></a>. These may be
<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.
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>
@@ -74,7 +74,7 @@ matrix representation of an undirected graph.
<P></P>
<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>
<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>
@@ -83,11 +83,11 @@ matrix representation of an undirected graph.
<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);
@@ -112,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>.
@@ -152,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>
@@ -205,7 +205,7 @@ The output is:
<h3>Model Of</h3>
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./VertexAndEdgeListGraph.html">VertexAndEdgeListGraph</a>,
<a href="./IncidenceGraph.html">Incidence Graph</a>,
<a href="./BidirectionalGraph.html">Bidirectional Graph</a>,
<a
@@ -236,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>
@@ -420,7 +420,7 @@ degree_size_type
out_degree(vertex_descriptor u, const adjacency_matrix&amp; g)
</pre>
Returns the number of edges leaving vertex <tt>u</tt>.<br>
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
(Required by <a href="IncidenceGraph.html">IncidenceGraph</a>.)
<hr>
<hr>
@@ -440,7 +440,7 @@ 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>.)
(Required by <a href="BidirectionalGraph.html">BidirectionalGraph</a>.)
<hr>
<hr>
+7 -7
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -87,10 +87,10 @@ to a goal.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
<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>
</HTML>
+89 -24
View File
@@ -1,17 +1,17 @@
<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">
<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,17 +37,35 @@ template &lt;typename VertexListGraph,
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.sgi.com/tech/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">CombineFunction</a>,
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
@@ -60,13 +78,29 @@ astar_search
CompareFunction compare, CombineFunction combine,
CostInf inf, CostZero zero);
<i>// Version that does not initialize property maps (used for implicit graphs)</i>
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.sgi.com/tech/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">CombineFunction</a>,
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
@@ -82,6 +116,22 @@ astar_search_no_init
<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>
@@ -125,7 +175,8 @@ useful for searching large state spaces -- in game-playing scenarios
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> must be used for implicit graphs; the basic
<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
@@ -134,8 +185,9 @@ href="IncidenceGraph.html">Incidence Graph</a> concept.
</P>
<P>
This implementation of A* is based on an OPEN/CLOSED list formulation
of the algorithm. Vertices on the OPEN list have been ``discovered''
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
@@ -146,7 +198,11 @@ 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.
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>
@@ -253,7 +309,7 @@ IN: <tt>const VertexListGraph&amp; g</tt>
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
<tt>IncidenceGraph</tt> must be a model of the
<a href="IncidenceGraph.html">Incidence Graph</a>
concept.
</blockquote>
@@ -292,7 +348,8 @@ IN: <tt>weight_map(WeightMap w_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
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
@@ -337,8 +394,11 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
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.sgi.com/tech/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></a>
provided by the <tt>compare</tt> function object.<br>
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
@@ -355,16 +415,20 @@ UTIL/OUT: <tt>rank_map(CostMap c_map)</tt>
<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>. The vertex descriptor type of the graph
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.sgi.com/tech/stl/StrictWeakOrdering.html"><tt>StrictWeakOrdering</tt></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.<br>
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
@@ -375,7 +439,8 @@ UTIL/OUT: <tt>rank_map(CostMap 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
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
@@ -401,7 +466,7 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
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.sgi.com/tech/stl/BinaryPredicate.html"><tt>Binary
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>
@@ -416,7 +481,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
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.sgi.com/tech/stl/BinaryFunction.html"><tt>Binary
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>
@@ -515,10 +580,10 @@ this state by pointer or reference.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
<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>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -99,10 +99,10 @@ and <a href="./property_writer.html"><tt>property_writer</tt></a>.
<TABLE>
<TR valign=top>
<TD nowrap>Copyright &copy; 2004</TD><TD>
<A HREF="http://www.cs.rpi.edu/~beevek/">Kristopher Beevers</A>,
<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>
</HTML>
+6 -6
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Bandwidth</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -90,4 +90,4 @@ of the i-th bandwidths <i>B<sub>i</sub>(G)</i>.<br>
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+12 -12
View File
@@ -1,7 +1,7 @@
<!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)
@@ -18,7 +18,7 @@
<div class="titlepage"></div>
<div class="refnamediv">
<IMG SRC="../../../boost.png"
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<h1><img src="figs/python.gif" alt="(Python)"/><span class="refentrytitle">Function
@@ -36,23 +36,23 @@ clustering based on edge betweenness centrality.</p>
<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,
"bold"><b>typename</b></span> EdgeCentralityMap,
<span class=
"bold"><b>typename</b></span> VertexIndexMap&gt;
"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,
"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;
"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,
"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;
"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>
@@ -108,7 +108,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote>
IN: <tt>VertexIndexMap vertex_index</tt>
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
@@ -120,7 +120,7 @@ IN: <tt>VertexIndexMap vertex_index</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
@@ -142,7 +142,7 @@ IN: <tt>VertexIndexMap vertex_index</tt>
<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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</a>, Indiana
<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>
+29 -29
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Bellman Ford Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -24,7 +24,7 @@
<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(const EdgeListGraph&amp; g, Size N,
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;
@@ -34,10 +34,10 @@ bool bellman_ford_shortest_paths(const VertexAndEdgeListGraph&amp; g,
<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
@@ -77,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>
@@ -91,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>
@@ -115,19 +115,19 @@ otherwise.
<pre>
BELLMAN-FORD(<i>G</i>)
<i>// Optional initialization</i>
<b>for</b> each vertex <i>u in V</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>)
@@ -148,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>
@@ -175,7 +175,7 @@ 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>. If a root vertex is
@@ -211,7 +211,7 @@ IN: <tt>weight_map(WeightMap w)</tt>
<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>
@@ -227,7 +227,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<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
@@ -236,7 +236,7 @@ IN/OUT: <tt>distance_map(DistanceMap d)</tt>
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><br>
<b>Python</b>: Must be a <tt>vertex_double_map</tt> for the graph.<br>
@@ -307,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
@@ -330,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
@@ -346,4 +346,4 @@ href="../example/bellman-example.cpp"><TT>examples/bellman-example.cpp</TT></a>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: bellman_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -102,10 +102,10 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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 -26
View File
@@ -2,7 +2,7 @@
<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)
@@ -12,54 +12,54 @@
</head>
<body>
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<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
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
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap, typename EdgeCentralityMap&gt;
void
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 IncomingMap, typename DistanceMap, typename DependencyMap,
typename PathCountMap, typename VertexIndexMap&gt;
void
void
brandes_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map,
EdgeCentralityMap edge_centrality,
IncomingMap incoming,
DistanceMap distance, DependencyMap dependency,
PathCountMap path_count,
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
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,
IncomingMap incoming,
DistanceMap distance, DependencyMap dependency,
PathCountMap path_count,
PathCountMap path_count,
VertexIndexMap vertex_index,
WeightMap weight_map);
<em>// helper functions</em>
template&lt;typename Graph, typename CentralityMap&gt;
void
void
relative_betweenness_centrality(const Graph&amp; g, CentralityMap centrality_map);
template&lt;typename Graph, typename CentralityMap&gt;
@@ -137,8 +137,8 @@ IN: <tt>const Graph&amp; g</tt>
<b>Python</b>: The parameter is named <tt>graph</tt>.
</blockquote>
UTIL: <tt>IncomingMap incoming</tt>
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
@@ -155,7 +155,7 @@ UTIL: <tt>IncomingMap incoming</tt>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>DistanceMap distance_map</tt>
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
@@ -178,7 +178,7 @@ UTIL: <tt>DistanceMap distance_map</tt>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>DependencyMap dependency</tt>
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
@@ -198,7 +198,7 @@ UTIL: <tt>DependencyMap dependency</tt>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL: <tt>PathCountMap path_count</tt>
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>
@@ -254,7 +254,7 @@ OUT/UTIL: <tt>EdgeCentralityMap edge_centrality_map</tt>
<b>Python default</b>: <tt>graph.get_edge_double_map("centrality")</tt>
</blockquote>
IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
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
@@ -266,16 +266,16 @@ IN: <tt>vertex_index_map(VertexIndexMap vertex_index)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
</blockquote>
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 weights
must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></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
@@ -286,7 +286,7 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
<b>Python</b>: If supplied, must be an <tt>edge_double_map</tt> for the graph.
</blockquote>
<h3>Complexity</h3>
<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>.
@@ -297,7 +297,7 @@ is <em>O(VE)</em>.
<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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+9 -9
View File
@@ -1,17 +1,17 @@
<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: bfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -38,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>
@@ -119,10 +119,10 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+9 -9
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Named Parameters</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -38,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>
@@ -54,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]));
@@ -66,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));
@@ -87,7 +87,7 @@ like <tt>boost::weight_map</tt> that create an instance of
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+26 -11
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Bibliography</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -148,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.
@@ -264,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>
@@ -330,7 +330,7 @@ BIT, 10, 1970, pp. 76-94.
<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
<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.
@@ -347,7 +347,7 @@ 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.
Information Processing Letters, 31, pp. 7-15, 1989.
<p></p><dt><a name="fruchterman91">58</a>
<dd>T. Fruchterman and E. Reingold<br>
@@ -438,8 +438,23 @@ 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>
@@ -449,4 +464,4 @@ ACM Symposium on the Theory of Computing, pp. 296-303, 1996.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+19 -19
View File
@@ -1,21 +1,21 @@
<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">
<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 +25,7 @@
<A NAME="sec:biconnected-components">biconnected_components
</A>
</TT>
and
and
<tt>articulation_points</tt>
</h1>
@@ -34,25 +34,25 @@ and
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,
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,
biconnected_components(const Graph& g, ComponentMap comp,
const bgl_named_params&lt;P, T, R&gt;&amp; params)
template &lt;typename Graph, typename OutputIterator,
template &lt;typename Graph, typename OutputIterator,
typename P, typename T, typename R&gt;
OutputIterator articulation_points(const Graph& g, OutputIterator out,
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,
biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out,
DiscoverTimeMap discover_time, LowPointMap lowpt);
template &lt;typename Graph, typename ComponentMap, typename OutputIterator&gt;
@@ -121,7 +121,7 @@ records which component each edge in the graph belongs to by
recording the component number in the component property map. The
<tt>ComponentMap</tt> type must be a model of <a
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
Map</a>. The value type shouch be an integer type, preferably the same
Map</a>. The value type should be an integer type, preferably the same
as the <tt>edges_size_type</tt> of the graph. The key type must be
the graph's edge descriptor type.<br>
<b>Default</b>: <tt>dummy_property_map</tt>.<br>
@@ -142,10 +142,10 @@ points.
<h3>Named Parameters</h3>
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>. The type
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
@@ -192,9 +192,9 @@ UTIL/OUT: <tt>lowpoint_map(LowPointMap lowpt)</tt>
<b>Python</b>: Unsupported parameter.
</blockquote>
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
UTIL/OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<blockquote>
The predecessor map records the depth first search tree.
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
@@ -241,7 +241,7 @@ articulation points of an undirected graph.
<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
@@ -260,4 +260,4 @@ HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+2 -2
View File
@@ -5,7 +5,7 @@
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{latexsym}
\usepackage{latexsym}
\usepackage{jweb}
\usepackage{times}
\usepackage{graphicx}
@@ -358,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:
+92 -92
View File
@@ -1,39 +1,39 @@
<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">
<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
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
<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
<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>
@@ -44,16 +44,16 @@ appear in the planar embedding.
</table>
<br>
<p>
The function <tt>boyer_myrvold_planarity_test</tt> implements the planarity
testing/embedding algorithm of Boyer and Myrvold
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
<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
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>
<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>
@@ -65,8 +65,8 @@ bool is_planar = boyer_myrvold_planarity_test(g);
<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,
if (boyer_myrvold_planarity_test(boyer_myrvold_params::graph = g,
boyer_myrvold_params::embedding = embedding_pmap,
boyer_myrvold_params::kuratowski_subgraph = out_itr
)
)
@@ -81,81 +81,81 @@ else
</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.
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
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
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
<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
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
<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
<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
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
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
<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
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.
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.
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
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>
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
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> 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>
@@ -170,8 +170,8 @@ deterministic process which is described in the documentation to
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
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>
@@ -184,7 +184,7 @@ Must model the <a href="PlanarEmbedding.html">PlanarEmbedding</a> concept.
IN <tt>OutputIterator kuratowski_subgraph</tt>
<blockquote>
An OutputIterator which accepts values of the type
An OutputIterator which accepts values of the type
<tt>graph_traits&lt;Graph&gt;::edge_descriptor</tt>
</blockquote>
@@ -192,7 +192,7 @@ 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
</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>
@@ -201,21 +201,21 @@ 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
</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
<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
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>.
@@ -224,9 +224,9 @@ exception is when Kuratowski subgraph isolation is requested for a dense graph
<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
<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
<li><a href="../example/straight_line_drawing.cpp">Using a planar embedding to
create a straight line drawing</a>
</ul>
@@ -237,17 +237,17 @@ create a straight line drawing</a>
<h3>Notes</h3>
<p><a name="1">[1] A planar embedding is also called a <i>combinatorial
<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
<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
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>.
@@ -256,4 +256,4 @@ graph to <tt>boyer_myrvold_planarity_test</tt>.
Copyright &copy; 2007 Aaron Windsor (<a href="mailto:aaron.windsor@gmail.com">
aaron.windsor@gmail.com</a>)
</BODY>
</HTML>
</HTML>
+4 -4
View File
@@ -109,7 +109,7 @@ noticeably increase the performance.</P>
<B>Algorithm description:</B><BR>The Boykov-Kolmogorov max-flow (or often
BK max-flow) algorithm is a variety of the augmenting-path algorithm. Standard
augmenting path algorithms find shortest paths from source to sink vertex and
augment them by substracting the bottleneck capacity found on that path from the
augment them by subtracting the bottleneck capacity found on that path from the
residual capacities of each edge and adding it to the total flow. Additionally
the minimum capacity is added to the residual capacity of the reverse edges. If
no more paths in the residual-edge tree are found, the algorithm terminates.
@@ -137,7 +137,7 @@ a path from source to sink is found.</P>
<P><I>augment-phase</I>: This phase augments the path that was found
in the grow phase. First it finds the bottleneck capacity of the
found path, and then it updates the residual-capacity of the edges
from this path by substracting the bottleneck capacity from the
from this path by subtracting the bottleneck capacity from the
residual capacity. Furthermore the residual capacity of the reverse
edges are updated by adding the bottleneck capacity. This phase can
destroy the built up search trees, as it creates at least one
@@ -338,8 +338,8 @@ main()
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 (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
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;
+41 -41
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -24,15 +24,15 @@
<PRE>
<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,
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 Graph, class Buffer, class BFSVisitor,
template &lt;class Graph, class Buffer, class BFSVisitor,
class ColorMap&gt;
void breadth_first_search(const Graph&amp; g,
typename graph_traits&lt;Graph&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>
@@ -70,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
@@ -99,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>
@@ -223,7 +223,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
@@ -244,7 +244,7 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
<b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph.
</blockquote>
</blockquote>
<H3><A NAME="SECTION001330300000000000000">
@@ -252,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>
@@ -260,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
@@ -275,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
@@ -305,7 +305,7 @@ The example in <a
href="../example/bfs-example.cpp"><TT>example/bfs-example.cpp</TT></a>
demonstrates using the BGL Breadth-first search algorithm on the graph
from <A HREF="./graph_theory_review.html#fig:bfs-example">Figure
5</A>. The file
6</A>. The file
<a href="../example/bfs-example2.cpp"><TT>example/bfs-example2.cpp</TT></a>
contains the same example, except that the <tt>adacency_list</tt>
class used has <tt>VertexList</tt> and <tt>EdgeList</tt> set
@@ -319,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
@@ -335,4 +335,4 @@ to <tt>listS</tt>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+18 -18
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -22,14 +22,14 @@
<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>
@@ -110,7 +110,7 @@ UTIL: <tt>buffer(Buffer&amp; Q)</tt>
<b>Python</b>: The buffer must derive from the <a
href="./Buffer.html">Buffer</a> type for the graph.
</blockquote>
</blockquote>
<H3><A NAME="SECTION001330300000000000000">
@@ -118,7 +118,7 @@ Complexity</A>
</H3>
<P>
The time complexity is <i>O(E)</i>.
The time complexity is <i>O(E)</i>.
<P>
@@ -129,7 +129,7 @@ The time complexity is <i>O(E)</i>.
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
@@ -138,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
@@ -167,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
@@ -183,4 +183,4 @@ The time complexity is <i>O(E)</i>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+1 -1
View File
@@ -93,7 +93,7 @@ typedef boost::adjacency_list&lt;
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_length_t, double,
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;
+13 -13
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Challenge</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -37,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>
@@ -61,12 +61,12 @@ polygons.</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>
@@ -117,4 +117,4 @@ It is currently difficult to use from a C++ program.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+5 -5
View File
@@ -1,14 +1,14 @@
<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.
<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>
@@ -45,7 +45,7 @@ IN: <tt>Radius radius</tt>
<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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
Indiana University (lums -at- osl.iu.edu)
</TD></TR></TABLE>
</body></html>
View File
+34 -34
View File
@@ -2,7 +2,7 @@
<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)
@@ -32,12 +32,12 @@ function address(host, user) {
</script>
</head>
<body>
<IMG SRC="../../../boost.png"
<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
@@ -101,8 +101,8 @@ function address(host, user) {
<pre>
namespace boost {
template&lt;typename <a href="#Directed">Directed</a> = directedS, typename <a href="#VertexProperty">VertexProperty</a> = void,
typename <a href="#EdgeProperty">EdgeProperty</a> = void, typename <a href="#GraphProperty">GraphProperty</a> = no_property,
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
{
@@ -173,7 +173,7 @@ public:
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);
edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
@@ -202,17 +202,17 @@ public:
<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;
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;
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;
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>
@@ -227,7 +227,7 @@ edges_size_type num_edges(const compressed_sparse_row_graph&amp;);
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;
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;);
@@ -283,7 +283,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<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
@@ -416,7 +416,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
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.sgi.com/tech/stl/InputIterator.html">InputIterator</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,
@@ -448,7 +448,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
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.sgi.com/tech/stl/InputIterator.html">InputIterator</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
@@ -532,13 +532,13 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<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.sgi.com/tech/stl/InputIterator.html">InputIterator</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> preceed any edges originating from all
from vertex <i>i</i> precede any edges originating from all
vertices <i>j</i> where <i>j &gt; i</i>.
</p>
@@ -572,7 +572,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
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.sgi.com/tech/stl/InputIterator.html">InputIterator</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
@@ -628,7 +628,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
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);
edges_size_type numedges);
template&lt;typename Graph, typename VertexIndexMap&gt;
compressed_sparse_row_graph(const Graph&amp; g, const VertexIndexMap&amp; vi);
@@ -666,14 +666,14 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<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>
@@ -726,7 +726,7 @@ void <a href="#add_edges_sorted_prop">add_edges_sorted</a>(BidirectionalIterator
<a name="edge-access"></a><h3>Edge access</h3>
<pre><a name="edge"></a>
std::pair&lt;edge_descriptor, bool&gt;
std::pair&lt;edge_descriptor, bool&gt;
edge(vertex_descriptor u, vertex_descriptor v, const compressed_sparse_row_graph&amp;);
</pre>
@@ -766,7 +766,7 @@ 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
@@ -816,7 +816,7 @@ get_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag);
<p class="indent">
Return the property specified by <tt>GraphPropertyTag</tt> that
is attached to the graph object <tt>g</tt>.
is attached to the graph object <tt>g</tt>.
</p>
<hr></hr>
@@ -840,11 +840,11 @@ void set_property(const compressed_sparse_row_graph&amp; g, GraphPropertyTag,
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.sgi.com/tech/stl/InputIterator.html">InputIterator</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.
@@ -856,13 +856,13 @@ void add_edges(InputIterator first, InputIterator last, compressed_sparse_row_gr
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.sgi.com/tech/stl/InputIterator.html">InputIterator</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
@@ -876,11 +876,11 @@ void add_edges(InputIterator first, InputIterator last, EPIter ep_first, EPIter
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.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</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
@@ -893,12 +893,12 @@ void add_edges_sorted(BidirectionalIterator first, BidirectionalIterator last, c
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.sgi.com/tech/stl/BidirectionalIterator.html">BidirectionalIterator</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
@@ -950,7 +950,7 @@ BGL_FORALL_VERTICES(v, g, WebGraph)
// 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
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>
@@ -964,7 +964,7 @@ BGL_FORALL_EDGES(e, g, WebGraph)
<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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
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="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -75,7 +75,7 @@ records which component each vertex in the graph belongs to by
recording the component number in the component property map. The
<tt>ComponentMap</tt> type must be a model of <a
href="../../property_map/doc/WritablePropertyMap.html">Writable Property
Map</a>. The value type shouch be an integer type, preferably the same
Map</a>. The value type should be an integer type, preferably the same
as the <tt>vertices_size_type</tt> of the graph. The key type must be
the graph's vertex descriptor type.<br>
@@ -117,7 +117,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
@@ -154,4 +154,4 @@ undirected graph.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+16 -16
View File
@@ -1,17 +1,17 @@
<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: Constructing Graph Algorithms</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -113,7 +113,7 @@ color of all the vertices to "uncolored."
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;
@@ -127,27 +127,27 @@ namespace boost {
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
@@ -174,10 +174,10 @@ namespace boost {
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+10 -10
View File
@@ -1,24 +1,24 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Copy Graph</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
<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>
@@ -52,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>
@@ -62,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>
@@ -80,7 +80,7 @@ integers in the half-open range <tt>[0,num_vertices(G))</tt>.<br>
<b>Default:</b> <tt>get(vertex_index, G)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
@@ -113,4 +113,4 @@ The time complexity is <i>O(V + E)</i>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+31 -31
View File
@@ -1,19 +1,19 @@
<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>
<Head>
<Title>Boost Graph Library: Cuthill-Mckee Ordering</Title>
</Head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -46,25 +46,25 @@
OutputIterator
cuthill_mckee_ordering(const IncidenceGraph&amp; g,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
OutputIterator inverse_permutation,
OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
(2)
template &lt;class VertexListGraph, class OutputIterator&gt;
OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation);
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,
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
VertexIndexMap index_map);
template &lt;class VertexListGraph, class OutputIterator,
class ColorMap, class DegreeMap&gt;
OutputIterator
cuthill_mckee_ordering(const VertexListGraph&amp; g, OutputIterator inverse_permutation,
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;
@@ -72,7 +72,7 @@
cuthill_mckee_ordering(const IncidenceGraph&amp; g,
std::deque&lt; typename
graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor &gt; vertex_queue,
OutputIterator inverse_permutation,
OutputIterator inverse_permutation,
ColorMap color, DegreeMap degree)
</pre>
@@ -92,10 +92,10 @@ increasing degree.
<p>
Version 1 of the algorithm lets the user choose the ``starting
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
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>
@@ -140,7 +140,7 @@ 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>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
@@ -149,13 +149,13 @@ For version 1:
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
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>
@@ -171,13 +171,13 @@ 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> 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.<br>
<b>Python</b>: This parameter is unused in Python. The new vertex
@@ -198,7 +198,7 @@ For version 3:
<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>.<br>
<b>Python</b>: The parameter is named <tt>graph</tt>.
@@ -207,13 +207,13 @@ For version 3:
The deque containing the starting vertices for each component.<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
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>
@@ -245,4 +245,4 @@ and <tt>degree_property_map</tt> in <tt>boost/graph/properties.hpp</tt>.
</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 -->
+39 -39
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Directed Acyclic Graph Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -30,21 +30,21 @@ 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
@@ -74,7 +74,7 @@ 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}.<br>
@@ -82,7 +82,7 @@ IN: <tt>const VertexListGraph&amp; g</tt>
<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.<br>
@@ -92,7 +92,7 @@ IN: <tt>vertex_descriptor s</tt>
<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
@@ -106,7 +106,7 @@ IN: <tt>weight_map(WeightMap w_map)</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
@@ -118,13 +118,13 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.<br>
<b>Python</b>: Unsupported parameter.
</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>
@@ -139,7 +139,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<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
@@ -147,13 +147,13 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
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.
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
@@ -166,12 +166,12 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<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>
@@ -182,11 +182,11 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
<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
@@ -199,7 +199,7 @@ IN: <tt>distance_combine(CombineFunction cmb)</tt>
<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>.
@@ -209,7 +209,7 @@ IN: <tt>distance_inf(D inf)</tt>
<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
@@ -220,7 +220,7 @@ IN: <tt>distance_zero(D zero)</tt>
<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
@@ -242,13 +242,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
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><br>
@@ -272,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.
@@ -306,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
@@ -322,5 +322,5 @@ algorithm.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
Executable → Regular
View File
+30 -24
View File
@@ -1,17 +1,17 @@
<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: Depth-First Search</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -31,7 +31,7 @@ template &lt;class Graph, class <a href="DFSVisitor.html">DFSVisitor</a>, class
void depth_first_search(const Graph&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,
void depth_first_search(const Graph&amp; g, DFSVisitor vis, ColorMap color,
typename graph_traits&lt;Graph&gt;::vertex_descriptor start)
</PRE>
@@ -84,32 +84,33 @@ 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>) <br>
DFS-VISIT(<i>G</i>, <i>u</i>)
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">
@@ -140,6 +141,8 @@ examine edge <i>(u,v)</i>
-
<i>(u,v)</i> is a cross or forward edge
-
finish edge <i>(u,v)</i>
-
finish vertex <i>u</i>
-
</pre>
@@ -249,24 +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.
<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
@@ -289,7 +295,7 @@ The example in <a href="../example/dfs-example.cpp">
<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,10 +311,10 @@ The example in <a href="../example/dfs-example.cpp">
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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 -11
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Depth-First Visit</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -25,13 +25,13 @@
<PRE>
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,
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,
typename graph_traits&lt;IncidenceGraph&gt;::vertex_descriptor s,
DFSVisitor&amp; vis, ColorMap color, TerminatorFunc func = TerminatorFunc())
</PRE>
@@ -41,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
@@ -124,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
@@ -141,4 +141,4 @@ Time complexity is <i>O(E)</i>.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+7 -7
View File
@@ -1,17 +1,17 @@
<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: dfs_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -102,10 +102,10 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+53 -51
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: Dijkstra's Shortest Paths</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -29,14 +29,14 @@ dijkstra_shortest_paths(Graph&amp; g,
const bgl_named_params&lt;P, T, R&gt;&amp; params);
<i>// non-named parameter version</i>
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">CompareFunction</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">CombineFunction</a>,
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 Graph&amp; g,
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
PredecessorMap predecessor, DistanceMap distance, WeightMap weight,
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>)
@@ -123,12 +123,12 @@ indicated by the labels on the right.
<pre>
DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</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>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>)
@@ -136,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>
@@ -188,17 +188,17 @@ finish vertex <i>u</i>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; g</tt>
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
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.<br>
@@ -208,11 +208,11 @@ IN: <tt>vertex_descriptor s</tt>
<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 weights
must all be non-negative, and the algorithm will throw a
<a href="./exception.html#negative_edge"><tt>negative_edge</tt></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
@@ -225,13 +225,13 @@ IN: <tt>weight_map(WeightMap w_map)</tt>
<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&nbsp;[<A
HREF="bibliography.html#driscoll88">61</A>] when an edge is relaxed.
The type
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
@@ -239,17 +239,17 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
<b>Python</b>: Unsupported parameter.
</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 shortest path tree, the tree computed
by the traversal of the graph. Upon completion of the algorithm, the edges
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
@@ -266,7 +266,7 @@ OUT: <tt>predecessor_map(PredecessorMap p_map)</tt>
<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
@@ -274,13 +274,13 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
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.
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>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
@@ -293,12 +293,12 @@ UTIL/OUT: <tt>distance_map(DistanceMap d_map)</tt>
<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>
@@ -309,34 +309,36 @@ IN: <tt>distance_compare(CompareFunction cmp)</tt>
<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
<tt>WeightMap</tt> property map. The result type must be the same
type as the distance value type.<br>
<b>Default:</b> <tt>closed_plus&lt;D&gt;</tt> with
<b>Default:</b> <tt>std::plus&lt;D&gt;</tt> with
<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>
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
@@ -348,7 +350,7 @@ IN: <tt>distance_zero(D zero)</tt>
<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
@@ -369,13 +371,13 @@ UTIL/OUT: <tt>color_map(ColorMap c_map)</tt>
<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><br>
@@ -402,22 +404,22 @@ The time complexity is <i>O(V log V + E)</i>.
<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).
@@ -433,7 +435,7 @@ See <a href="../example/dijkstra-example.cpp">
<TT>example/dijkstra-example.cpp</TT></a> for an example of using Dijkstra's
algorithm.
<H3>See also</H3> <a href="dijkstra_shortest_paths_no_color_map.html">dijkstra_shortest_paths_no_color_map</a> for a version of dijkstra's shortest path that does not use a color map.
<H3>See also</H3> <a href="dijkstra_shortest_paths_no_color_map.html">dijkstra_shortest_paths_no_color_map</a> for a version of Dijkstra's shortest path that does not use a color map.
<H3>Notes</H3>
@@ -443,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
@@ -459,4 +461,4 @@ distance less than infinity.
</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+60 -64
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -27,29 +27,29 @@ 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>,
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">DistanceWeightCombine</a>,
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,
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>,
template &lt;typename Graph, typename <a href="DijkstraVisitor.html">DijkstraVisitor</a>,
typename PredecessorMap, typename DistanceMap,
typename WeightMap, typename VertexIndexMap, typename <a href="http://www.sgi.com/tech/stl/BinaryPredicate.html">DistanceCompare</a>, typename <a href="http://www.sgi.com/tech/stl/BinaryFunction.html">DistanceWeightCombine</a>,
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,
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);
@@ -69,7 +69,7 @@ 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.
<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>
@@ -116,23 +116,20 @@ 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> <b>(This loop is not run in dijkstra_shortest_paths_no_color_map_no_init)</b>
<i>d[u] := infinity</i>
<i>p[u] := u</i>
<b>end for</b>
<i>d[s] := 0</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>
DECREASE-KEY(<i>Q</i>, <i>v</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>if</b> (<i>d[v]</i> was originally infinity)
INSERT(<i>Q</i>, <i>v</i>)
<b>end for</b>
<b>end while</b>
return (<i>d</i>, <i>p</i>)
@@ -141,10 +138,6 @@ DIJKSTRA(<i>G</i>, <i>s</i>, <i>w</i>)
<td valign="top">
<pre>
initialize vertex <i>u</i>
discover vertex <i>s</i>
@@ -154,10 +147,11 @@ examine edge <i>(u,v)</i>
edge <i>(u,v)</i> relaxed
discover vertex <i>v</i>
edge <i>(u,v)</i> not relaxed
discover vertex <i>v</i>
finish vertex <i>u</i>
</pre>
</td>
@@ -170,15 +164,15 @@ finish vertex <i>u</i>
<h3>Parameters</h3>
IN: <tt>const Graph&amp; graph</tt>
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
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>
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>
@@ -186,11 +180,11 @@ IN: <tt>vertex_descriptor start_vertex</tt>
<h3>Named Parameters</h3>
IN: <tt>weight_map(WeightMap weight_map)</tt>
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>
<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
@@ -200,13 +194,13 @@ IN: <tt>weight_map(WeightMap weight_map)</tt>
<b>Default:</b> <tt>get(edge_weight, graph)</tt><br>
</blockquote>
IN: <tt>index_map(VertexIndexMap index_map)</tt>
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
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
@@ -214,12 +208,12 @@ IN: <tt>index_map(VertexIndexMap index_map)</tt>
<b>Default:</b> <tt>get(vertex_index, graph)</tt>.
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
<br>
</blockquote>
OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt>
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>
@@ -235,7 +229,7 @@ OUT: <tt>predecessor_map(PredecessorMap predecessor_map)</tt>
<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>
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
@@ -243,13 +237,13 @@ UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
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.
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.sgi.com/tech/stl/StrictWeakOrdering.html">
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
@@ -260,12 +254,12 @@ UTIL/OUT: <tt>distance_map(DistanceMap distance_map)</tt>
map.<br>
</blockquote>
IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
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.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>
@@ -274,11 +268,11 @@ IN: <tt>distance_compare(CompareFunction distance_compare)</tt>
property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote>
IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
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.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
@@ -289,15 +283,17 @@ IN: <tt>distance_combine(CombineFunction distance_weight_combine)</tt>
<tt>D=typename property_traits&lt;DistanceMap&gt;::value_type</tt><br>
</blockquote>
IN: <tt>distance_inf(D distance_infinity)</tt>
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>.<br>
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>
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
@@ -306,13 +302,13 @@ IN: <tt>distance_zero(D distance_zero)</tt>
<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>
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><br>
@@ -334,19 +330,19 @@ The time complexity is <i>O(V log V + E)</i>.
<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> 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>
@@ -362,7 +358,7 @@ The time complexity is <i>O(V log V + E)</i>.
See <a href="../example/dijkstra-no-color-map-example.cpp">
<TT>example/dijkstra-no-color-map-example.cpp</TT></a> for an example of using Dijkstra's algorithm.
<H3>See also</H3> <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a> for a version of dijkstra's shortest path that uses a color map.
<H3>See also</H3> <a href="dijkstra_shortest_paths.html">dijkstra_shortest_paths</a> for a version of Dijkstra's shortest path that uses a color map.
<H3>Notes</H3>
@@ -374,17 +370,17 @@ 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
passed in. Therefore you may want the visitor to hold this state by
pointer or reference.
<p><a name="3">[3]</a>
<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>
<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>
@@ -395,4 +391,4 @@ distance less than infinity.
Trustees of Indiana University</TD></TR></TABLE>
</BODY>
</HTML>
</HTML>
+8 -8
View File
@@ -1,17 +1,17 @@
<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: dijkstra_visitor</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -37,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()))));
@@ -116,10 +116,10 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+8 -8
View File
@@ -1,17 +1,17 @@
<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: distance_recorder</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -124,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>
@@ -167,13 +167,13 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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.
<!-- King, I.P. An automatic reordering scheme for simultaneous equations derived from network analysis. Int. J. Numer. Methods Engrg. 2 (1970), 523-533 -->
<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/king_ordering.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>
+13 -13
View File
@@ -1,17 +1,17 @@
<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 List Class</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -52,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,
@@ -61,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;
@@ -104,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>
@@ -145,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>
@@ -212,10 +212,10 @@ Returns the target vertex of edge <TT>e</TT>.
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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
+7 -7
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -182,13 +182,13 @@ and <a href="./property_writer.html"><tt>property_writer</tt></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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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: PredEdgeMap EventTag EventVisitor map bfs dfs const
-->
<!-- LocalWords: EventVisitorList WritablePropertyMap Siek Univ Quan
+15 -15
View File
@@ -1,17 +1,17 @@
<HTML>
<!--
Copyright (c) Jeremy Siek 2000
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<Head>
<Title>Boost Graph Library: 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">
<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,20 +23,20 @@
<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,
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="./Graph.html">Graph</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
edmonds_karp_max_flow(Graph&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>
@@ -48,7 +48,7 @@ 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
@@ -112,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>
@@ -129,7 +129,7 @@ IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
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
@@ -195,7 +195,7 @@ IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
<b>Default:</b> <tt>get(vertex_index, g)</tt>
Note: if you use this default, make sure your graph has
an internal <tt>vertex_index</tt> property. For example,
<tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
<tt>adjacency_list</tt> with <tt>VertexList=listS</tt> does
not have an internal <tt>vertex_index</tt> property.
</blockquote>
@@ -228,7 +228,7 @@ from a file in the DIMACS format and computes the maximum flow.
</TD></TR></TABLE>
</BODY>
</HTML>
</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
+78 -60
View File
@@ -30,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 boost::report_errors();
test_isomorphism();
return boost::report_errors();
}
+9 -9
View File
@@ -1,11 +1,11 @@
<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
@@ -24,10 +24,10 @@ function address(host, user) {
</script>
</head>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<tt>erdos_renyi_iterator</tt>
@@ -57,7 +57,7 @@ public:
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
@@ -144,9 +144,9 @@ int main()
<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="http://www.osl.iu.edu/~lums">Andrew Lumsdaine</A>,
<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>
</HTML>
+5 -5
View File
@@ -1,17 +1,17 @@
<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">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
+11 -11
View File
@@ -1,17 +1,17 @@
<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: FAQ</Title>
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
ALINK="#ff0000">
<IMG SRC="../../../boost.png"
ALT="C++ Boost" width="277" height="86">
<BR Clear>
@@ -76,8 +76,8 @@ 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>
<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!
@@ -115,7 +115,7 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
// 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>
@@ -124,13 +124,13 @@ library. OO was hip in the 80s and 90s, but its time we moved beyond!
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>
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Inches
Letter
Letter
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Inches
Letter
Letter
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Inches
Letter
Letter
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Inches
Letter
Letter
100.00
Single
-2

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