mirror of
https://github.com/boostorg/graph.git
synced 2026-07-21 13:23:42 +00:00
Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cea3ee8225 | |||
| af22c9bcde | |||
| 7a6ceb3cd2 | |||
| 2bc8d0490e | |||
| 5bb73cd899 | |||
| 6bae630c38 | |||
| d865589d62 | |||
| 03318bfb5f | |||
| 97f51d8180 | |||
| 35d3e15a47 | |||
| c2c341c12d | |||
| 685f9e091a | |||
| 2247005473 | |||
| 1fd5fc12a4 | |||
| 58b6f3640a | |||
| 63135f59b5 | |||
| 0c38817632 | |||
| 5842a766b6 | |||
| 5f1bbdb941 | |||
| 9b425a037c | |||
| 2bcd634112 | |||
| 7cccda8854 | |||
| f4aa9658fe | |||
| b3751605e4 | |||
| d63a380343 | |||
| 46702c45ac | |||
| 487459712b | |||
| cb342d159b | |||
| b05b379492 | |||
| 099f965f24 | |||
| d4160d52ba | |||
| 50e9e7a692 | |||
| d2ae80b7db | |||
| 0cfb1b8895 | |||
| 493e7b53a5 | |||
| f0c469b8e6 | |||
| bbc499708c | |||
| e4e12158e7 | |||
| 56ce18a75d | |||
| 1b2c9d8d3f | |||
| f364ee7be2 | |||
| 910445584a | |||
| ecbd271eb1 | |||
| 274a05f630 | |||
| 7c0a9d2998 | |||
| c1803bbb4f | |||
| 545428a4d0 | |||
| 53d0e93e43 | |||
| 1eb8c16a76 | |||
| b9c3b14d39 | |||
| 80b88a32e9 |
+164
@@ -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")
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
Executable
+42
@@ -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
|
||||
@@ -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
|
||||
-334
@@ -1,334 +0,0 @@
|
||||
# Copyright 2016, 2017 Peter Dimov
|
||||
# Copyright 2018 Joh 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)
|
||||
|
||||
language: cpp
|
||||
|
||||
python: "2.7"
|
||||
|
||||
dist : xenial
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BOGUS_JOB=true
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
- env: BOGUS_JOB=true
|
||||
|
||||
include:
|
||||
- os: linux
|
||||
compiler: g++-4.4
|
||||
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.4
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.6
|
||||
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,14
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-9
|
||||
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=14,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.5
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.6
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.7
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.8
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-4.0
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-4.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-5.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-6.0
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-6.0
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-8
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03
|
||||
osx_image: xcode7.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
|
||||
osx_image: xcode7.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=14,1z
|
||||
osx_image: xcode7.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03
|
||||
osx_image: xcode8.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
|
||||
osx_image: xcode8.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=14,1z
|
||||
osx_image: xcode8.3
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03
|
||||
osx_image: xcode9.4.1
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=11
|
||||
osx_image: xcode9.4.1
|
||||
|
||||
- os: osx
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=14,1z
|
||||
osx_image: xcode9.4.1
|
||||
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- cd ..
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/boost_install
|
||||
- git submodule update --init libs/headers
|
||||
- git submodule update --init tools/build
|
||||
- git submodule update --init libs/config
|
||||
- git submodule update --init tools/boostdep
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/graph
|
||||
- python tools/boostdep/depinst/depinst.py graph
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- IFS=','
|
||||
- for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done
|
||||
- unset IFS
|
||||
- ./b2 -j3 libs/graph/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
||||
@@ -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()
|
||||
@@ -1,4 +1,5 @@
|
||||
Boost Graph Library [](https://travis-ci.org/boostorg/graph)
|
||||
Boost Graph Library [](https://drone.cpp.al/boostorg/graph)[](https://github.com/boostorg/graph/actions)
|
||||
|
||||
===================
|
||||
|
||||
A generic interface for traversing graphs, using C++ templates.
|
||||
@@ -14,7 +15,7 @@ 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)).
|
||||
* 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).
|
||||
|
||||
@@ -25,9 +26,8 @@ There is no mailing-list specific to Boost Graph, although you can use the gener
|
||||
|
||||
| | Master | Develop |
|
||||
|------------------|----------|-------------|
|
||||
| Travis | [](https://travis-ci.org/boostorg/graph) | [](https://travis-ci.org/boostorg/graph) |
|
||||
| Appveyor | [](https://ci.appveyor.com/project/jzmaddock/graph/branch/master) | [](https://ci.appveyor.com/project/jzmaddock/graph/branch/develop) |
|
||||
|
||||
| Github Actions | [](https://github.com/boostorg/graph/actions) | [](https://github.com/boostorg/graph/actions) |
|
||||
|Drone | [](https://drone.cpp.al/boostorg/graph) | [](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)):
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
# Copyright 2016 Peter Dimov
|
||||
# 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)
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- ARGS: --toolset=msvc-9.0 address-model=32
|
||||
- ARGS: --toolset=msvc-10.0 address-model=32
|
||||
- ARGS: --toolset=msvc-11.0 address-model=32
|
||||
- ARGS: --toolset=msvc-12.0 address-model=32
|
||||
- ARGS: --toolset=msvc-14.0 address-model=32
|
||||
- ARGS: --toolset=msvc-12.0 address-model=64
|
||||
- ARGS: --toolset=msvc-14.0 address-model=64
|
||||
- ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=32
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest
|
||||
- ARGS: --toolset=gcc address-model=64
|
||||
PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z
|
||||
PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=32
|
||||
PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH%
|
||||
- ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition
|
||||
PATH: C:\MinGW\bin;%PATH%
|
||||
|
||||
|
||||
install:
|
||||
- cd ..
|
||||
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/boost_install
|
||||
- git submodule update --init libs/headers
|
||||
- git submodule update --init tools/build
|
||||
- git submodule update --init libs/config
|
||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\graph
|
||||
- git submodule update --init tools/boostdep
|
||||
- python tools/boostdep/depinst/depinst.py graph
|
||||
- bootstrap
|
||||
- b2 headers
|
||||
|
||||
build: off
|
||||
|
||||
test_script:
|
||||
- cd libs\config\test
|
||||
- ..\..\..\b2 config_info_travis_install %ARGS%
|
||||
- config_info_travis
|
||||
- cd ..\..\graph\test
|
||||
- ..\..\..\b2 -j3 --hash %ARGS%
|
||||
@@ -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
|
||||
|
||||
@@ -69,7 +69,6 @@ pair of letters. Now we can write down an example of a directed graph
|
||||
as follows:
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<DIV ALIGN="center">
|
||||
<table><tr><td><tt>
|
||||
V = {v, b, x, z, a, y } <br>
|
||||
@@ -103,17 +102,16 @@ Example of a directed graph.</CAPTION>
|
||||
Next we have a similar graph, though this time it is undirected. <A
|
||||
HREF="#fig:undirected-graph">Figure 2</A> gives the pictorial view.
|
||||
Self loops are not allowed in undirected graphs. This graph is the <a
|
||||
name="def:undirected-version"><I>undirected version</i></a. of the the
|
||||
name="def:undirected-version"><i>undirected version</i></a> of the the
|
||||
previous graph (minus the parallel edge <i>(b,y)</i>), meaning it has
|
||||
the same vertices and the same edges with their directions removed.
|
||||
Also the self edge has been removed, and edges such as <i>(a,z)</i>
|
||||
and <i>(z,a)</i> are collapsed into one edge. One can go the other
|
||||
way, and make a <a name="def:directed-version"><I>directed version</i>
|
||||
way, and make a <a name="def:directed-version"><i>directed version</i>
|
||||
of an undirected graph be replacing each edge by two edges, one
|
||||
pointing in each direction.
|
||||
|
||||
<P>
|
||||
<BR>
|
||||
<DIV ALIGN="CENTER">
|
||||
<table><tr><td><tt>
|
||||
V = {v, b, x, z, a, y }<br>
|
||||
@@ -136,7 +134,7 @@ Example of an undirected graph.</CAPTION>
|
||||
|
||||
<P>
|
||||
Now for some more graph terminology. If some edge <i>(u,v)</i> is in
|
||||
graph , then vertex <i>v</i> is <a
|
||||
graph <i>G</i>, then vertex <i>v</i> is <a
|
||||
name="def:adjacent"><I>adjacent</I></a> to vertex <i>u</i>. In a
|
||||
directed graph, edge <i>(u,v)</i> is an <a
|
||||
name="def:out-edge"><I>out-edge</I></a> of vertex <i>u</i> and an <a
|
||||
@@ -175,7 +173,7 @@ name="def:simple-path"><I>simple</I></a> if none of the vertices in
|
||||
the sequence are repeated. The path <(b,x), (x,v)> is simple,
|
||||
while the path <(a,z), (z,a)> is not. Also, the path <(a,z),
|
||||
(z,a)> is called a <a name="def:cycle"><I>cycle</I></a> because the
|
||||
first and last vertex in the path are the same. A graph with no cycles
|
||||
first and last vertices in the path are the same. A graph with no cycles
|
||||
is <a name="def:acyclic"><I>acyclic</I></a>.
|
||||
|
||||
<P>
|
||||
@@ -353,12 +351,12 @@ Breadth-first search spreading through a graph.</CAPTION>
|
||||
<P>
|
||||
<PRE>
|
||||
order of discovery: s r w v t x u y
|
||||
order of finish: s r w v t x u y
|
||||
order of finish: s r w v t x u y
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
We start at vertex <i>s</i>, and first visit <i>r</i> and <i>w</i> (the two
|
||||
neighbors of <i>s</i>). Once both neighbors of are visited, we visit the
|
||||
neighbors of <i>s</i>). Once both neighbors of <i>s</i> are visited, we visit the
|
||||
neighbor of <i>r</i> (vertex <i>v</i>), then the neighbors of <i>w</i>
|
||||
(the discovery order between <i>r</i> and <i>w</i> does not matter)
|
||||
which are <i>t</i> and <i>x</i>. Finally we visit the neighbors of
|
||||
@@ -404,7 +402,8 @@ properly nested set of parenthesis. <A
|
||||
HREF="#fig:dfs-example">Figure 7</A> shows
|
||||
DFS applied to an undirected graph, with the edges labeled in the
|
||||
order they were explored. Below we list the vertices of the graph
|
||||
ordered by discover and finish time, as well as show the parenthesis structure. DFS is used as the kernel for several other graph
|
||||
ordered by discover and finish time, as well as show the parenthesis
|
||||
structure. DFS is used as the kernel for several other graph
|
||||
algorithms, including topological sort and two of the connected
|
||||
component algorithms. It can also be used to detect cycles (see the <A
|
||||
HREF="file_dependency_example.html#sec:cycles">Cylic Dependencies </a>
|
||||
@@ -424,7 +423,7 @@ Depth-first search on an undirected graph.</CAPTION>
|
||||
<P>
|
||||
<PRE>
|
||||
order of discovery: a b e d c f g h i
|
||||
order of finish: d f c e b a
|
||||
order of finish: d f c e b a i h g
|
||||
parenthesis: (a (b (e (d d) (c (f f) c) e) b) a) (g (h (i i) h) g)
|
||||
</PRE>
|
||||
|
||||
@@ -442,8 +441,7 @@ total weight is given by
|
||||
<i>w(T)</i> = sum of <i>w(u,v)</i> over all <i>(u,v)</i> in <i>T</i>,
|
||||
where <i>w(u,v)</i> is the weight on the edge <i>(u,v)</i>
|
||||
</DIV>
|
||||
<BR CLEAR="ALL">
|
||||
<P></P>
|
||||
<BR CLEAR="ALL"><P></P>
|
||||
<i>T</i> is called the <I>spanning tree</I>.
|
||||
|
||||
<!--
|
||||
@@ -480,7 +478,7 @@ of a path</I><BR>
|
||||
|
||||
<p></p>
|
||||
<DIV ALIGN="left">
|
||||
<i>w(p) = sum from i=1..k of w(v<sub>i-1</sub>,v<sub>i</sub>)</i>
|
||||
<i>w(p) = sum of w(v<sub>i-1</sub>,v<sub>i</sub>) for i=1..k</i>
|
||||
</DIV>
|
||||
<BR CLEAR="ALL"><P></P>
|
||||
|
||||
@@ -495,7 +493,7 @@ The <I>shortest path weight</I> from vertex <i>u</i> to <i>v</i> is then
|
||||
</DIV>
|
||||
<BR CLEAR="ALL"><P></P>
|
||||
|
||||
A <I>shortest path</I> is any path who's path weight is equal to the
|
||||
A <I>shortest path</I> is any path whose path weight is equal to the
|
||||
<I>shortest path weight</I>.
|
||||
|
||||
<P>
|
||||
@@ -509,12 +507,12 @@ problem that are asymptotically faster than algorithms that solve the
|
||||
single-source problem.
|
||||
|
||||
<P>
|
||||
A <I>shortest-paths tree</I> rooted at vertex in graph <i>G=(V,E)</i>
|
||||
is a directed subgraph <G'> where <i>V'</i> is a subset
|
||||
A <I>shortest-paths tree</I> rooted at vertex <i>r</i> in graph <i>G=(V,E)</i>
|
||||
is a directed subgraph <I>G'=(V',E')</I> where <i>V'</i> is a subset
|
||||
of <i>V</i> and <i>E'</i> is a subset of <i>E</i>, <i>V'</i> is the
|
||||
set of vertices reachable from , <i>G'</i> forms a rooted tree with
|
||||
root , and for all <i>v</i> in <i>V'</i> the unique simple path from
|
||||
to <i>v</i> in <i>G'</i> is a shortest path from to <i>v</i> in . The
|
||||
set of vertices reachable from <i>r</i>, <i>G'</i> forms a rooted tree with
|
||||
root <i>r</i>, and for all <i>v</i> in <i>V'</i> the unique simple path from <i>r</i>
|
||||
to <i>v</i> in <i>G'</i> is a shortest path from <i>r</i> to <i>v</i> in <i>G</i>. The
|
||||
result of a single-source algorithm is a shortest-paths tree.
|
||||
|
||||
<P>
|
||||
@@ -532,7 +530,7 @@ constraints:
|
||||
<p>
|
||||
<i>f(u,v) <= c(u,v) for all (u,v) in V x V</i> (Capacity constraint) <br>
|
||||
<i>f(u,v) = - f(v,u) for all (u,v) in V x V</i> (Skew symmetry)<br>
|
||||
<i>sum<sub>v in V</sub> f(u,v) = 0 for all u in V - {s,t}</i> (Flow conservation)
|
||||
<i>sum<sub>v in V</sub> f(u,v) = 0 for all v in V - {s,t}</i> (Flow conservation)
|
||||
|
||||
<p>
|
||||
The <b><i>flow</i></b> of the network is the net flow entering the
|
||||
@@ -553,7 +551,8 @@ The <b><i>maximum flow problem</i></b> is to determine the maximum
|
||||
possible value for <i>|f|</i> and the corresponding flow values for
|
||||
every vertex pair in the graph.
|
||||
<p>
|
||||
The <b><i>minimum cost maximum flow problem</i></b> is to determine the maximum flow which minimizes <i> sum<sub>(u,v) in E</sub>
|
||||
The <b><i>minimum cost maximum flow problem</i></b> is to determine
|
||||
the maximum flow which minimizes <i> sum<sub>(u,v) in E</sub>
|
||||
cost(u,v) * f(u,v) </i>.
|
||||
|
||||
<p>
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
alt="C++ Boost" width="277" height="86">
|
||||
|
||||
<h1>The Boost Graph Library (BGL)
|
||||
<a href="http://www.awprofessional.com/title/0201729148">
|
||||
<a href="https://www.informit.com/store/boost-graph-library-user-guide-and-reference-manual-9780132651837">
|
||||
<img src="bgl-cover.jpg" alt="BGL Book" align="RIGHT"></a>
|
||||
</h1>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
ALT="C++ Boost" width="277" height="86">
|
||||
|
||||
<h1>Table of Contents: the Boost Graph Library
|
||||
<a href="http://www.awprofessional.com/title/0201729148">
|
||||
<a href="https://www.informit.com/store/boost-graph-library-user-guide-and-reference-manual-9780132651837">
|
||||
<img src="bgl-cover.jpg" ALT="BGL Book" ALIGN="RIGHT"></a>
|
||||
</h1>
|
||||
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ run filtered_graph.cpp ;
|
||||
run filtered_graph_edge_range.cpp ;
|
||||
run filtered_vec_as_graph.cpp ;
|
||||
run filtered-copy-example.cpp ;
|
||||
exe fr_layout : fr_layout.cpp ;
|
||||
exe fr_layout : fr_layout.cpp : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ;
|
||||
run gerdemann.cpp ;
|
||||
run graph.cpp ;
|
||||
run graph_as_tree.cpp ;
|
||||
|
||||
@@ -20,7 +20,11 @@ namespace boost
|
||||
template < class Alloc, class ValueType >
|
||||
struct container_gen< list_with_allocatorS< Alloc >, ValueType >
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_ALLOCATOR
|
||||
typedef typename Alloc::template rebind< ValueType >::other Allocator;
|
||||
#else
|
||||
typedef typename std::allocator_traits<Alloc>::template rebind_alloc<ValueType> Allocator;
|
||||
#endif
|
||||
typedef std::list< ValueType, Allocator > type;
|
||||
};
|
||||
template < class Alloc >
|
||||
|
||||
+21
-19
@@ -7,7 +7,7 @@
|
||||
// Author: Douglas Gregor
|
||||
#include <boost/graph/graphviz.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/test/minimal.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <boost/graph/iteration_macros.hpp>
|
||||
@@ -25,16 +25,18 @@ typedef boost::adjacency_list< vecS, vecS, undirectedS,
|
||||
void test_graph_read_write(const std::string& filename)
|
||||
{
|
||||
std::ifstream in(filename.c_str());
|
||||
BOOST_REQUIRE(in);
|
||||
if (!BOOST_TEST(in)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Graph g;
|
||||
dynamic_properties dp;
|
||||
dp.property("id", get(vertex_name, g));
|
||||
dp.property("weight", get(edge_weight, g));
|
||||
BOOST_CHECK(read_graphviz(in, g, dp, "id"));
|
||||
BOOST_TEST(read_graphviz(in, g, dp, "id"));
|
||||
|
||||
BOOST_CHECK(num_vertices(g) == 4);
|
||||
BOOST_CHECK(num_edges(g) == 4);
|
||||
BOOST_TEST(num_vertices(g) == 4);
|
||||
BOOST_TEST(num_edges(g) == 4);
|
||||
|
||||
typedef graph_traits< Graph >::vertex_descriptor Vertex;
|
||||
|
||||
@@ -43,27 +45,27 @@ void test_graph_read_write(const std::string& filename)
|
||||
name_to_vertex[get(vertex_name, g, v)] = v;
|
||||
|
||||
// Check vertices
|
||||
BOOST_CHECK(name_to_vertex.find("0") != name_to_vertex.end());
|
||||
BOOST_CHECK(name_to_vertex.find("1") != name_to_vertex.end());
|
||||
BOOST_CHECK(name_to_vertex.find("foo") != name_to_vertex.end());
|
||||
BOOST_CHECK(name_to_vertex.find("bar") != name_to_vertex.end());
|
||||
BOOST_TEST(name_to_vertex.find("0") != name_to_vertex.end());
|
||||
BOOST_TEST(name_to_vertex.find("1") != name_to_vertex.end());
|
||||
BOOST_TEST(name_to_vertex.find("foo") != name_to_vertex.end());
|
||||
BOOST_TEST(name_to_vertex.find("bar") != name_to_vertex.end());
|
||||
|
||||
// Check edges
|
||||
BOOST_CHECK(edge(name_to_vertex["0"], name_to_vertex["1"], g).second);
|
||||
BOOST_CHECK(edge(name_to_vertex["1"], name_to_vertex["foo"], g).second);
|
||||
BOOST_CHECK(edge(name_to_vertex["foo"], name_to_vertex["bar"], g).second);
|
||||
BOOST_CHECK(edge(name_to_vertex["1"], name_to_vertex["bar"], g).second);
|
||||
BOOST_TEST(edge(name_to_vertex["0"], name_to_vertex["1"], g).second);
|
||||
BOOST_TEST(edge(name_to_vertex["1"], name_to_vertex["foo"], g).second);
|
||||
BOOST_TEST(edge(name_to_vertex["foo"], name_to_vertex["bar"], g).second);
|
||||
BOOST_TEST(edge(name_to_vertex["1"], name_to_vertex["bar"], g).second);
|
||||
|
||||
BOOST_CHECK(get(edge_weight, g,
|
||||
BOOST_TEST(get(edge_weight, g,
|
||||
edge(name_to_vertex["0"], name_to_vertex["1"], g).first)
|
||||
== 3.14159);
|
||||
BOOST_CHECK(get(edge_weight, g,
|
||||
BOOST_TEST(get(edge_weight, g,
|
||||
edge(name_to_vertex["1"], name_to_vertex["foo"], g).first)
|
||||
== 2.71828);
|
||||
BOOST_CHECK(get(edge_weight, g,
|
||||
BOOST_TEST(get(edge_weight, g,
|
||||
edge(name_to_vertex["foo"], name_to_vertex["bar"], g).first)
|
||||
== 10.0);
|
||||
BOOST_CHECK(get(edge_weight, g,
|
||||
BOOST_TEST(get(edge_weight, g,
|
||||
edge(name_to_vertex["1"], name_to_vertex["bar"], g).first)
|
||||
== 10.0);
|
||||
|
||||
@@ -71,9 +73,9 @@ void test_graph_read_write(const std::string& filename)
|
||||
write_graphviz_dp(std::cout, g, dp, std::string("id"));
|
||||
}
|
||||
|
||||
int test_main(int argc, char* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
test_graph_read_write(argc >= 2 ? argv[1] : "graphviz_example.dot");
|
||||
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#ifndef BOOST_ALGORITHM_HPP
|
||||
#define BOOST_ALGORITHM_HPP
|
||||
#include <boost/detail/iterator.hpp>
|
||||
|
||||
// Algorithms on sequences
|
||||
//
|
||||
// The functions in this file have not yet gone through formal
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#ifndef BOOST_ADJACENCY_ITERATOR_HPP
|
||||
#define BOOST_ADJACENCY_ITERATOR_HPP
|
||||
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <iterator>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
|
||||
@@ -45,7 +45,7 @@ template < class Graph,
|
||||
class adjacency_iterator_generator
|
||||
{
|
||||
typedef
|
||||
typename boost::detail::iterator_traits< OutEdgeIter >::difference_type
|
||||
typename std::iterator_traits< OutEdgeIter >::difference_type
|
||||
difference_type;
|
||||
|
||||
public:
|
||||
@@ -81,7 +81,7 @@ template < class Graph,
|
||||
class inv_adjacency_iterator_generator
|
||||
{
|
||||
typedef
|
||||
typename boost::detail::iterator_traits< InEdgeIter >::difference_type
|
||||
typename std::iterator_traits< InEdgeIter >::difference_type
|
||||
difference_type;
|
||||
|
||||
public:
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#ifndef BOOST_GRAPH_BETWEENNESS_CENTRALITY_CLUSTERING_HPP
|
||||
#define BOOST_GRAPH_BETWEENNESS_CENTRALITY_CLUSTERING_HPP
|
||||
|
||||
#include <boost/algorithm/minmax_element.hpp>
|
||||
#include <boost/graph/betweenness_centrality.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/graph_utility.hpp>
|
||||
#include <boost/pending/indirect_cmp.hpp>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
|
||||
@@ -133,7 +133,7 @@ void betweenness_centrality_clustering(MutableGraph& g, Done done,
|
||||
.vertex_index_map(vertex_index));
|
||||
std::pair< edge_iterator, edge_iterator > edges_iters = edges(g);
|
||||
edge_descriptor e
|
||||
= *max_element(edges_iters.first, edges_iters.second, cmp);
|
||||
= *boost::first_max_element(edges_iters.first, edges_iters.second, cmp);
|
||||
is_done = done(get(edge_centrality, e), e, g);
|
||||
if (!is_done)
|
||||
remove_edge(e, g);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/depth_first_search.hpp>
|
||||
#include <boost/graph/one_bit_color_map.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <boost/graph/detail/mpi_include.hpp>
|
||||
#include <boost/concept/assert.hpp>
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / concepts.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/concepts.hpp>)
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@@ -403,6 +403,6 @@ namespace graph
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / breadth_first_search.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/breadth_first_search.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_BREADTH_FIRST_SEARCH_HPP
|
||||
|
||||
@@ -109,6 +109,6 @@ connected_components(const Graph& g,
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / connected_components.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/connected_components.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_CONNECTED_COMPONENTS_HPP
|
||||
|
||||
@@ -428,6 +428,6 @@ void depth_first_visit(const IncidenceGraph& g,
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / depth_first_search.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/depth_first_search.hpp>)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <boost/range/irange.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <memory>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
@@ -2370,7 +2371,7 @@ namespace detail
|
||||
typedef typename OutEdgeList::size_type degree_size_type;
|
||||
typedef typename OutEdgeList::iterator OutEdgeIter;
|
||||
|
||||
typedef boost::detail::iterator_traits< OutEdgeIter >
|
||||
typedef std::iterator_traits< OutEdgeIter >
|
||||
OutEdgeIterTraits;
|
||||
typedef
|
||||
typename OutEdgeIterTraits::iterator_category OutEdgeIterCat;
|
||||
@@ -2398,7 +2399,7 @@ namespace detail
|
||||
|
||||
// Edge Iterator
|
||||
|
||||
typedef boost::detail::iterator_traits< EdgeIter > EdgeIterTraits;
|
||||
typedef std::iterator_traits< EdgeIter > EdgeIterTraits;
|
||||
typedef typename EdgeIterTraits::iterator_category EdgeIterCat;
|
||||
typedef typename EdgeIterTraits::difference_type EdgeIterDiff;
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <boost/graph/properties.hpp>
|
||||
#include <boost/pending/indirect_cmp.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/graph/iteration_macros.hpp>
|
||||
#include <boost/graph/depth_first_search.hpp>
|
||||
|
||||
|
||||
@@ -575,6 +575,6 @@ inline void dijkstra_shortest_paths(const VertexListGraph& g,
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / dijkstra_shortest_paths.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/dijkstra_shortest_paths.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_DIJKSTRA_HPP
|
||||
|
||||
@@ -455,6 +455,6 @@ void fruchterman_reingold_force_directed_layout(
|
||||
|
||||
} // end namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / fruchterman_reingold.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/fruchterman_reingold.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_FRUCHTERMAN_REINGOLD_FORCE_DIRECTED_LAYOUT_HPP
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/graph/dll_import_export.hpp>
|
||||
#include <boost/graph/graphviz.hpp> // for exceptions
|
||||
#include <typeinfo>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/find.hpp>
|
||||
@@ -27,6 +26,7 @@
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@@ -41,8 +41,8 @@ struct BOOST_SYMBOL_VISIBLE parse_error : public graph_exception
|
||||
error = err;
|
||||
statement = "parse error: " + error;
|
||||
}
|
||||
virtual ~parse_error() throw() {}
|
||||
virtual const char* what() const throw() { return statement.c_str(); }
|
||||
~parse_error() throw() BOOST_OVERRIDE {}
|
||||
const char* what() const throw() BOOST_OVERRIDE { return statement.c_str(); }
|
||||
std::string statement;
|
||||
std::string error;
|
||||
};
|
||||
@@ -84,16 +84,16 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool is_directed() const
|
||||
bool is_directed() const BOOST_OVERRIDE
|
||||
{
|
||||
return is_convertible<
|
||||
typename graph_traits< MutableGraph >::directed_category,
|
||||
directed_tag >::value;
|
||||
}
|
||||
|
||||
virtual any do_add_vertex() { return any(add_vertex(m_g)); }
|
||||
any do_add_vertex() BOOST_OVERRIDE { return any(add_vertex(m_g)); }
|
||||
|
||||
virtual std::pair< any, bool > do_add_edge(any source, any target)
|
||||
std::pair< any, bool > do_add_edge(any source, any target) BOOST_OVERRIDE
|
||||
{
|
||||
std::pair< edge_descriptor, bool > retval
|
||||
= add_edge(any_cast< vertex_descriptor >(source),
|
||||
@@ -101,8 +101,8 @@ public:
|
||||
return std::make_pair(any(retval.first), retval.second);
|
||||
}
|
||||
|
||||
virtual void set_graph_property(const std::string& name,
|
||||
const std::string& value, const std::string& value_type)
|
||||
void set_graph_property(const std::string& name,
|
||||
const std::string& value, const std::string& value_type) BOOST_OVERRIDE
|
||||
{
|
||||
bool type_found = false;
|
||||
try
|
||||
@@ -123,8 +123,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void set_vertex_property(const std::string& name, any vertex,
|
||||
const std::string& value, const std::string& value_type)
|
||||
void set_vertex_property(const std::string& name, any vertex,
|
||||
const std::string& value, const std::string& value_type) BOOST_OVERRIDE
|
||||
{
|
||||
bool type_found = false;
|
||||
try
|
||||
@@ -146,8 +146,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void set_edge_property(const std::string& name, any edge,
|
||||
const std::string& value, const std::string& value_type)
|
||||
void set_edge_property(const std::string& name, any edge,
|
||||
const std::string& value, const std::string& value_type) BOOST_OVERRIDE
|
||||
{
|
||||
bool type_found = false;
|
||||
try
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#define BOOST_GRAPHVIZ_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <cstdio> // for FILE
|
||||
#include <fstream>
|
||||
#include <stdio.h> // for FILE
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
@@ -651,8 +651,8 @@ void write_graphviz_dp(std::ostream& out, const Graph& g,
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
struct BOOST_SYMBOL_VISIBLE graph_exception : public std::exception
|
||||
{
|
||||
virtual ~graph_exception() throw() {}
|
||||
virtual const char* what() const throw() = 0;
|
||||
~graph_exception() throw() BOOST_OVERRIDE {}
|
||||
const char* what() const throw() BOOST_OVERRIDE = 0;
|
||||
};
|
||||
|
||||
struct BOOST_SYMBOL_VISIBLE bad_parallel_edge : public graph_exception
|
||||
@@ -665,8 +665,8 @@ struct BOOST_SYMBOL_VISIBLE bad_parallel_edge : public graph_exception
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~bad_parallel_edge() throw() {}
|
||||
const char* what() const throw()
|
||||
~bad_parallel_edge() throw() BOOST_OVERRIDE {}
|
||||
const char* what() const throw() BOOST_OVERRIDE
|
||||
{
|
||||
if (statement.empty())
|
||||
statement = std::string("Failed to add parallel edge: (") + from
|
||||
@@ -678,8 +678,8 @@ struct BOOST_SYMBOL_VISIBLE bad_parallel_edge : public graph_exception
|
||||
|
||||
struct BOOST_SYMBOL_VISIBLE directed_graph_error : public graph_exception
|
||||
{
|
||||
virtual ~directed_graph_error() throw() {}
|
||||
virtual const char* what() const throw()
|
||||
~directed_graph_error() throw() BOOST_OVERRIDE {}
|
||||
const char* what() const throw() BOOST_OVERRIDE
|
||||
{
|
||||
return "read_graphviz: "
|
||||
"Tried to read a directed graph into an undirected graph.";
|
||||
@@ -688,8 +688,8 @@ struct BOOST_SYMBOL_VISIBLE directed_graph_error : public graph_exception
|
||||
|
||||
struct BOOST_SYMBOL_VISIBLE undirected_graph_error : public graph_exception
|
||||
{
|
||||
virtual ~undirected_graph_error() throw() {}
|
||||
virtual const char* what() const throw()
|
||||
~undirected_graph_error() throw() BOOST_OVERRIDE {}
|
||||
const char* what() const throw() BOOST_OVERRIDE
|
||||
{
|
||||
return "read_graphviz: "
|
||||
"Tried to read an undirected graph into a directed graph.";
|
||||
@@ -700,8 +700,8 @@ struct BOOST_SYMBOL_VISIBLE bad_graphviz_syntax : public graph_exception
|
||||
{
|
||||
std::string errmsg;
|
||||
bad_graphviz_syntax(const std::string& errmsg) : errmsg(errmsg) {}
|
||||
const char* what() const throw() { return errmsg.c_str(); }
|
||||
~bad_graphviz_syntax() throw() {};
|
||||
const char* what() const throw() BOOST_OVERRIDE { return errmsg.c_str(); }
|
||||
~bad_graphviz_syntax() throw() BOOST_OVERRIDE {}
|
||||
};
|
||||
|
||||
namespace detail
|
||||
@@ -723,7 +723,7 @@ namespace detail
|
||||
{
|
||||
static int idx = 0;
|
||||
return edge_t(idx++);
|
||||
};
|
||||
}
|
||||
|
||||
bool operator==(const edge_t& rhs) const
|
||||
{
|
||||
@@ -774,9 +774,9 @@ namespace detail
|
||||
{
|
||||
}
|
||||
|
||||
~mutate_graph_impl() {}
|
||||
~mutate_graph_impl() BOOST_OVERRIDE {}
|
||||
|
||||
bool is_directed() const
|
||||
bool is_directed() const BOOST_OVERRIDE
|
||||
{
|
||||
return boost::is_convertible<
|
||||
typename boost::graph_traits<
|
||||
@@ -784,7 +784,7 @@ namespace detail
|
||||
boost::directed_tag >::value;
|
||||
}
|
||||
|
||||
virtual void do_add_vertex(const node_t& node)
|
||||
void do_add_vertex(const node_t& node) BOOST_OVERRIDE
|
||||
{
|
||||
// Add the node to the graph.
|
||||
bgl_vertex_t v = add_vertex(graph_);
|
||||
@@ -797,8 +797,8 @@ namespace detail
|
||||
put(node_id_prop_, dp_, v, node);
|
||||
}
|
||||
|
||||
void do_add_edge(
|
||||
const edge_t& edge, const node_t& source, const node_t& target)
|
||||
void do_add_edge(const edge_t& edge, const node_t& source,
|
||||
const node_t& target) BOOST_OVERRIDE
|
||||
{
|
||||
std::pair< bgl_edge_t, bool > result
|
||||
= add_edge(bgl_nodes[source], bgl_nodes[target], graph_);
|
||||
@@ -814,25 +814,26 @@ namespace detail
|
||||
}
|
||||
}
|
||||
|
||||
void set_node_property(
|
||||
const id_t& key, const node_t& node, const id_t& value)
|
||||
void set_node_property(const id_t& key, const node_t& node,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
put(key, dp_, bgl_nodes[node], value);
|
||||
}
|
||||
|
||||
void set_edge_property(
|
||||
const id_t& key, const edge_t& edge, const id_t& value)
|
||||
void set_edge_property(const id_t& key, const edge_t& edge,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
put(key, dp_, bgl_edges[edge], value);
|
||||
}
|
||||
|
||||
void set_graph_property(const id_t& key, const id_t& value)
|
||||
void set_graph_property(const id_t& key,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
/* RG: pointer to graph prevents copying */
|
||||
put(key, dp_, &graph_, value);
|
||||
}
|
||||
|
||||
void finish_building_graph() {}
|
||||
void finish_building_graph() BOOST_OVERRIDE {}
|
||||
|
||||
protected:
|
||||
MutableGraph& graph_;
|
||||
@@ -869,9 +870,9 @@ namespace detail
|
||||
{
|
||||
}
|
||||
|
||||
~mutate_graph_impl() {}
|
||||
~mutate_graph_impl() BOOST_OVERRIDE {}
|
||||
|
||||
void finish_building_graph()
|
||||
void finish_building_graph() BOOST_OVERRIDE
|
||||
{
|
||||
typedef compressed_sparse_row_graph< directedS, no_property,
|
||||
bgl_edge_t, GraphProperty, Vertex, EdgeIndex >
|
||||
@@ -902,14 +903,14 @@ namespace detail
|
||||
}
|
||||
}
|
||||
|
||||
bool is_directed() const
|
||||
bool is_directed() const BOOST_OVERRIDE
|
||||
{
|
||||
return boost::is_convertible<
|
||||
typename boost::graph_traits< CSRGraph >::directed_category,
|
||||
boost::directed_tag >::value;
|
||||
}
|
||||
|
||||
virtual void do_add_vertex(const node_t& node)
|
||||
void do_add_vertex(const node_t& node) BOOST_OVERRIDE
|
||||
{
|
||||
// Add the node to the graph.
|
||||
bgl_vertex_t v = vertex_count++;
|
||||
@@ -923,8 +924,8 @@ namespace detail
|
||||
boost::make_tuple(node_id_prop_, v, node));
|
||||
}
|
||||
|
||||
void do_add_edge(
|
||||
const edge_t& edge, const node_t& source, const node_t& target)
|
||||
void do_add_edge(const edge_t& edge, const node_t& source,
|
||||
const node_t& target) BOOST_OVERRIDE
|
||||
{
|
||||
bgl_edge_t result = edges_to_add.size();
|
||||
edges_to_add.push_back(
|
||||
@@ -932,21 +933,22 @@ namespace detail
|
||||
bgl_edges.insert(std::make_pair(edge, result));
|
||||
}
|
||||
|
||||
void set_node_property(
|
||||
const id_t& key, const node_t& node, const id_t& value)
|
||||
void set_node_property(const id_t& key, const node_t& node,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
vertex_props.push_back(
|
||||
boost::make_tuple(key, bgl_nodes[node], value));
|
||||
}
|
||||
|
||||
void set_edge_property(
|
||||
const id_t& key, const edge_t& edge, const id_t& value)
|
||||
void set_edge_property(const id_t& key, const edge_t& edge,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
edge_props.push_back(
|
||||
boost::make_tuple(key, bgl_edges[edge], value));
|
||||
}
|
||||
|
||||
void set_graph_property(const id_t& key, const id_t& value)
|
||||
void set_graph_property(const id_t& key,
|
||||
const id_t& value) BOOST_OVERRIDE
|
||||
{
|
||||
/* RG: pointer to graph prevents copying */
|
||||
put(key, dp_, &graph_, value);
|
||||
@@ -1025,6 +1027,6 @@ bool read_graphviz(std::istream& in, MutableGraph& graph,
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / graphviz.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/graphviz.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPHVIZ_HPP
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <numeric>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/properties.hpp>
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
@@ -21,6 +23,7 @@
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/graph/graph_concepts.hpp>
|
||||
#include <boost/concept/assert.hpp>
|
||||
#include <boost/algorithm/minmax_element.hpp>
|
||||
|
||||
/** @file howard_cycle_ratio.hpp
|
||||
* @brief The implementation of the maximum/minimum cycle ratio/mean algorithm.
|
||||
@@ -238,9 +241,11 @@ namespace detail
|
||||
typename graph_traits< Graph >::out_edge_iterator oei, oeie;
|
||||
for (boost::tie(vi, vie) = vertices(m_g); vi != vie; ++vi)
|
||||
{
|
||||
using namespace boost::placeholders;
|
||||
|
||||
boost::tie(oei, oeie) = out_edges(*vi, m_g);
|
||||
typename graph_traits< Graph >::out_edge_iterator mei
|
||||
= std::max_element(oei, oeie,
|
||||
= boost::first_max_element(oei, oeie,
|
||||
boost::bind(m_cmp,
|
||||
boost::bind(&EdgeWeight1::operator[], m_ew1m, _1),
|
||||
boost::bind(&EdgeWeight1::operator[], m_ew1m, _2)));
|
||||
@@ -351,6 +356,8 @@ namespace detail
|
||||
*/
|
||||
float_t policy_mcr()
|
||||
{
|
||||
using namespace boost::placeholders;
|
||||
|
||||
std::fill(m_col_bfs.begin(), m_col_bfs.end(), my_white);
|
||||
color_map_t vcm_ = color_map_t(m_col_bfs.begin(), m_vim);
|
||||
typename graph_traits< Graph >::vertex_iterator uv_itr, vie;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#ifndef BOOST_INCREMENTAL_COMPONENTS_HPP
|
||||
#define BOOST_INCREMENTAL_COMPONENTS_HPP
|
||||
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/graph/detail/incremental_components.hpp>
|
||||
#include <boost/iterator/counting_iterator.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/pending/disjoint_sets.hpp>
|
||||
#include <iterator>
|
||||
|
||||
@@ -69,7 +69,7 @@ void compress_components(ParentIterator first, ParentIterator last)
|
||||
}
|
||||
|
||||
template < class ParentIterator >
|
||||
typename boost::detail::iterator_traits< ParentIterator >::difference_type
|
||||
typename std::iterator_traits< ParentIterator >::difference_type
|
||||
component_count(ParentIterator first, ParentIterator last)
|
||||
{
|
||||
std::ptrdiff_t count = 0;
|
||||
|
||||
@@ -11,7 +11,12 @@
|
||||
#ifndef BOOST_GRAPH_KING_HPP
|
||||
#define BOOST_GRAPH_KING_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/graph/detail/sparse_ordering.hpp>
|
||||
#include <boost/graph/graph_utility.hpp>
|
||||
|
||||
@@ -44,6 +49,8 @@ namespace detail
|
||||
template < typename Vertex, typename Graph >
|
||||
void finish_vertex(Vertex, Graph& g)
|
||||
{
|
||||
using namespace boost::placeholders;
|
||||
|
||||
typename graph_traits< Graph >::out_edge_iterator ei, ei_end;
|
||||
Vertex v, w;
|
||||
|
||||
|
||||
@@ -99,6 +99,6 @@ inline one_bit_color_map< IndexMap > make_one_bit_color_map(
|
||||
|
||||
} // end namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / one_bit_color_map.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/one_bit_color_map.hpp>)
|
||||
|
||||
#endif // BOOST_ONE_BIT_COLOR_MAP_HPP
|
||||
|
||||
@@ -174,6 +174,6 @@ namespace graph
|
||||
}
|
||||
} // end namespace boost::graph
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / page_rank.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/page_rank.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_PAGE_RANK_HPP
|
||||
|
||||
@@ -658,6 +658,6 @@ private:
|
||||
|
||||
} // end namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / rmat_graph_generator.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/rmat_graph_generator.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_RMAT_GENERATOR_HPP
|
||||
|
||||
@@ -342,6 +342,6 @@ kosaraju_strong_components(
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / strong_components.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/strong_components.hpp>)
|
||||
|
||||
#endif // BOOST_GRAPH_STRONG_COMPONENTS_HPP
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <algorithm> // for std::min and std::max
|
||||
#include <functional>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/bind.hpp>
|
||||
#include <boost/graph/strong_components.hpp>
|
||||
#include <boost/graph/topological_sort.hpp>
|
||||
#include <boost/graph/graph_concepts.hpp>
|
||||
@@ -131,6 +131,8 @@ void transitive_closure(const Graph& g, GraphTC& tc,
|
||||
std::vector< std::vector< cg_vertex > > CG_vec(num_vertices(CG));
|
||||
for (size_type i = 0; i < num_vertices(CG); ++i)
|
||||
{
|
||||
using namespace boost::placeholders;
|
||||
|
||||
typedef typename boost::graph_traits< CG_t >::adjacency_iterator
|
||||
cg_adj_iter;
|
||||
std::pair< cg_adj_iter, cg_adj_iter > pr = adjacent_vertices(i, CG);
|
||||
@@ -156,9 +158,16 @@ void transitive_closure(const Graph& g, GraphTC& tc,
|
||||
{
|
||||
chain.push_back(v);
|
||||
in_a_chain[v] = true;
|
||||
|
||||
typename std::vector< cg_vertex >::const_iterator next
|
||||
#ifdef __cpp_lib_not_fn
|
||||
= std::find_if(CG_vec[v].begin(), CG_vec[v].end(),
|
||||
std::not1(detail::subscript(in_a_chain)));
|
||||
std::not_fn(detail::subscript(in_a_chain)));
|
||||
#else
|
||||
= std::find_if(CG_vec[v].begin(), CG_vec[v].end(),
|
||||
std::not1(detail::subscript(in_a_chain)));
|
||||
#endif
|
||||
|
||||
if (next != CG_vec[v].end())
|
||||
v = *next;
|
||||
else
|
||||
|
||||
@@ -103,6 +103,6 @@ inline two_bit_color_map< IndexMap > make_two_bit_color_map(
|
||||
|
||||
} // end namespace boost
|
||||
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(< boost / graph / distributed / two_bit_color_map.hpp >)
|
||||
#include BOOST_GRAPH_MPI_INCLUDE(<boost/graph/distributed/two_bit_color_map.hpp>)
|
||||
|
||||
#endif // BOOST_TWO_BIT_COLOR_MAP_HPP
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
// Authors: Douglas Gregor
|
||||
// Andrew Lumsdaine
|
||||
#warning \
|
||||
"Use of relaxed_heap is depreciated; please use the standard heap functions."
|
||||
|
||||
#ifndef BOOST_RELAXED_HEAP_HEADER
|
||||
#define BOOST_RELAXED_HEAP_HEADER
|
||||
|
||||
|
||||
+2
-1
@@ -12,5 +12,6 @@
|
||||
],
|
||||
"maintainers": [
|
||||
"K. Noel Belcourt <kbelco -at- sandia.gov>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
+5
-2
@@ -18,6 +18,9 @@
|
||||
#include <boost/graph/dll_import_export.hpp>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using namespace boost;
|
||||
|
||||
@@ -162,8 +165,8 @@ public:
|
||||
std::string local_directed
|
||||
= edge.second.get(path("<xmlattr>/directed"), "");
|
||||
bool is_directed
|
||||
= (local_directed == "" ? default_directed
|
||||
: local_directed == "true");
|
||||
= (local_directed.empty() ? default_directed
|
||||
: local_directed == "true");
|
||||
if (is_directed != m_g.is_directed())
|
||||
{
|
||||
if (is_directed)
|
||||
|
||||
@@ -33,19 +33,18 @@
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/algorithm/string/case_conv.hpp>
|
||||
#include <cstdlib>
|
||||
#include <algorithm>
|
||||
#include <exception> // for std::exception
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/graph/dll_import_export.hpp>
|
||||
#include <boost/graph/graphviz.hpp>
|
||||
|
||||
@@ -334,6 +333,8 @@ namespace read_graphviz_detail
|
||||
BOOST_ASSERT(!"Definition of punctuation_token does "
|
||||
"not match switch statement");
|
||||
}
|
||||
// Prevent static analyzers complaining about fallthrough:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
BOOST_ASSERT(!"Definition of punctuation_token does not "
|
||||
@@ -827,7 +828,7 @@ namespace read_graphviz_detail
|
||||
get();
|
||||
if (peek().type != token::identifier)
|
||||
error("Wanted identifier as port angle");
|
||||
if (id.angle != "")
|
||||
if (!id.angle.empty())
|
||||
error("Duplicate port angle");
|
||||
id.angle = get().normalized_value;
|
||||
goto parse_more;
|
||||
|
||||
+10
-10
@@ -9,6 +9,7 @@
|
||||
|
||||
import modules ;
|
||||
import path ;
|
||||
import ../../config/checks/config : requires ;
|
||||
|
||||
path-constant TEST_DIR : . ;
|
||||
|
||||
@@ -69,12 +70,11 @@ alias graph_test_regular :
|
||||
[ run graph.cpp : : : <define>TEST=9 : graph_9 ]
|
||||
[ compile graph_concepts.cpp ]
|
||||
[ run graphviz_test.cpp
|
||||
/boost/test//boost_test_exec_monitor/<link>static
|
||||
../build//boost_graph
|
||||
../../regex/build//boost_regex : --log_level=all ]
|
||||
[ run metis_test.cpp : $(METIS_INPUT_FILE) ]
|
||||
[ run gursoy_atun_layout_test.cpp ]
|
||||
[ run layout_test.cpp : : : <test-info>always_show_run_output <toolset>intel:<debug-symbols>off ]
|
||||
[ run gursoy_atun_layout_test.cpp : : : [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ]
|
||||
[ run layout_test.cpp : : : <test-info>always_show_run_output <toolset>intel:<debug-symbols>off [ requires cxx11_noexcept cxx11_rvalue_references sfinae_expr cxx11_auto_declarations cxx11_lambdas cxx11_unified_initialization_syntax cxx11_hdr_tuple cxx11_hdr_initializer_list cxx11_hdr_chrono cxx11_thread_local cxx11_constexpr cxx11_nullptr cxx11_numeric_limits cxx11_decltype cxx11_hdr_array cxx11_hdr_atomic cxx11_hdr_type_traits cxx11_allocator cxx11_explicit_conversion_operators ] ]
|
||||
|
||||
[ run serialize.cpp
|
||||
../../serialization/build//boost_serialization
|
||||
@@ -86,7 +86,7 @@ alias graph_test_regular :
|
||||
# TODO: Merge these into a single test framework.
|
||||
[ run subgraph.cpp ]
|
||||
[ run subgraph_bundled.cpp ]
|
||||
[ run subgraph_add.cpp ../../test/build//boost_unit_test_framework/<link>static : $(TEST_DIR) ]
|
||||
[ run subgraph_add.cpp : $(TEST_DIR) ]
|
||||
[ run subgraph_props.cpp ]
|
||||
|
||||
[ run isomorphism.cpp ]
|
||||
@@ -142,17 +142,17 @@ alias graph_test_regular :
|
||||
[ run random_spanning_tree_test.cpp ../build//boost_graph ]
|
||||
[ run random_matching_test.cpp : 1000 1020 ]
|
||||
[ run graphml_test.cpp ../build//boost_graph : : "graphml_test.xml" ]
|
||||
[ run mas_test.cpp ../../test/build//boost_unit_test_framework/<link>static : $(TEST_DIR) ]
|
||||
[ run stoer_wagner_test.cpp ../../test/build//boost_unit_test_framework/<link>static : $(TEST_DIR) ]
|
||||
[ run mas_test.cpp : $(TEST_DIR) ]
|
||||
[ run stoer_wagner_test.cpp : $(TEST_DIR) ]
|
||||
[ compile filtered_graph_properties_dijkstra.cpp ]
|
||||
[ run vf2_sub_graph_iso_test.cpp ]
|
||||
[ run vf2_sub_graph_iso_test_2.cpp ]
|
||||
[ run hawick_circuits.cpp ]
|
||||
[ run successive_shortest_path_nonnegative_weights_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
|
||||
[ run cycle_canceling_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
|
||||
[ run successive_shortest_path_nonnegative_weights_test.cpp ]
|
||||
[ run cycle_canceling_test.cpp ]
|
||||
[ run strong_components_test.cpp ]
|
||||
[ run find_flow_cost_bundled_properties_and_named_params_test.cpp ../../test/build//boost_unit_test_framework/<link>static ]
|
||||
[ run max_flow_algorithms_bundled_properties_and_named_params.cpp ../../test/build//boost_unit_test_framework/<link>static ]
|
||||
[ run find_flow_cost_bundled_properties_and_named_params_test.cpp ]
|
||||
[ run max_flow_algorithms_bundled_properties_and_named_params.cpp ]
|
||||
[ run delete_edge.cpp ]
|
||||
[ run johnson-test.cpp ]
|
||||
[ run lvalue_pmap.cpp ]
|
||||
|
||||
@@ -7,16 +7,14 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//=======================================================================
|
||||
|
||||
#define BOOST_TEST_MODULE cycle_canceling_test
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <boost/graph/cycle_canceling.hpp>
|
||||
#include <boost/graph/edmonds_karp_max_flow.hpp>
|
||||
|
||||
#include "min_cost_max_flow_utils.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_CASE(cycle_canceling_def_test)
|
||||
void cycle_canceling_def_test()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
boost::SampleGraph::Graph g;
|
||||
@@ -26,10 +24,10 @@ BOOST_AUTO_TEST_CASE(cycle_canceling_def_test)
|
||||
boost::cycle_canceling(g);
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 29);
|
||||
BOOST_TEST_EQ(cost, 29);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(path_augmentation_def_test2)
|
||||
void path_augmentation_def_test2()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
boost::SampleGraph::Graph g;
|
||||
@@ -39,10 +37,10 @@ BOOST_AUTO_TEST_CASE(path_augmentation_def_test2)
|
||||
boost::cycle_canceling(g);
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 7);
|
||||
BOOST_TEST_EQ(cost, 7);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(cycle_canceling_test)
|
||||
void cycle_canceling_test()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
typedef boost::SampleGraph::Graph Graph;
|
||||
@@ -66,5 +64,13 @@ BOOST_AUTO_TEST_CASE(cycle_canceling_test)
|
||||
.vertex_index_map(idx));
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 29);
|
||||
BOOST_TEST_EQ(cost, 29);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
cycle_canceling_def_test();
|
||||
path_augmentation_def_test2();
|
||||
cycle_canceling_test();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#define BOOST_TEST_MODULE \
|
||||
find_flow_cost_bundled_properties_and_named_params_test
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/graph/successive_shortest_path_nonnegative_weights.hpp>
|
||||
#include <boost/graph/find_flow_cost.hpp>
|
||||
#include "min_cost_max_flow_utils.hpp"
|
||||
@@ -29,7 +26,7 @@ typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS,
|
||||
|
||||
// Unit test written in order to fails (at compile time) if the find_flow_cost()
|
||||
// is not properly handling bundled properties
|
||||
BOOST_AUTO_TEST_CASE(using_bundled_properties_with_find_max_flow_test)
|
||||
void using_bundled_properties_with_find_max_flow_test()
|
||||
{
|
||||
Graph g;
|
||||
traits::vertex_descriptor s, t;
|
||||
@@ -59,13 +56,12 @@ BOOST_AUTO_TEST_CASE(using_bundled_properties_with_find_max_flow_test)
|
||||
|
||||
// The "bundled properties" version (producing errors)
|
||||
int flow_cost = boost::find_flow_cost(g, capacity, residual_capacity, cost);
|
||||
BOOST_CHECK_EQUAL(flow_cost, 29);
|
||||
BOOST_TEST_EQ(flow_cost, 29);
|
||||
}
|
||||
|
||||
// Unit test written in order to fails (at compile time) if the find_flow_cost()
|
||||
// is not properly handling bundled properties
|
||||
BOOST_AUTO_TEST_CASE(
|
||||
using_named_params_and_bundled_properties_with_find_max_flow_test)
|
||||
void using_named_params_and_bundled_properties_with_find_max_flow_test()
|
||||
{
|
||||
Graph g;
|
||||
traits::vertex_descriptor s, t;
|
||||
@@ -99,5 +95,12 @@ BOOST_AUTO_TEST_CASE(
|
||||
boost::capacity_map(capacity)
|
||||
.residual_capacity_map(residual_capacity)
|
||||
.weight_map(cost));
|
||||
BOOST_CHECK_EQUAL(flow_cost, 29);
|
||||
BOOST_TEST_EQ(flow_cost, 29);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
using_bundled_properties_with_find_max_flow_test();
|
||||
using_named_params_and_bundled_properties_with_find_max_flow_test();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
+71
-42
@@ -12,7 +12,6 @@
|
||||
// Author: Ronald Garcia
|
||||
|
||||
#define BOOST_GRAPHVIZ_USE_ISTREAM
|
||||
#define BOOST_TEST_MODULE TestGraphviz
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/graph/graphviz.hpp>
|
||||
#include <boost/assign/std/map.hpp>
|
||||
@@ -21,15 +20,29 @@
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/property_map/dynamic_property_map.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/floating_point_comparison.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <cmath>
|
||||
|
||||
template<class T>
|
||||
class close_to {
|
||||
public:
|
||||
explicit close_to(T f)
|
||||
: f_(f) { }
|
||||
|
||||
bool operator()(T l, T r) const {
|
||||
return std::abs(l - r) <=
|
||||
(std::max)(f_ * (std::max)(std::abs(l), std::abs(r)), T());
|
||||
}
|
||||
|
||||
private:
|
||||
T f_;
|
||||
};
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
@@ -92,7 +105,7 @@ bool test_graph(std::istream& dotfile, graph_t& graph,
|
||||
{
|
||||
#endif
|
||||
// check correct vertex count
|
||||
BOOST_CHECK_EQUAL(num_vertices(graph), correct_num_vertices);
|
||||
BOOST_TEST_EQ(num_vertices(graph), correct_num_vertices);
|
||||
// check masses
|
||||
if (!masses.empty())
|
||||
{
|
||||
@@ -105,10 +118,10 @@ bool test_graph(std::istream& dotfile, graph_t& graph,
|
||||
std::string node_name = get(name, *i);
|
||||
// - get its mass
|
||||
float node_mass = get(mass, *i);
|
||||
BOOST_CHECK(masses.find(node_name) != masses.end());
|
||||
BOOST_TEST(masses.find(node_name) != masses.end());
|
||||
float ref_mass = masses.find(node_name)->second;
|
||||
// - compare the mass to the result in the table
|
||||
BOOST_CHECK_CLOSE(node_mass, ref_mass, 0.01f);
|
||||
BOOST_TEST_WITH(node_mass, ref_mass, close_to<float>(0.01f));
|
||||
}
|
||||
}
|
||||
// check weights
|
||||
@@ -124,16 +137,16 @@ bool test_graph(std::istream& dotfile, graph_t& graph,
|
||||
get(name, source(*i, graph)), get(name, target(*i, graph)));
|
||||
// - get its weight
|
||||
double edge_weight = get(weight, *i);
|
||||
BOOST_CHECK(weights.find(edge_name) != weights.end());
|
||||
BOOST_TEST(weights.find(edge_name) != weights.end());
|
||||
double ref_weight = weights.find(edge_name)->second;
|
||||
// - compare the weight to teh result in the table
|
||||
BOOST_CHECK_CLOSE(edge_weight, ref_weight, 0.01);
|
||||
BOOST_TEST_WITH(edge_weight, ref_weight, close_to<double>(0.01));
|
||||
}
|
||||
}
|
||||
if (!g_name.empty())
|
||||
{
|
||||
std::string parsed_name = get_property(graph, graph_name);
|
||||
BOOST_CHECK(parsed_name == g_name);
|
||||
BOOST_TEST(parsed_name == g_name);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -166,27 +179,27 @@ struct edge_p_bundled
|
||||
};
|
||||
|
||||
// Basic directed graph tests
|
||||
BOOST_AUTO_TEST_CASE(basic_directed_graph_1)
|
||||
void test_basic_directed_graph_1()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 7.7f)("e", 6.66f);
|
||||
gs_t gs("digraph { a node [mass = 7.7] c e [mass = 6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 3, masses, weight_map_t())));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 3, masses, weight_map_t())));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(basic_directed_graph_2)
|
||||
void test_basic_directed_graph_2()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("e", 6.66f);
|
||||
gs_t gs("digraph { a node [mass = 7.7] \"a\" e [mass = 6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 2, masses, weight_map_t())));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 2, masses, weight_map_t())));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(basic_directed_graph_3)
|
||||
void test_basic_directed_graph_3()
|
||||
{
|
||||
weight_map_t weights;
|
||||
insert(weights)(make_pair("a", "b"), 0.0)(make_pair("c", "d"), 7.7)(
|
||||
@@ -197,33 +210,33 @@ BOOST_AUTO_TEST_CASE(basic_directed_graph_3)
|
||||
"d ->e->a [weight=.5]}");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 6, mass_map_t(), weights)));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 6, mass_map_t(), weights)));
|
||||
}
|
||||
|
||||
// undirected graph with alternate node_id property name
|
||||
BOOST_AUTO_TEST_CASE(undirected_graph_alternate_node_id)
|
||||
void test_undirected_graph_alternate_node_id()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 7.7f)("e", 6.66f);
|
||||
gs_t gs("graph { a node [mass = 7.7] c e [mass = 6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, undirectedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK(
|
||||
BOOST_TEST(
|
||||
(test_graph< graph_t >(gs, 3, masses, weight_map_t(), "nodenames")));
|
||||
}
|
||||
|
||||
// Basic undirected graph tests
|
||||
BOOST_AUTO_TEST_CASE(basic_undirected_graph_1)
|
||||
void test_basic_undirected_graph_1()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 7.7f)("e", 6.66f);
|
||||
gs_t gs("graph { a node [mass = 7.7] c e [mass =\\\n6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, undirectedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 3, masses, weight_map_t())));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 3, masses, weight_map_t())));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(basic_undirected_graph_2)
|
||||
void test_basic_undirected_graph_2()
|
||||
{
|
||||
weight_map_t weights;
|
||||
insert(weights)(make_pair("a", "b"), 0.0)(make_pair("c", "d"), 7.7)(
|
||||
@@ -232,11 +245,11 @@ BOOST_AUTO_TEST_CASE(basic_undirected_graph_2)
|
||||
"c -- d e -- f [weight = 6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, undirectedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 6, mass_map_t(), weights)));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 6, mass_map_t(), weights)));
|
||||
}
|
||||
|
||||
// Mismatch directed graph test
|
||||
BOOST_AUTO_TEST_CASE(mismatch_directed_graph)
|
||||
void test_mismatch_directed_graph()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 7.7f)("e", 6.66f);
|
||||
@@ -260,7 +273,7 @@ BOOST_AUTO_TEST_CASE(mismatch_directed_graph)
|
||||
}
|
||||
|
||||
// Mismatch undirected graph test
|
||||
BOOST_AUTO_TEST_CASE(mismatch_undirected_graph)
|
||||
void test_mismatch_undirected_graph()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 7.7f)("e", 6.66f);
|
||||
@@ -279,9 +292,8 @@ BOOST_AUTO_TEST_CASE(mismatch_undirected_graph)
|
||||
}
|
||||
|
||||
// Complain about parallel edges
|
||||
BOOST_AUTO_TEST_CASE(complain_about_parallel_edges)
|
||||
void test_complain_about_parallel_edges()
|
||||
{
|
||||
BOOST_TEST_CHECKPOINT("Complain about parallel edges");
|
||||
weight_map_t weights;
|
||||
insert(weights)(make_pair("a", "b"), 7.7);
|
||||
gs_t gs("diGraph { a -> b [weight = 7.7] a -> b [weight = 7.7] }");
|
||||
@@ -299,18 +311,18 @@ BOOST_AUTO_TEST_CASE(complain_about_parallel_edges)
|
||||
}
|
||||
|
||||
// Handle parallel edges gracefully
|
||||
BOOST_AUTO_TEST_CASE(handle_parallel_edges_gracefully)
|
||||
void test_handle_parallel_edges_gracefully()
|
||||
{
|
||||
weight_map_t weights;
|
||||
insert(weights)(make_pair("a", "b"), 7.7);
|
||||
gs_t gs("digraph { a -> b [weight = 7.7] a -> b [weight = 7.7] }");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 2, mass_map_t(), weights)));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 2, mass_map_t(), weights)));
|
||||
}
|
||||
|
||||
// Graph Property Test 1
|
||||
BOOST_AUTO_TEST_CASE(graph_property_test_1)
|
||||
void test_graph_property_test_1()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 0.0f)("e", 6.66f);
|
||||
@@ -319,12 +331,12 @@ BOOST_AUTO_TEST_CASE(graph_property_test_1)
|
||||
std::string graph_name("foo \"escaped\"");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK(
|
||||
BOOST_TEST(
|
||||
(test_graph< graph_t >(gs, 3, masses, weight_map_t(), "", graph_name)));
|
||||
}
|
||||
|
||||
// Graph Property Test 2
|
||||
BOOST_AUTO_TEST_CASE(graph_property_test_2)
|
||||
void test_graph_property_test_2()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 0.0f)("e", 6.66f);
|
||||
@@ -332,12 +344,12 @@ BOOST_AUTO_TEST_CASE(graph_property_test_2)
|
||||
std::string graph_name("foo");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK(
|
||||
BOOST_TEST(
|
||||
(test_graph< graph_t >(gs, 3, masses, weight_map_t(), "", graph_name)));
|
||||
}
|
||||
|
||||
// Graph Property Test 3 (HTML)
|
||||
BOOST_AUTO_TEST_CASE(graph_property_test_3)
|
||||
void test_graph_property_test_3()
|
||||
{
|
||||
mass_map_t masses;
|
||||
insert(masses)("a", 0.0f)("c", 0.0f)("e", 6.66f);
|
||||
@@ -347,12 +359,12 @@ BOOST_AUTO_TEST_CASE(graph_property_test_3)
|
||||
gs_t gs("digraph { name=" + graph_name + " a c e [mass = 6.66] }");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK(
|
||||
BOOST_TEST(
|
||||
(test_graph< graph_t >(gs, 3, masses, weight_map_t(), "", graph_name)));
|
||||
}
|
||||
|
||||
// Comments embedded in strings
|
||||
BOOST_AUTO_TEST_CASE(comments_embedded_in_strings)
|
||||
void test_comments_embedded_in_strings()
|
||||
{
|
||||
gs_t gs("digraph { "
|
||||
"a0 [ label = \"//depot/path/to/file_14#4\" ];"
|
||||
@@ -361,11 +373,11 @@ BOOST_AUTO_TEST_CASE(comments_embedded_in_strings)
|
||||
"}");
|
||||
typedef adjacency_list< vecS, vecS, directedS, vertex_p, edge_p, graph_p >
|
||||
graph_t;
|
||||
BOOST_CHECK((test_graph< graph_t >(gs, 2, mass_map_t(), weight_map_t())));
|
||||
BOOST_TEST((test_graph< graph_t >(gs, 2, mass_map_t(), weight_map_t())));
|
||||
}
|
||||
|
||||
#if 0 // Currently broken
|
||||
BOOST_AUTO_TEST_CASE (basic_csr_directed_graph) {
|
||||
void test_basic_csr_directed_graph() {
|
||||
weight_map_t weights;
|
||||
insert( weights )(make_pair("a","b"),0.0)
|
||||
(make_pair("c","d"),7.7)(make_pair("e","f"),6.66)
|
||||
@@ -374,11 +386,11 @@ BOOST_AUTO_TEST_CASE(comments_embedded_in_strings)
|
||||
"c -> d e-> f [weight = 6.66] "
|
||||
"d ->e->a [weight=.5]}");
|
||||
typedef compressed_sparse_row_graph<directedS, vertex_p_bundled, edge_p_bundled, graph_p > graph_t;
|
||||
BOOST_CHECK((test_graph<graph_t>(gs,6,mass_map_t(),weights,"node_id","",&vertex_p_bundled::name,&vertex_p_bundled::color,&edge_p_bundled::weight)));
|
||||
BOOST_TEST((test_graph<graph_t>(gs,6,mass_map_t(),weights,"node_id","",&vertex_p_bundled::name,&vertex_p_bundled::color,&edge_p_bundled::weight)));
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE(basic_csr_directed_graph_ext_props)
|
||||
void test_basic_csr_directed_graph_ext_props()
|
||||
{
|
||||
weight_map_t weights;
|
||||
insert(weights)(make_pair("a", "b"), 0.0)(make_pair("c", "d"), 7.7)(
|
||||
@@ -400,9 +412,26 @@ BOOST_AUTO_TEST_CASE(basic_csr_directed_graph_ext_props)
|
||||
vector_property_map< double,
|
||||
property_map< graph_t, edge_index_t >::const_type >
|
||||
edge_weight(get(edge_index, g));
|
||||
BOOST_CHECK((test_graph(gs, g, 6, mass_map_t(), weights, "node_id", "",
|
||||
BOOST_TEST((test_graph(gs, g, 6, mass_map_t(), weights, "node_id", "",
|
||||
vertex_name, vertex_color, edge_weight)));
|
||||
}
|
||||
|
||||
// return 0;
|
||||
// }
|
||||
int main()
|
||||
{
|
||||
test_basic_directed_graph_1();
|
||||
test_basic_directed_graph_2();
|
||||
test_basic_directed_graph_3();
|
||||
test_undirected_graph_alternate_node_id();
|
||||
test_basic_undirected_graph_1();
|
||||
test_basic_undirected_graph_2();
|
||||
test_mismatch_directed_graph();
|
||||
test_mismatch_undirected_graph();
|
||||
test_complain_about_parallel_edges();
|
||||
test_handle_parallel_edges_gracefully();
|
||||
test_graph_property_test_1();
|
||||
test_graph_property_test_2();
|
||||
test_graph_property_test_3();
|
||||
test_comments_embedded_in_strings();
|
||||
test_basic_csr_directed_graph_ext_props();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
+31
-34
@@ -18,7 +18,7 @@
|
||||
#include <boost/graph/visitors.hpp>
|
||||
#include <boost/graph/property_maps/constant_property_map.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/tuple/tuple_comparison.hpp>
|
||||
#include <boost/tuple/tuple_io.hpp>
|
||||
@@ -37,19 +37,6 @@ typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS >
|
||||
|
||||
std::string test_dir;
|
||||
|
||||
boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " path-to-libs-graph-test"
|
||||
<< std::endl;
|
||||
throw boost::unit_test::framework::setup_error(
|
||||
"Invalid command line arguments");
|
||||
}
|
||||
test_dir = argv[1];
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct edge_t
|
||||
{
|
||||
unsigned long first;
|
||||
@@ -111,7 +98,7 @@ private:
|
||||
// Check various implementations of the ArgPack where
|
||||
// the weights are provided in it, and one case where
|
||||
// they are not.
|
||||
BOOST_AUTO_TEST_CASE(test0)
|
||||
void test0()
|
||||
{
|
||||
typedef boost::graph_traits< undirected_graph >::vertex_descriptor
|
||||
vertex_descriptor;
|
||||
@@ -159,9 +146,9 @@ BOOST_AUTO_TEST_CASE(test0)
|
||||
.vertex_assignment_map(assignments)
|
||||
.max_priority_queue(pq));
|
||||
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), 5);
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), 5);
|
||||
|
||||
test_vis.clear();
|
||||
boost::maximum_adjacency_search(g,
|
||||
@@ -170,17 +157,17 @@ BOOST_AUTO_TEST_CASE(test0)
|
||||
.root_vertex(*vertices(g).first)
|
||||
.max_priority_queue(pq));
|
||||
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), 5);
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), 5);
|
||||
|
||||
test_vis.clear();
|
||||
boost::maximum_adjacency_search(
|
||||
g, boost::weight_map(weights).visitor(test_vis).max_priority_queue(pq));
|
||||
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), 5);
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), 5);
|
||||
|
||||
boost::maximum_adjacency_search(g,
|
||||
boost::weight_map(weights).visitor(
|
||||
@@ -196,14 +183,14 @@ BOOST_AUTO_TEST_CASE(test0)
|
||||
boost::make_constant_property< edge_descriptor >(weight_type(1)))
|
||||
.visitor(test_vis)
|
||||
.max_priority_queue(pq));
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(3));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), 2);
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(3));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), 2);
|
||||
}
|
||||
|
||||
// Check the unweighted case
|
||||
// with and without providing a weight_map
|
||||
BOOST_AUTO_TEST_CASE(test1)
|
||||
void test1()
|
||||
{
|
||||
typedef boost::graph_traits<
|
||||
undirected_unweighted_graph >::vertex_descriptor vertex_descriptor;
|
||||
@@ -248,9 +235,9 @@ BOOST_AUTO_TEST_CASE(test1)
|
||||
.visitor(test_vis)
|
||||
.max_priority_queue(pq));
|
||||
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(3));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), weight_type(2));
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(3));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), weight_type(2));
|
||||
|
||||
weight_type ws[] = { 2, 3, 4, 3, 2, 2, 2, 2, 2, 3, 1, 3 };
|
||||
std::map< edge_descriptor, weight_type > wm;
|
||||
@@ -266,9 +253,19 @@ BOOST_AUTO_TEST_CASE(test1)
|
||||
|
||||
boost::maximum_adjacency_search(
|
||||
g, boost::weight_map(ws_map).visitor(test_vis).max_priority_queue(pq));
|
||||
BOOST_CHECK_EQUAL(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_CHECK_EQUAL(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_CHECK_EQUAL(test_vis.reach_weight(), weight_type(5));
|
||||
BOOST_TEST_EQ(test_vis.curr(), vertex_descriptor(7));
|
||||
BOOST_TEST_EQ(test_vis.prev(), vertex_descriptor(6));
|
||||
BOOST_TEST_EQ(test_vis.reach_weight(), weight_type(5));
|
||||
}
|
||||
|
||||
#include <boost/graph/iteration_macros_undef.hpp>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (BOOST_TEST(argc == 2)) {
|
||||
test_dir = argv[1];
|
||||
test0();
|
||||
test1();
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#define BOOST_TEST_MODULE \
|
||||
max_flow_algorithms_named_parameters_and_bundled_params_test
|
||||
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/graph/edmonds_karp_max_flow.hpp>
|
||||
|
||||
#include "min_cost_max_flow_utils.hpp"
|
||||
@@ -29,8 +26,7 @@ typedef boost::adjacency_list< boost::listS, boost::vecS, boost::directedS,
|
||||
node_t, edge_t >
|
||||
Graph;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(
|
||||
using_named_parameters_and_bundled_params_on_edmonds_karp_max_flow_test)
|
||||
void using_named_parameters_and_bundled_params_on_edmonds_karp_max_flow_test()
|
||||
{
|
||||
Graph g;
|
||||
traits::vertex_descriptor s, t;
|
||||
@@ -60,5 +56,11 @@ BOOST_AUTO_TEST_CASE(
|
||||
.color_map(col)
|
||||
.predecessor_map(pred));
|
||||
|
||||
BOOST_CHECK_EQUAL(flow_value, 4);
|
||||
BOOST_TEST_EQ(flow_value, 4);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
using_named_parameters_and_bundled_params_on_edmonds_karp_max_flow_test();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
+65
-63
@@ -20,7 +20,7 @@
|
||||
#include <boost/graph/stoer_wagner_min_cut.hpp>
|
||||
#include <boost/graph/property_maps/constant_property_map.hpp>
|
||||
#include <boost/property_map/property_map.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS,
|
||||
@@ -35,19 +35,6 @@ typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS >
|
||||
|
||||
std::string test_dir;
|
||||
|
||||
boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[])
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " path-to-libs-graph-test"
|
||||
<< std::endl;
|
||||
throw boost::unit_test::framework::setup_error(
|
||||
"Invalid command line arguments");
|
||||
}
|
||||
test_dir = argv[1];
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct edge_t
|
||||
{
|
||||
unsigned long first;
|
||||
@@ -55,7 +42,7 @@ struct edge_t
|
||||
};
|
||||
|
||||
// the example from Stoer & Wagner (1997)
|
||||
BOOST_AUTO_TEST_CASE(test0)
|
||||
void test0()
|
||||
{
|
||||
edge_t edges[] = { { 0, 1 }, { 1, 2 }, { 2, 3 }, { 0, 4 }, { 1, 4 },
|
||||
{ 1, 5 }, { 2, 6 }, { 3, 6 }, { 3, 7 }, { 4, 5 }, { 5, 6 }, { 6, 7 } };
|
||||
@@ -67,25 +54,25 @@ BOOST_AUTO_TEST_CASE(test0)
|
||||
boost::associative_property_map< std::map< int, bool > > parities(parity);
|
||||
int w
|
||||
= boost::stoer_wagner_min_cut(g, weights, boost::parity_map(parities));
|
||||
BOOST_CHECK_EQUAL(w, 4);
|
||||
BOOST_TEST_EQ(w, 4);
|
||||
const bool parity0 = get(parities, 0);
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 1));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 4));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 5));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 1));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 4));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 5));
|
||||
const bool parity2 = get(parities, 2);
|
||||
BOOST_CHECK_NE(parity0, parity2);
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 3));
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 6));
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 7));
|
||||
BOOST_TEST_NE(parity0, parity2);
|
||||
BOOST_TEST_EQ(parity2, get(parities, 3));
|
||||
BOOST_TEST_EQ(parity2, get(parities, 6));
|
||||
BOOST_TEST_EQ(parity2, get(parities, 7));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test1)
|
||||
void test1()
|
||||
{
|
||||
{ // if only one vertex, can't run `boost::stoer_wagner_min_cut`
|
||||
undirected_graph g;
|
||||
add_vertex(g);
|
||||
|
||||
BOOST_CHECK_THROW(
|
||||
BOOST_TEST_THROWS(
|
||||
boost::stoer_wagner_min_cut(g, get(boost::edge_weight, g)),
|
||||
boost::bad_graph);
|
||||
}
|
||||
@@ -107,15 +94,15 @@ BOOST_AUTO_TEST_CASE(test1)
|
||||
assignments(assignment);
|
||||
int w = boost::stoer_wagner_min_cut(g, weights,
|
||||
boost::parity_map(parities).vertex_assignment_map(assignments));
|
||||
BOOST_CHECK_EQUAL(w, 3);
|
||||
BOOST_TEST_EQ(w, 3);
|
||||
const bool parity2 = get(parities, 2), parity0 = get(parities, 0);
|
||||
BOOST_CHECK_NE(parity2, parity0);
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 1));
|
||||
BOOST_TEST_NE(parity2, parity0);
|
||||
BOOST_TEST_EQ(parity0, get(parities, 1));
|
||||
}
|
||||
}
|
||||
|
||||
// example by Daniel Trebbien
|
||||
BOOST_AUTO_TEST_CASE(test2)
|
||||
void test2()
|
||||
{
|
||||
edge_t edges[] = { { 5, 2 }, { 0, 6 }, { 5, 6 }, { 3, 1 }, { 0, 1 },
|
||||
{ 6, 3 }, { 4, 6 }, { 2, 4 }, { 5, 3 } };
|
||||
@@ -126,19 +113,19 @@ BOOST_AUTO_TEST_CASE(test2)
|
||||
boost::associative_property_map< std::map< int, bool > > parities(parity);
|
||||
int w = boost::stoer_wagner_min_cut(
|
||||
g, get(boost::edge_weight, g), boost::parity_map(parities));
|
||||
BOOST_CHECK_EQUAL(w, 3);
|
||||
BOOST_TEST_EQ(w, 3);
|
||||
const bool parity2 = get(parities, 2);
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 4));
|
||||
BOOST_TEST_EQ(parity2, get(parities, 4));
|
||||
const bool parity5 = get(parities, 5);
|
||||
BOOST_CHECK_NE(parity2, parity5);
|
||||
BOOST_CHECK_EQUAL(parity5, get(parities, 3));
|
||||
BOOST_CHECK_EQUAL(parity5, get(parities, 6));
|
||||
BOOST_CHECK_EQUAL(parity5, get(parities, 1));
|
||||
BOOST_CHECK_EQUAL(parity5, get(parities, 0));
|
||||
BOOST_TEST_NE(parity2, parity5);
|
||||
BOOST_TEST_EQ(parity5, get(parities, 3));
|
||||
BOOST_TEST_EQ(parity5, get(parities, 6));
|
||||
BOOST_TEST_EQ(parity5, get(parities, 1));
|
||||
BOOST_TEST_EQ(parity5, get(parities, 0));
|
||||
}
|
||||
|
||||
// example by Daniel Trebbien
|
||||
BOOST_AUTO_TEST_CASE(test3)
|
||||
void test3()
|
||||
{
|
||||
edge_t edges[] = { { 3, 4 }, { 3, 6 }, { 3, 5 }, { 0, 4 }, { 0, 1 },
|
||||
{ 0, 6 }, { 0, 7 }, { 0, 5 }, { 0, 2 }, { 4, 1 }, { 1, 6 }, { 1, 5 },
|
||||
@@ -151,19 +138,19 @@ BOOST_AUTO_TEST_CASE(test3)
|
||||
boost::associative_property_map< std::map< int, bool > > parities(parity);
|
||||
int w
|
||||
= boost::stoer_wagner_min_cut(g, weights, boost::parity_map(parities));
|
||||
BOOST_CHECK_EQUAL(w, 7);
|
||||
BOOST_TEST_EQ(w, 7);
|
||||
const bool parity1 = get(parities, 1);
|
||||
BOOST_CHECK_EQUAL(parity1, get(parities, 5));
|
||||
BOOST_TEST_EQ(parity1, get(parities, 5));
|
||||
const bool parity0 = get(parities, 0);
|
||||
BOOST_CHECK_NE(parity1, parity0);
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 2));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 3));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 4));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 6));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 7));
|
||||
BOOST_TEST_NE(parity1, parity0);
|
||||
BOOST_TEST_EQ(parity0, get(parities, 2));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 3));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 4));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 6));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 7));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test4)
|
||||
void test4()
|
||||
{
|
||||
typedef boost::graph_traits<
|
||||
undirected_unweighted_graph >::vertex_descriptor vertex_descriptor;
|
||||
@@ -185,16 +172,16 @@ BOOST_AUTO_TEST_CASE(test4)
|
||||
int w = boost::stoer_wagner_min_cut(g,
|
||||
boost::make_constant_property< edge_descriptor >(weight_type(1)),
|
||||
boost::vertex_assignment_map(assignments).parity_map(parities));
|
||||
BOOST_CHECK_EQUAL(w, 2);
|
||||
BOOST_TEST_EQ(w, 2);
|
||||
const bool parity0 = get(parities, 0);
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 1));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 4));
|
||||
BOOST_CHECK_EQUAL(parity0, get(parities, 5));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 1));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 4));
|
||||
BOOST_TEST_EQ(parity0, get(parities, 5));
|
||||
const bool parity2 = get(parities, 2);
|
||||
BOOST_CHECK_NE(parity0, parity2);
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 3));
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 6));
|
||||
BOOST_CHECK_EQUAL(parity2, get(parities, 7));
|
||||
BOOST_TEST_NE(parity0, parity2);
|
||||
BOOST_TEST_EQ(parity2, get(parities, 3));
|
||||
BOOST_TEST_EQ(parity2, get(parities, 6));
|
||||
BOOST_TEST_EQ(parity2, get(parities, 7));
|
||||
}
|
||||
|
||||
// The input for the `test_prgen` family of tests comes from a program, named
|
||||
@@ -210,7 +197,7 @@ BOOST_AUTO_TEST_CASE(test4)
|
||||
// weight of the min-cut is verified.
|
||||
|
||||
// 3 min-cuts
|
||||
BOOST_AUTO_TEST_CASE(test_prgen_20_70_2)
|
||||
void test_prgen_20_70_2()
|
||||
{
|
||||
typedef boost::graph_traits< undirected_graph >::vertex_descriptor
|
||||
vertex_descriptor;
|
||||
@@ -225,7 +212,7 @@ BOOST_AUTO_TEST_CASE(test_prgen_20_70_2)
|
||||
boost::associative_property_map<
|
||||
std::map< vertex_descriptor, std::size_t > >
|
||||
components(component);
|
||||
BOOST_CHECK_EQUAL(boost::connected_components(g, components),
|
||||
BOOST_TEST_EQ(boost::connected_components(g, components),
|
||||
1U); // verify the connectedness assumption
|
||||
|
||||
typedef boost::shared_array_property_map< weight_type,
|
||||
@@ -247,11 +234,11 @@ BOOST_AUTO_TEST_CASE(test_prgen_20_70_2)
|
||||
|
||||
int w = boost::stoer_wagner_min_cut(
|
||||
g, get(boost::edge_weight, g), boost::max_priority_queue(pq));
|
||||
BOOST_CHECK_EQUAL(w, 3407);
|
||||
BOOST_TEST_EQ(w, 3407);
|
||||
}
|
||||
|
||||
// 7 min-cuts
|
||||
BOOST_AUTO_TEST_CASE(test_prgen_50_40_2)
|
||||
void test_prgen_50_40_2()
|
||||
{
|
||||
typedef boost::graph_traits< undirected_graph >::vertex_descriptor
|
||||
vertex_descriptor;
|
||||
@@ -266,15 +253,15 @@ BOOST_AUTO_TEST_CASE(test_prgen_50_40_2)
|
||||
boost::associative_property_map<
|
||||
std::map< vertex_descriptor, std::size_t > >
|
||||
components(component);
|
||||
BOOST_CHECK_EQUAL(boost::connected_components(g, components),
|
||||
BOOST_TEST_EQ(boost::connected_components(g, components),
|
||||
1U); // verify the connectedness assumption
|
||||
|
||||
int w = boost::stoer_wagner_min_cut(g, get(boost::edge_weight, g));
|
||||
BOOST_CHECK_EQUAL(w, 10056);
|
||||
BOOST_TEST_EQ(w, 10056);
|
||||
}
|
||||
|
||||
// 6 min-cuts
|
||||
BOOST_AUTO_TEST_CASE(test_prgen_50_70_2)
|
||||
void test_prgen_50_70_2()
|
||||
{
|
||||
typedef boost::graph_traits< undirected_graph >::vertex_descriptor
|
||||
vertex_descriptor;
|
||||
@@ -289,9 +276,24 @@ BOOST_AUTO_TEST_CASE(test_prgen_50_70_2)
|
||||
boost::associative_property_map<
|
||||
std::map< vertex_descriptor, std::size_t > >
|
||||
components(component);
|
||||
BOOST_CHECK_EQUAL(boost::connected_components(g, components),
|
||||
BOOST_TEST_EQ(boost::connected_components(g, components),
|
||||
1U); // verify the connectedness assumption
|
||||
|
||||
int w = boost::stoer_wagner_min_cut(g, get(boost::edge_weight, g));
|
||||
BOOST_CHECK_EQUAL(w, 21755);
|
||||
BOOST_TEST_EQ(w, 21755);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (BOOST_TEST(argc == 2)) {
|
||||
test_dir = argv[1];
|
||||
test0();
|
||||
test1();
|
||||
test2();
|
||||
test3();
|
||||
test4();
|
||||
test_prgen_20_70_2();
|
||||
test_prgen_50_70_2();
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
+78
-81
@@ -10,13 +10,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define BOOST_TEST_MODULE subgraph_add
|
||||
|
||||
// std lib includes
|
||||
#include <iostream>
|
||||
|
||||
// include boost components
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include <boost/graph/iteration_macros.hpp>
|
||||
|
||||
@@ -25,11 +23,8 @@
|
||||
|
||||
using namespace boost;
|
||||
|
||||
BOOST_AUTO_TEST_CASE(simpleGraph)
|
||||
void simpleGraphTest()
|
||||
{
|
||||
|
||||
BOOST_TEST_MESSAGE("simple subgraph");
|
||||
|
||||
typedef subgraph< adjacency_list< vecS, vecS, directedS, no_property,
|
||||
property< edge_index_t, int > > >
|
||||
Graph;
|
||||
@@ -50,8 +45,8 @@ BOOST_AUTO_TEST_CASE(simpleGraph)
|
||||
Graph& G1 = G0.create_subgraph();
|
||||
Graph& G2 = G1.create_subgraph();
|
||||
|
||||
BOOST_CHECK(&G1.parent() == &G0);
|
||||
BOOST_CHECK(&G2.parent() == &G1);
|
||||
BOOST_TEST(&G1.parent() == &G0);
|
||||
BOOST_TEST(&G2.parent() == &G1);
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -73,10 +68,10 @@ BOOST_AUTO_TEST_CASE(simpleGraph)
|
||||
add_vertex(C, G2); // global vertex C becomes local A2 for G2
|
||||
add_vertex(E, G2); // global vertex E becomes local B2 for G2
|
||||
|
||||
BOOST_CHECK(num_vertices(G0) == 6);
|
||||
BOOST_CHECK(num_vertices(G1) == 3);
|
||||
BOOST_TEST(num_vertices(G0) == 6);
|
||||
BOOST_TEST(num_vertices(G1) == 3);
|
||||
std::cerr << num_vertices(G1) << std::endl;
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add edges to root graph
|
||||
add_edge(A, B, G0);
|
||||
@@ -84,26 +79,23 @@ BOOST_AUTO_TEST_CASE(simpleGraph)
|
||||
add_edge(B, D, G0);
|
||||
add_edge(E, F, G0);
|
||||
|
||||
BOOST_CHECK(num_edges(G0) == 4);
|
||||
BOOST_CHECK(num_edges(G1) == 1);
|
||||
BOOST_CHECK(num_edges(G2) == 0);
|
||||
BOOST_TEST(num_edges(G0) == 4);
|
||||
BOOST_TEST(num_edges(G1) == 1);
|
||||
BOOST_TEST(num_edges(G2) == 0);
|
||||
|
||||
// add edges to G1
|
||||
add_edge(A1, B1, G1);
|
||||
BOOST_CHECK(num_edges(G0) == 5);
|
||||
BOOST_CHECK(num_edges(G1) == 2);
|
||||
BOOST_CHECK(num_edges(G2) == 1);
|
||||
BOOST_TEST(num_edges(G0) == 5);
|
||||
BOOST_TEST(num_edges(G1) == 2);
|
||||
BOOST_TEST(num_edges(G2) == 1);
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 6);
|
||||
BOOST_CHECK(num_vertices(G1) == 3);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 6);
|
||||
BOOST_TEST(num_vertices(G1) == 3);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(addVertices)
|
||||
void addVerticesTest()
|
||||
{
|
||||
|
||||
BOOST_TEST_MESSAGE("subgraph add edges");
|
||||
|
||||
typedef subgraph< adjacency_list< vecS, vecS, directedS, no_property,
|
||||
property< edge_index_t, int > > >
|
||||
Graph;
|
||||
@@ -114,8 +106,8 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
Graph& G1 = G0.create_subgraph();
|
||||
Graph& G2 = G1.create_subgraph();
|
||||
|
||||
BOOST_CHECK(&G1.parent() == &G0);
|
||||
BOOST_CHECK(&G2.parent() == &G1);
|
||||
BOOST_TEST(&G1.parent() == &G0);
|
||||
BOOST_TEST(&G2.parent() == &G1);
|
||||
|
||||
// add vertices to G2
|
||||
Vertex n1 = add_vertex(0, G2);
|
||||
@@ -123,7 +115,7 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
// check if the global vertex 2 is equal to the returned local vertex
|
||||
if (G2.find_vertex(0).second)
|
||||
{
|
||||
BOOST_CHECK(G2.find_vertex(0).first == n1);
|
||||
BOOST_TEST(G2.find_vertex(0).first == n1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -131,7 +123,7 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
}
|
||||
if (G2.find_vertex(1).second)
|
||||
{
|
||||
BOOST_CHECK(G2.find_vertex(1).first == n2);
|
||||
BOOST_TEST(G2.find_vertex(1).first == n2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -140,7 +132,7 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
// and check if this vertex is also present in G1
|
||||
if (G1.find_vertex(0).second)
|
||||
{
|
||||
BOOST_CHECK(G1.local_to_global(G1.find_vertex(0).first) == 0);
|
||||
BOOST_TEST(G1.local_to_global(G1.find_vertex(0).first) == 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -148,7 +140,7 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
}
|
||||
if (G1.find_vertex(0).second)
|
||||
{
|
||||
BOOST_CHECK(G1.local_to_global(G1.find_vertex(1).first) == 1);
|
||||
BOOST_TEST(G1.local_to_global(G1.find_vertex(1).first) == 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -156,50 +148,50 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
}
|
||||
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 2);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 2);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add vertices to G1
|
||||
Vertex n3 = add_vertex(2, G1);
|
||||
// check if the global vertex 2 is equal to the returned local vertex
|
||||
if (G1.find_vertex(2).second)
|
||||
{
|
||||
BOOST_CHECK(G1.find_vertex(2).first == n3);
|
||||
BOOST_TEST(G1.find_vertex(2).first == n3);
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_ERROR("vertex not found!");
|
||||
}
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 3);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 3);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add vertices to G1
|
||||
Vertex n4 = add_vertex(G1);
|
||||
|
||||
// check if the new local vertex is also in the global graph
|
||||
BOOST_CHECK(G0.find_vertex(G1.local_to_global(n4)).second);
|
||||
BOOST_TEST(G0.find_vertex(G1.local_to_global(n4)).second);
|
||||
// check if the new local vertex is not in the subgraphs
|
||||
BOOST_CHECK(!G2.find_vertex(n4).second);
|
||||
BOOST_TEST(!G2.find_vertex(n4).second);
|
||||
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 4);
|
||||
BOOST_CHECK(num_vertices(G1) == 4);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 4);
|
||||
BOOST_TEST(num_vertices(G1) == 4);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add vertices to G0
|
||||
Vertex n5 = add_vertex(G0);
|
||||
|
||||
// check if the new local vertex is not in the subgraphs
|
||||
BOOST_CHECK(!G1.find_vertex(n5).second);
|
||||
BOOST_CHECK(!G2.find_vertex(n5).second);
|
||||
BOOST_TEST(!G1.find_vertex(n5).second);
|
||||
BOOST_TEST(!G2.find_vertex(n5).second);
|
||||
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 5);
|
||||
BOOST_CHECK(num_vertices(G1) == 4);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 5);
|
||||
BOOST_TEST(num_vertices(G1) == 4);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
typedef std::map< graph_traits< Graph::graph_type >::vertex_descriptor,
|
||||
graph_traits< Graph::graph_type >::vertex_descriptor >::iterator v_itr;
|
||||
@@ -221,11 +213,8 @@ BOOST_AUTO_TEST_CASE(addVertices)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(addEdge)
|
||||
void addEdgeTest()
|
||||
{
|
||||
|
||||
BOOST_TEST_MESSAGE("subgraph add edges");
|
||||
|
||||
typedef subgraph< adjacency_list< vecS, vecS, directedS, no_property,
|
||||
property< edge_index_t, int > > >
|
||||
Graph;
|
||||
@@ -236,59 +225,59 @@ BOOST_AUTO_TEST_CASE(addEdge)
|
||||
Graph& G1 = G0.create_subgraph();
|
||||
Graph& G2 = G1.create_subgraph();
|
||||
|
||||
BOOST_CHECK(&G1.parent() == &G0);
|
||||
BOOST_CHECK(&G2.parent() == &G1);
|
||||
BOOST_TEST(&G1.parent() == &G0);
|
||||
BOOST_TEST(&G2.parent() == &G1);
|
||||
|
||||
// add vertices
|
||||
add_vertex(0, G2);
|
||||
add_vertex(1, G2);
|
||||
BOOST_CHECK(num_vertices(G1) == 2);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G1) == 2);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add edge to G0 which needs propagation
|
||||
add_edge(0, 1, G0);
|
||||
|
||||
BOOST_CHECK(num_edges(G0) == 1);
|
||||
BOOST_CHECK(num_edges(G1) == 1);
|
||||
BOOST_CHECK(num_edges(G2) == 1);
|
||||
BOOST_TEST(num_edges(G0) == 1);
|
||||
BOOST_TEST(num_edges(G1) == 1);
|
||||
BOOST_TEST(num_edges(G2) == 1);
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 2);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 2);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add edge to G0 without propagation
|
||||
add_edge(1, 2, G0);
|
||||
|
||||
BOOST_CHECK(num_edges(G0) == 2);
|
||||
BOOST_CHECK(num_edges(G1) == 1);
|
||||
BOOST_CHECK(num_edges(G2) == 1);
|
||||
BOOST_TEST(num_edges(G0) == 2);
|
||||
BOOST_TEST(num_edges(G1) == 1);
|
||||
BOOST_TEST(num_edges(G2) == 1);
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 2);
|
||||
BOOST_CHECK(num_vertices(G2) == 2);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 2);
|
||||
BOOST_TEST(num_vertices(G2) == 2);
|
||||
|
||||
// add vertex 2 to G2/G1 with edge propagation
|
||||
Vertex n = add_vertex(2, G2);
|
||||
BOOST_CHECK(G2.local_to_global(n) == 2);
|
||||
BOOST_TEST(G2.local_to_global(n) == 2);
|
||||
|
||||
BOOST_CHECK(num_edges(G0) == 2);
|
||||
BOOST_CHECK(num_edges(G1) == 2);
|
||||
BOOST_CHECK(num_edges(G2) == 2);
|
||||
BOOST_TEST(num_edges(G0) == 2);
|
||||
BOOST_TEST(num_edges(G1) == 2);
|
||||
BOOST_TEST(num_edges(G2) == 2);
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 3);
|
||||
BOOST_CHECK(num_vertices(G2) == 3);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 3);
|
||||
BOOST_TEST(num_vertices(G2) == 3);
|
||||
|
||||
// add edge to G2 with propagation upwards
|
||||
add_edge(0, 2, G2);
|
||||
|
||||
BOOST_CHECK(num_edges(G0) == 3);
|
||||
BOOST_CHECK(num_edges(G1) == 3);
|
||||
BOOST_CHECK(num_edges(G2) == 3);
|
||||
BOOST_TEST(num_edges(G0) == 3);
|
||||
BOOST_TEST(num_edges(G1) == 3);
|
||||
BOOST_TEST(num_edges(G2) == 3);
|
||||
// num_vertices stays the same
|
||||
BOOST_CHECK(num_vertices(G0) == 3);
|
||||
BOOST_CHECK(num_vertices(G1) == 3);
|
||||
BOOST_CHECK(num_vertices(G2) == 3);
|
||||
BOOST_TEST(num_vertices(G0) == 3);
|
||||
BOOST_TEST(num_vertices(G1) == 3);
|
||||
BOOST_TEST(num_vertices(G2) == 3);
|
||||
|
||||
typedef std::map< graph_traits< Graph::graph_type >::vertex_descriptor,
|
||||
graph_traits< Graph::graph_type >::vertex_descriptor >::iterator v_itr;
|
||||
@@ -324,3 +313,11 @@ BOOST_AUTO_TEST_CASE(addEdge)
|
||||
std::cerr << source(e, G2) << "->" << target(e, G2) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
simpleGraphTest();
|
||||
addVerticesTest();
|
||||
addEdgeTest();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
@@ -7,16 +7,14 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//=======================================================================
|
||||
|
||||
#define BOOST_TEST_MODULE successive_shortest_path_nonnegative_weights_test
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <boost/graph/successive_shortest_path_nonnegative_weights.hpp>
|
||||
#include <boost/graph/find_flow_cost.hpp>
|
||||
|
||||
#include "min_cost_max_flow_utils.hpp"
|
||||
|
||||
BOOST_AUTO_TEST_CASE(path_augmentation_def_test)
|
||||
void path_augmentation_def_test()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
boost::SampleGraph::Graph g;
|
||||
@@ -25,10 +23,10 @@ BOOST_AUTO_TEST_CASE(path_augmentation_def_test)
|
||||
boost::successive_shortest_path_nonnegative_weights(g, s, t);
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 29);
|
||||
BOOST_TEST_EQ(cost, 29);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(path_augmentation_def_test2)
|
||||
void path_augmentation_def_test2()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
boost::SampleGraph::Graph g;
|
||||
@@ -37,10 +35,10 @@ BOOST_AUTO_TEST_CASE(path_augmentation_def_test2)
|
||||
boost::successive_shortest_path_nonnegative_weights(g, s, t);
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 7);
|
||||
BOOST_TEST_EQ(cost, 7);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(path_augmentation_test)
|
||||
void path_augmentation_test()
|
||||
{
|
||||
boost::SampleGraph::vertex_descriptor s, t;
|
||||
typedef boost::SampleGraph::Graph Graph;
|
||||
@@ -66,5 +64,13 @@ BOOST_AUTO_TEST_CASE(path_augmentation_test)
|
||||
.vertex_index_map(idx));
|
||||
|
||||
int cost = boost::find_flow_cost(g);
|
||||
BOOST_CHECK_EQUAL(cost, 29);
|
||||
BOOST_TEST_EQ(cost, 29);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
path_augmentation_def_test();
|
||||
path_augmentation_def_test2();
|
||||
path_augmentation_test();
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user