Compare commits

...

44 Commits

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

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

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

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

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

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

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

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

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

See https://github.com/boostorg/graph/issues/268 .
2021-07-02 14:17:27 +01:00
Viktor T bb4fbd6494 Resolves #260 by removing call to combine from astar_search_no_init_tree 2021-06-04 00:01:17 +03:00
Viktor T 64aa4a822a Resolves #261 by replacing child() with first_child() 2021-06-03 02:14:43 +03:00
19 changed files with 335 additions and 164 deletions
+25 -26
View File
@@ -51,7 +51,6 @@ def main(ctx):
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),
@@ -128,36 +127,36 @@ def main(ctx):
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),
# We don't support these old versions of Xcode any more, but you are welcome to take up the challenge for doing so if you need them.
# osx_cxx("XCode-10.2 03", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 11", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 14", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 17", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '17', }, globalenv=globalenv),
# osx_cxx("XCode-10.2 2a", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '2a', }, globalenv=globalenv),
osx_cxx("XCode-9.4 03", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
osx_cxx("XCode-9.4 11", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
osx_cxx("XCode-9.4 14", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '14', }, globalenv=globalenv),
osx_cxx("XCode-9.4 1z", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '1z', }, globalenv=globalenv),
# osx_cxx("XCode-9.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-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.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-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),
# osx_cxx("XCode-7.3 03", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03', }, globalenv=globalenv),
# osx_cxx("XCode-7.3 11", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '11', }, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci
+47 -4
View File
@@ -12,7 +12,9 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [ g++-9, g++-10, clang++-10 ]
# Removed g++-10 because of an ICE; meant to be fixed in 10.2?
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94938
compiler: [ g++-9, clang++-10 ]
steps:
- uses: actions/checkout@v2
with:
@@ -27,7 +29,7 @@ jobs:
- 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
run: sudo apt install g++-9 clang-10
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
@@ -140,7 +142,7 @@ jobs:
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
runs-on: windows-2019
defaults:
run:
shell: cmd
@@ -181,7 +183,7 @@ jobs:
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
runs-on: windows-2019
defaults:
run:
shell: cmd
@@ -221,3 +223,44 @@ jobs:
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.2
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_3:
runs-on: windows-2022
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
toolset: [ msvc-14.3 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info
run: ..\..\..\b2 print_config_info cxxstd=14,17,20 address-model=64 toolset=msvc-14.3
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17,20 toolset=msvc-14.3
working-directory: ../boost-root/libs/graph/test
+2 -1
View File
@@ -87,7 +87,8 @@ This describes the ways in which the vertices and edges of the
graph can be visited. The choices are <TT>incidence_graph_tag</TT>,
<TT>adjacency_graph_tag</TT>, <TT>bidirectional_graph_tag</TT>,
<TT>vertex_list_graph_tag</TT>, <TT>edge_list_graph_tag</TT>, and
<TT>adjacency_matrix_tag</TT>.
<TT>adjacency_matrix_tag</TT>. You can also create your own
tag which should inherit from one or more of the above.
</td>
</tr>
+2 -2
View File
@@ -52,7 +52,7 @@ 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 -->
<!-- Misra, J., & Gries, D. (1992). A constructive proof of Vizing's theorem. In Information Processing Letters. -->
<h3>Where defined</h3>
<a href="../../../boost/graph/edge_coloring.hpp"><tt>boost/graph/edge_coloring.hpp</tt></a>
@@ -80,7 +80,7 @@ OUT: <tt>ColorMap color</tt>
<h3>Example</h3>
See <A
href="../example/edge_coloring.cpp"><tt>example/king_ordering.cpp</tt></A>.
href="../example/edge_coloring.cpp"><tt>example/edge_coloring.cpp</tt></A>.
<h3>See Also</h3>
+2 -2
View File
@@ -200,9 +200,9 @@ The ways in which the vertices in the graph can be traversed.
The traversal category tags are:
<tt>incidence_graph_tag, adjacency_graph_tag,
bidirectional_graph_tag, vertex_list_graph_tag,
edge_list_graph_tag, vertex_and_edge_list_graph_tag,
edge_list_graph_tag,
adjacency_matrix_tag</tt>. You can also create your own
tag which should inherit from one of the above.
tag which should inherit from one or more of the above.
</td>
</tr>
+1 -1
View File
@@ -44,7 +44,7 @@
incident(typename graph_traits&lt;Graph&gt;::edge_descriptor e, Graph& g)
</pre>
This function takes and edge descriptor and returns the pair of
This function takes an edge descriptor and returns the pair of
vertices that are <i>incident</i> to the edge. For directed graphs,
the <tt>first</tt> vertex is the source and the <tt>second</tt> vertex
is the target. This function is equivalent to the expression
+1 -1
View File
@@ -39,7 +39,7 @@ void random_spanning_tree(const Graph&amp; g, Gen&amp; gen, vertex_descriptor ro
<p>
The <tt>random_spanning_tree()</tt> function generates a random spanning tree
on a directed or undirected graph. The algorithm used is Wilson's algorithm (<a
href="bibliography.html#wilson96generating">73</a>, based on <!-- (FIXME: add
href="bibliography.html#wilson96generating">73</a>), based on <!-- (FIXME: add
documentation for loop_erased_random_walk()) <a
href="loop_erased_random_walk.html"> -->loop-erased random walks<!-- </a> -->. There must
be a path from every non-root vertex of the graph to the root;
+1
View File
@@ -40,6 +40,7 @@ or form.</p>
<li><a href="http://www.vrjuggler.org/">VR Juggler: Virtual Reality Tools</a></li>
<li><a href="http://hyperworx.org">Hyperworx Platform Project</a></li>
<li><a href="http://www.opencog.org/">OpenCog, an open source Artificial General Intelligence framework</a></li>
<li><a href="https://www.pgRouting.org/">pgRouting extends the PostGIS/PostgreSQL geospatial database to provide geospatial routing functionality.</a></li>
</ul>
</body>
-1
View File
@@ -328,7 +328,6 @@ inline void astar_search_no_init_tree(const VertexListGraph& g,
BOOST_THROW_EXCEPTION(negative_edge());
bool decreased
= relax(e, g, weight, predecessor, distance, combine, compare);
combine(get(distance, v), e_weight);
if (decreased)
{
vis.edge_relaxed(e, g);
@@ -977,7 +977,7 @@ boykov_kolmogorov_max_flow(Graph& g, CapacityEdgeMap cap,
}
/**
* non-named-parameter version, given capacity, residucal_capacity,
* non-named-parameter version, given capacity, residual_capacity,
* reverse_edges, and an index map.
*/
template < class Graph, class CapacityEdgeMap, class ResidualCapacityEdgeMap,
@@ -1029,8 +1029,7 @@ boykov_kolmogorov_max_flow(Graph& g, CapacityEdgeMap cap,
* named-parameter version, some given
*/
template < class Graph, class P, class T, class R >
typename property_traits<
typename property_map< Graph, edge_capacity_t >::const_type >::value_type
typename detail::edge_capacity_value< Graph, P, T, R >::type
boykov_kolmogorov_max_flow(Graph& g,
typename graph_traits< Graph >::vertex_descriptor src,
typename graph_traits< Graph >::vertex_descriptor sink,
@@ -2069,15 +2069,20 @@ namespace detail
inline void reindex_edge_list(
EdgeList& el, vertex_descriptor u, boost::disallow_parallel_edge_tag)
{
for (typename EdgeList::iterator ei = el.begin(); ei != el.end(); ++ei)
typename EdgeList::iterator ei = el.begin(), e_end = el.end();
while (ei != e_end)
{
if (ei->get_target() > u)
{
typename EdgeList::value_type ce = *ei;
++ei;
el.erase(ce);
--ce.get_target();
el.insert(ce);
}
else {
++ei;
}
}
}
} // namespace detail
+4 -4
View File
@@ -204,10 +204,10 @@ private:
// Get the parent of a given node in the heap
static size_type parent(size_type index) { return (index - 1) / Arity; }
// Get the child_idx'th child of a given node; 0 <= child_idx < Arity
static size_type child(size_type index, std::size_t child_idx)
// Get the first child of a given node
static size_type first_child(size_type index)
{
return index * Arity + child_idx + 1;
return index * Arity + 1;
}
// Swap two elements in the heap by index, updating index_in_heap
@@ -304,7 +304,7 @@ private:
Value* data_ptr = &data[0];
for (;;)
{
size_type first_child_index = child(index, 0);
size_type first_child_index = first_child(index);
if (first_child_index >= heap_size)
break; /* No children */
Value* child_base_ptr = data_ptr + first_child_index;
+3 -2
View File
@@ -55,8 +55,9 @@ namespace detail
(ReadablePropertyMapConcept< DistanceMap, Vertex >));
BOOST_CONCEPT_ASSERT((NumericValueConcept< Distance >));
typedef numeric_values< Distance > DistanceNumbers;
BOOST_CONCEPT_ASSERT((AdaptableBinaryFunction< Combinator, Distance,
Distance, Distance >));
// NOTE: Disabled until this concept assert is fixed in Boost.ConceptCheck.
// BOOST_CONCEPT_ASSERT((AdaptableBinaryFunction< Combinator, Distance,
// Distance, Distance >));
// If there's ever an infinite distance, then we simply return
// infinity. Note that this /will/ include the a non-zero
+3 -2
View File
@@ -27,8 +27,9 @@ struct mean_geodesic_measure
BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >));
BOOST_CONCEPT_ASSERT((NumericValueConcept< DistanceType >));
BOOST_CONCEPT_ASSERT((NumericValueConcept< ResultType >));
BOOST_CONCEPT_ASSERT((AdaptableBinaryFunctionConcept< Divides,
ResultType, ResultType, ResultType >));
// NOTE: Disabled until this concept assert is fixed in Boost.ConceptCheck.
// BOOST_CONCEPT_ASSERT((AdaptableBinaryFunctionConcept< Divides,
// ResultType, ResultType, ResultType >));
return (d == base_type::infinite_distance())
? base_type::infinite_result()
+163 -100
View File
@@ -29,94 +29,130 @@ namespace boost
namespace detail
{
template < typename ParityMap, typename WeightMap, typename IndexMap >
class mas_min_cut_visitor : public boost::default_mas_visitor
/**
* \brief Performs a phase of the Stoer-Wagner min-cut algorithm
*
* Performs a phase of the Stoer-Wagner min-cut algorithm.
*
* As described by Stoer & Wagner (1997), a phase is simply a maximum
* adjacency search (also called a maximum cardinality search), which
* results in the selection of two vertices \em s and \em t, and, as a side
* product, a minimum <em>s</em>-<em>t</em> cut of the input graph. Here,
* the input graph is basically \p g, but some vertices are virtually
* assigned to others as a way of viewing \p g as a graph with some sets of
* vertices merged together.
*
* This implementation is a translation of pseudocode by Professor Uri
* Zwick, School of Computer Science, Tel Aviv University.
*
* \pre \p g is a connected, undirected graph
* \param[in] g the input graph
* \param[in] assignments a read/write property map from each vertex to the
* vertex that it is assigned to
* \param[in] assignedVertices a list of vertices that are assigned to
* others
* \param[in] weights a readable property map from each edge to its
* weight (a non-negative value)
* \param[out] pq a keyed, updatable max-priority queue
* \returns a tuple (\em s, \em t, \em w) of the "<em>s</em>" and
* "<em>t</em>" of the minimum <em>s</em>-<em>t</em> cut and the
* cut weight \em w of the minimum <em>s</em>-<em>t</em> cut.
* \see http://www.cs.tau.ac.il/~zwick/grad-algo-08/gmc.pdf
*
* \author Daniel Trebbien
* \date 2010-09-11
*/
template < class UndirectedGraph, class VertexAssignmentMap,
class WeightMap, class KeyedUpdatablePriorityQueue >
boost::tuple<
typename boost::graph_traits< UndirectedGraph >::vertex_descriptor,
typename boost::graph_traits< UndirectedGraph >::vertex_descriptor,
typename boost::property_traits< WeightMap >::value_type >
stoer_wagner_phase(const UndirectedGraph& g,
VertexAssignmentMap assignments,
const std::set< typename boost::graph_traits<
UndirectedGraph >::vertex_descriptor >& assignedVertices,
WeightMap weights, KeyedUpdatablePriorityQueue& pq)
{
typedef one_bit_color_map< IndexMap > InternalParityMap;
typedef
typename boost::graph_traits< UndirectedGraph >::vertex_descriptor
vertex_descriptor;
typedef typename boost::property_traits< WeightMap >::value_type
weight_type;
public:
template < typename Graph >
mas_min_cut_visitor(const Graph& g, ParityMap parity,
weight_type& cutweight, const WeightMap& weight_map,
IndexMap index_map)
: m_bestParity(parity)
, m_parity(make_one_bit_color_map(num_vertices(g), index_map))
, m_bestWeight(cutweight)
, m_cutweight(0)
, m_visited(0)
, m_weightMap(weight_map)
BOOST_ASSERT(pq.empty());
typename KeyedUpdatablePriorityQueue::key_map keys = pq.keys();
BGL_FORALL_VERTICES_T(v, g, UndirectedGraph)
{
// set here since the init list sets the reference
m_bestWeight = (std::numeric_limits< weight_type >::max)();
}
if (v == get(assignments, v))
{ // foreach u \in V do
put(keys, v, weight_type(0));
template < typename Vertex, typename Graph >
void initialize_vertex(Vertex u, const Graph& g)
{
typedef typename boost::property_traits< ParityMap >::value_type
parity_type;
typedef
typename boost::property_traits< InternalParityMap >::value_type
internal_parity_type;
put(m_parity, u, internal_parity_type(0));
put(m_bestParity, u, parity_type(0));
}
template < typename Edge, typename Graph >
void examine_edge(Edge e, const Graph& g)
{
weight_type w = get(m_weightMap, e);
// if the target of e is already marked then decrease cutweight
// otherwise, increase it
if (get(m_parity, boost::target(e, g)))
{
m_cutweight -= w;
}
else
{
m_cutweight += w;
pq.push(v);
}
}
template < typename Vertex, typename Graph >
void finish_vertex(Vertex u, const Graph& g)
{
typedef
typename boost::property_traits< InternalParityMap >::value_type
internal_parity_type;
BOOST_ASSERT(pq.size() >= 2);
++m_visited;
put(m_parity, u, internal_parity_type(1));
vertex_descriptor s
= boost::graph_traits< UndirectedGraph >::null_vertex();
vertex_descriptor t
= boost::graph_traits< UndirectedGraph >::null_vertex();
weight_type w;
while (!pq.empty())
{ // while PQ \neq {} do
const vertex_descriptor u = pq.top(); // u = extractmax(PQ)
w = get(keys, u);
pq.pop();
if (m_cutweight < m_bestWeight && m_visited < num_vertices(g))
s = t;
t = u;
BGL_FORALL_OUTEDGES_T(u, e, g, UndirectedGraph)
{ // foreach (u, v) \in E do
const vertex_descriptor v = get(assignments, target(e, g));
if (pq.contains(v))
{ // if v \in PQ then
put(keys, v,
get(keys, v)
+ get(weights,
e)); // increasekey(PQ, v, wA(v) + w(u, v))
pq.update(v);
}
}
typename std::set< vertex_descriptor >::const_iterator
assignedVertexIt,
assignedVertexEnd = assignedVertices.end();
for (assignedVertexIt = assignedVertices.begin();
assignedVertexIt != assignedVertexEnd; ++assignedVertexIt)
{
m_bestWeight = m_cutweight;
BGL_FORALL_VERTICES_T(i, g, Graph)
const vertex_descriptor uPrime = *assignedVertexIt;
if (get(assignments, uPrime) == u)
{
put(m_bestParity, i, get(m_parity, i));
BGL_FORALL_OUTEDGES_T(uPrime, e, g, UndirectedGraph)
{ // foreach (u, v) \in E do
const vertex_descriptor v
= get(assignments, target(e, g));
if (pq.contains(v))
{ // if v \in PQ then
put(keys, v,
get(keys, v)
+ get(weights, e)); // increasekey(PQ, v,
// wA(v) + w(u, v))
pq.update(v);
}
}
}
}
}
inline void clear()
{
m_bestWeight = (std::numeric_limits< weight_type >::max)();
m_visited = 0;
m_cutweight = 0;
}
private:
ParityMap m_bestParity;
InternalParityMap m_parity;
weight_type& m_bestWeight;
weight_type m_cutweight;
unsigned m_visited;
const WeightMap& m_weightMap;
};
return boost::make_tuple(s, t, w);
}
/**
* \brief Computes a min-cut of the input graph
@@ -156,44 +192,71 @@ namespace detail
vertex_descriptor;
typedef typename boost::property_traits< WeightMap >::value_type
weight_type;
typedef
typename boost::graph_traits< UndirectedGraph >::vertices_size_type
vertices_size_type;
typedef typename boost::property_traits< ParityMap >::value_type
parity_type;
typename graph_traits< UndirectedGraph >::vertex_iterator u_iter, u_end;
vertices_size_type n = num_vertices(g);
weight_type bestW = (std::numeric_limits< weight_type >::max)();
weight_type bestThisTime = (std::numeric_limits< weight_type >::max)();
vertex_descriptor bestStart
= boost::graph_traits< UndirectedGraph >::null_vertex();
std::set< vertex_descriptor > assignedVertices;
detail::mas_min_cut_visitor< ParityMap, WeightMap, IndexMap > vis(
g, parities, bestThisTime, weights, index_map);
// initialize `assignments` (all vertices are initially assigned to
// themselves)
BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { put(assignments, v, v); }
// for each node in the graph,
for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
vertex_descriptor s, t;
weight_type bestW;
boost::tie(s, t, bestW) = boost::detail::stoer_wagner_phase(
g, assignments, assignedVertices, weights, pq);
BOOST_ASSERT(s != t);
BGL_FORALL_VERTICES_T(v, g, UndirectedGraph)
{
// run the MAS and find the min cut
vis.clear();
boost::maximum_adjacency_search(g,
boost::weight_map(weights)
.visitor(vis)
.root_vertex(*u_iter)
.vertex_assignment_map(assignments)
.max_priority_queue(pq));
if (bestThisTime < bestW)
put(parities, v, parity_type(v == t ? 1 : 0));
}
put(assignments, t, s);
assignedVertices.insert(t);
--n;
for (; n >= 2; --n)
{
weight_type w;
boost::tie(s, t, w) = boost::detail::stoer_wagner_phase(
g, assignments, assignedVertices, weights, pq);
BOOST_ASSERT(s != t);
if (w < bestW)
{
bestW = bestThisTime;
bestStart = *u_iter;
BGL_FORALL_VERTICES_T(v, g, UndirectedGraph)
{
put(parities, v,
parity_type(get(assignments, v) == t ? 1 : 0));
if (get(assignments, v)
== t) // all vertices that were assigned to t are now
// assigned to s
put(assignments, v, s);
}
bestW = w;
}
else
{
BGL_FORALL_VERTICES_T(v, g, UndirectedGraph)
{
if (get(assignments, v)
== t) // all vertices that were assigned to t are now
// assigned to s
put(assignments, v, s);
}
}
put(assignments, t, s);
assignedVertices.insert(t);
}
// Run one more time, starting from the best start location, to
// ensure the visitor has the best values.
vis.clear();
boost::maximum_adjacency_search(g,
boost::vertex_assignment_map(assignments)
.weight_map(weights)
.visitor(vis)
.root_vertex(bestStart)
.max_priority_queue(pq));
BOOST_ASSERT(pq.empty());
return bestW;
}
+4 -5
View File
@@ -82,7 +82,7 @@ void transitive_closure(const Graph& g, GraphTC& tc,
iterator_property_map< cg_vertex*, VertexIndexMap, cg_vertex, cg_vertex& >
component_number(&component_number_vec[0], index_map);
int num_scc
const cg_vertex num_scc
= strong_components(g, component_number, vertex_index_map(index_map));
std::vector< std::vector< vertex > > components;
@@ -107,12 +107,11 @@ void transitive_closure(const Graph& g, GraphTC& tc,
}
}
std::sort(adj.begin(), adj.end());
typename std::vector< cg_vertex >::iterator di
const typename std::vector< cg_vertex >::iterator di
= std::unique(adj.begin(), adj.end());
if (di != adj.end())
adj.erase(di, adj.end());
for (typename std::vector< cg_vertex >::const_iterator i = adj.begin();
i != adj.end(); ++i)
i != di; ++i)
{
add_edge(s, *i, CG);
}
+22 -8
View File
@@ -72,7 +72,7 @@ fill_random_max_flow_graph(Graph& g, CapacityMap cap, ReverseEdgeMap rev,
// cannot use this, as we have no idea how properties are stored, right?
typename graph_traits< Graph >::edge_iterator ei, e_end;
for (boost::tie(ei, e_end) = edges(g); ei != e_end; ++ei)
cap[*ei] = int_gen();
put(cap, *ei, int_gen());
// get source and sink node
vertex_descriptor s = random_vertex(g, gen);
@@ -96,9 +96,9 @@ fill_random_max_flow_graph(Graph& g, CapacityMap cap, ReverseEdgeMap rev,
boost::tie(new_edge, inserted)
= add_edge(source_vertex, target_vertex, g);
assert(inserted);
rev[old_edge] = new_edge;
rev[new_edge] = old_edge;
cap[new_edge] = 0;
put(rev, old_edge, new_edge);
put(rev, new_edge, old_edge);
put(cap, new_edge, 0);
}
return std::make_pair(s, t);
}
@@ -188,10 +188,24 @@ long test_bundled_properties(int n_verts, int n_edges, std::size_t seed)
boost::tie(src, sink)
= fill_random_max_flow_graph(g, get(&tEdge::edge_capacity, g),
get(&tEdge::edge_reverse, g), n_verts, n_edges, seed);
return boykov_kolmogorov_max_flow(g, get(&tEdge::edge_capacity, g),
get(&tEdge::edge_residual_capacity, g), get(&tEdge::edge_reverse, g),
get(&tVertex::vertex_predecessor, g), get(&tVertex::vertex_color, g),
get(&tVertex::vertex_distance, g), get(vertex_index, g), src, sink);
long flow_unnamed_overload = boykov_kolmogorov_max_flow(g,
get(&tEdge::edge_capacity, g), get(&tEdge::edge_residual_capacity, g),
get(&tEdge::edge_reverse, g), get(&tVertex::vertex_predecessor, g),
get(&tVertex::vertex_color, g), get(&tVertex::vertex_distance, g),
get(vertex_index, g), src, sink);
long flow_named_overload = boykov_kolmogorov_max_flow(g, src, sink,
capacity_map(get(&tEdge::edge_capacity, g))
.residual_capacity_map(get(&tEdge::edge_residual_capacity, g))
.reverse_edge_map(get(&tEdge::edge_reverse, g))
.predecessor_map(get(&tVertex::vertex_predecessor, g))
.color_map(get(&tVertex::vertex_color, g))
.distance_map(get(&tVertex::vertex_distance, g))
.vertex_index_map(get(vertex_index, g)));
BOOST_TEST(flow_unnamed_overload == flow_named_overload);
return flow_named_overload;
}
long test_overloads(int n_verts, int n_edges, std::size_t seed)
+18
View File
@@ -55,5 +55,23 @@ int main(int argc, char* argv[])
BOOST_TEST(m_graph[ed1] == EDGE_VAL);
// https://github.com/boostorg/graph/issues/268
// 1. Undirected:
{
boost::adjacency_list<boost::setS, boost::vecS, boost::undirectedS> g;
boost::add_edge(2, 0, g);
boost::remove_vertex(1, g);
BOOST_TEST(num_vertices(g) == 2);
BOOST_TEST(num_edges(g) == 1);
}
// 2. Directed:
{
boost::adjacency_list<boost::setS, boost::vecS, boost::directedS> g;
boost::add_edge(2, 0, g);
boost::remove_vertex(1, g);
BOOST_TEST(num_vertices(g) == 2);
BOOST_TEST(num_edges(g) == 1);
}
return boost::report_errors();
}
+29 -1
View File
@@ -184,6 +184,32 @@ void test4()
BOOST_TEST_EQ(parity2, get(parities, 7));
}
// Non regression test for github.com/boostorg/graph/issues/286
void test5()
{
edge_t edges[] = { { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 },
{ 2, 3 }, { 4, 5 }, { 4, 6 }, { 4, 7 }, { 5, 6 }, { 5, 7 }, { 6, 7 },
{ 0, 4 } };
weight_type ws[] = { 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 6 };
undirected_graph g(edges, edges + 13, ws, 8, 13);
weight_map_type weights = get(boost::edge_weight, g);
std::map< int, bool > parity;
boost::associative_property_map< std::map< int, bool > > parities(parity);
int w
= boost::stoer_wagner_min_cut(g, weights, boost::parity_map(parities));
BOOST_TEST_EQ(w, 6);
const bool parity0 = get(parities, 0);
BOOST_TEST_EQ(parity0, get(parities, 1));
BOOST_TEST_EQ(parity0, get(parities, 2));
BOOST_TEST_EQ(parity0, get(parities, 3));
const bool parity4 = get(parities, 4);
BOOST_TEST_NE(parity0, parity4);
BOOST_TEST_EQ(parity4, get(parities, 5));
BOOST_TEST_EQ(parity4, get(parities, 6));
BOOST_TEST_EQ(parity4, get(parities, 7));
}
// The input for the `test_prgen` family of tests comes from a program, named
// `prgen`, that comes with a package of min-cut solvers by Chandra Chekuri,
// Andrew Goldberg, David Karger, Matthew Levine, and Cliff Stein. `prgen` was
@@ -285,13 +311,15 @@ void test_prgen_50_70_2()
int main(int argc, char* argv[])
{
if (BOOST_TEST(argc == 2)) {
if (BOOST_TEST(argc == 2))
{
test_dir = argv[1];
test0();
test1();
test2();
test3();
test4();
test5();
test_prgen_20_70_2();
test_prgen_50_70_2();
}