Skip to content

Commit 198616d

Browse files
Merge pull request #377 from boostorg/develop
Merge a few years worth of changes
2 parents a649be5 + 5557ccf commit 198616d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1619
-708
lines changed

.drone.star

-82
Large diffs are not rendered by default.

.github/workflows/ci.yml

+4-92
Original file line numberDiff line numberDiff line change
@@ -51,57 +51,10 @@ jobs:
5151
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
5252
working-directory: ../boost-root
5353
- name: Config info
54-
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,2a
54+
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=11,14,17,2a
5555
working-directory: ../boost-root/libs/config/test
5656
- name: Test
57-
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,2a
58-
working-directory: ../boost-root/libs/graph/test
59-
ubuntu-bionic:
60-
runs-on: ubuntu-18.04
61-
strategy:
62-
fail-fast: false
63-
matrix:
64-
compiler: [ g++-7, g++-8, clang++-7, clang++-8 ]
65-
steps:
66-
- uses: actions/checkout@v2
67-
with:
68-
fetch-depth: '0'
69-
- uses: mstachniuk/ci-skip@v1
70-
with:
71-
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
72-
commit-filter-separator: ';'
73-
fail-fast: true
74-
- name: Set TOOLSET
75-
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
76-
- name: Add repository
77-
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
78-
- name: Install packages
79-
run: sudo apt install g++-7 g++-8 clang-7 clang-8
80-
- name: Checkout main boost
81-
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
82-
- name: Update tools/boostdep
83-
run: git submodule update --init tools/boostdep
84-
working-directory: ../boost-root
85-
- name: Copy files
86-
run: cp -r $GITHUB_WORKSPACE/* libs/graph
87-
working-directory: ../boost-root
88-
- name: Install deps
89-
run: python tools/boostdep/depinst/depinst.py graph
90-
working-directory: ../boost-root
91-
- name: Bootstrap
92-
run: ./bootstrap.sh
93-
working-directory: ../boost-root
94-
- name: Generate headers
95-
run: ./b2 headers
96-
working-directory: ../boost-root
97-
- name: Generate user config
98-
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
99-
working-directory: ../boost-root
100-
- name: Config info install
101-
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17
102-
working-directory: ../boost-root/libs/config/test
103-
- name: Test
104-
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17
57+
run: ../../../b2 toolset=$TOOLSET cxxstd=11,14,17,2a
10558
working-directory: ../boost-root/libs/graph/test
10659
macos:
10760
runs-on: macos-latest
@@ -136,51 +89,10 @@ jobs:
13689
run: ./b2 headers
13790
working-directory: ../boost-root
13891
- name: Config info
139-
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
140-
working-directory: ../boost-root/libs/config/test
141-
- name: Test
142-
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
143-
working-directory: ../boost-root/libs/graph/test
144-
windows_msvc_14_0:
145-
runs-on: windows-2019
146-
defaults:
147-
run:
148-
shell: cmd
149-
strategy:
150-
fail-fast: false
151-
matrix:
152-
toolset: [ msvc-14.0 ]
153-
steps:
154-
- uses: actions/checkout@v2
155-
with:
156-
fetch-depth: '0'
157-
- uses: mstachniuk/ci-skip@v1
158-
with:
159-
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
160-
commit-filter-separator: ';'
161-
fail-fast: true
162-
- name: Checkout main boost
163-
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
164-
- name: Update tools/boostdep
165-
run: git submodule update --init tools/boostdep
166-
working-directory: ../boost-root
167-
- name: Copy files
168-
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
169-
working-directory: ../boost-root
170-
- name: Install deps
171-
run: python tools/boostdep/depinst/depinst.py graph
172-
working-directory: ../boost-root
173-
- name: Bootstrap
174-
run: bootstrap
175-
working-directory: ../boost-root
176-
- name: Generate headers
177-
run: b2 headers
178-
working-directory: ../boost-root
179-
- name: Config info
180-
run: ..\..\..\b2 print_config_info cxxstd=14,17 address-model=64 toolset=msvc-14.0
92+
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=11,14,17,2a
18193
working-directory: ../boost-root/libs/config/test
18294
- name: Test
183-
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17 toolset=msvc-14.0
95+
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
18496
working-directory: ../boost-root/libs/graph/test
18597
windows_msvc_14_2:
18698
runs-on: windows-2019

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ kevin-bacon2.dat
66
random.dot
77
triangular-fr.dot
88
triangular-kk.dot
9+
test/*.dot
10+
example/routing-table.dat
11+
example/figs/ospf-sptree.dot
12+
CMakeFiles/

build/Jamfile.v2

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ lib boost_graph
1616
read_graphviz_new.cpp
1717
graphml.cpp
1818
:
19-
<library>../../regex/build//boost_regex
2019
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
2120
# Without these flags, MSVC 7.1 and 8.0 crash
2221
# User reports that VC++ 8.0 does not fail anymore, so that is removed

doc/challenge.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h2>Boost Graph Library Challenge and To-Do Items</h2>
3737
<tt>mutable_queue.hpp</tt>, <tt>fibonacci_heap.hpp</tt>.
3838
Somehow merge implementation with Dietmer's heaps and queues.</li>
3939

40-
<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">)</li>
40+
<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">Disjoint Sets</a>)</li>
4141
</ul>
4242

4343
<li>Construct a set of planar graph algorithms.</li>

doc/hawick_circuits.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<h1 id="hawick_circuits"><code>hawick_circuits</code></h1>
1414

1515
<pre><code>template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
16-
void hawick_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
16+
void hawick_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph), unsigned int max_length = 0);
1717

1818
template &lt;typename Graph, typename Visitor, typename VertexIndexMap&gt;
19-
void hawick_unique_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph));
19+
void hawick_unique_circuits(Graph const&amp; graph, Visitor visitor, VertexIndexMap const&amp; vim = get(vertex_index, graph), unsigned int max_length = 0);
2020
</code></pre>
2121

22-
<p>Enumerate all the elementary circuits in a directed multigraph. Specifically,
22+
<p>Enumerate all the elementary circuits (of length &le; <code>max_length</code>, if nonzero) in a directed multigraph. Specifically,
2323
self-loops and redundant circuits caused by parallel edges are enumerated too.
2424
<code>hawick_unique_circuits</code> may be used if redundant circuits caused by parallel
2525
edges are not desired.</p>
@@ -59,6 +59,12 @@ <h3 id="parameters">Parameters</h3>
5959
the vertex index map provided by the <code>graph</code>.</p>
6060
</blockquote>
6161

62+
<p><strong>IN:</strong> <code>unsigned int max_length = 0</code></p>
63+
64+
<blockquote>
65+
<p>The maximum circuit length to consider. Beyond this it truncates the depth-first search, reducing the computation time by ignoring longer circuits. The default value of <code>max_length = 0</code> implies no maximum.</p>
66+
</blockquote>
67+
6268
<hr />
6369

6470
<div class="footer">

doc/isomorphism.html

+8-15
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ <h3>Named Parameters</h3>
9292

9393
OUT: <tt>isomorphism_map(IsoMap f)</tt>
9494
<blockquote>
95-
The mapping from vertices in graph 1 to vertices in graph 2. This must
96-
be a <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
95+
The mapping from vertices in graph 1 to vertices in graph 2. <tt>IsoMap</tt>
96+
must be a <a href="../../property_map/doc/ReadWritePropertyMap.html">Read/Write
9797
Property Map</a>.<br> <b>Default:</b> an <a
9898
href="../../property_map/doc/iterator_property_map.html"><tt>iterator_property_map</tt></a>
9999
constructed from a <tt>std::vector</tt> of graph 2's vertex
@@ -111,27 +111,20 @@ <h3>Named Parameters</h3>
111111
default value, which requires that the degrees of <i>v1</i> and <i>v2</i> are
112112
equal) or to impose extra conditions on the result. The
113113
<tt>VertexInvariant1</tt> and <tt>VertexInvariant2</tt> types must model <a
114-
href="http://www.boost.org/sgi/stl/UnaryFunction.html">UnaryFunction</a>, with
115-
the argument type of <tt>vertex_invariant1</tt> being <tt>Graph1</tt>'s vertex
114+
href="http://www.boost.org/sgi/stl/AdaptableUnaryFunction.html">AdaptableUnaryFunction</a>,
115+
with the argument type of <tt>vertex_invariant1</tt> being <tt>Graph1</tt>'s vertex
116116
descriptor type, the argument type of <tt>vertex_invariant2</tt> being
117-
<tt>Graph2</tt>'s vertex descriptor type, and both functions having integral
118-
result types. The values returned by these two functions must be in the range
119-
[0, <tt>vertex_max_invariant</tt>).
117+
<tt>Graph2</tt>'s vertex descriptor type, and both functions sharing a
118+
result type that is totally ordered and hashable, such as an integer.
120119
<br>
121120
<b>Default:</b> <tt>degree_vertex_invariant</tt> for both arguments<br>
122121
<b>Python</b>: Unsupported parameter.
123122
</blockquote>
124123

125124
IN: <tt>vertex_max_invariant(std::size_t max_invariant)</tt>
126125
<blockquote>
127-
An upper bound on the possible values returned from either
128-
vertex_invariant1 or vertex_invariant2.
129-
<br>
130-
<b>Default:</b> <tt>vertex_invariant2.max()</tt>. The default
131-
<tt>vertex_invariant2</tt> parameter, an instance of
132-
<tt>degree_vertex_invariant</tt>, defines this function to
133-
return <tt>num_vertices(g2) * (num_vertices(g2)+1)</tt>.<br>
134-
<b>Python</b>: Unsupported parameter.
126+
This parameter is ignored as it is no longer necessary, but kept for backwards
127+
compatibility.
135128
</blockquote>
136129

137130
IN: <tt>vertex_index1_map(VertexIndex1Map i1_map)</tt>

doc/r_c_shortest_paths.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1><a name="sec:espprc"></a>
5757
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
5858
typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
5959
std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp; pareto_optimal_solution,
60-
Resource_Container&gt;&amp; pareto_optimal_resource_container,
60+
Resource_Container&amp; pareto_optimal_resource_container,
6161
const Resource_Container&amp; rc,
6262
const Resource_Extension_Function&amp; ref,
6363
const Dominance_Function&amp; dominance,
@@ -93,7 +93,7 @@ <h1><a name="sec:espprc"></a>
9393
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
9494
typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
9595
std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp; pareto_optimal_solution,
96-
Resource_Container&gt;&amp; pareto_optimal_resource_container,
96+
Resource_Container&amp; pareto_optimal_resource_container,
9797
const Resource_Container&amp; rc,
9898
const Resource_Extension_Function&amp; ref,
9999
const Dominance_Function&amp; dominance )
@@ -554,7 +554,7 @@ <h3>Examples</h3>
554554

555555
<p>
556556
The file <a href="../example/r_c_shortest_paths_example.cpp">
557-
<rr>example/r_c_shortest_paths_example.cpp</tt></a> provides examples for how SPPRCs can be solved with the <tt>r_c_shortest_paths</tt> functions. There is an example for an SPP without resource constraints and an example for a shortest path problem with time windows.<br>
557+
<tt>example/r_c_shortest_paths_example.cpp</tt></a> provides examples for how SPPRCs can be solved with the <tt>r_c_shortest_paths</tt> functions. There is an example for an SPP without resource constraints and an example for a shortest path problem with time windows.<br>
558558
It is obvious that one would not use the algorithm for SPPs without resource constraints, because there are faster algorithms for this problem, but one would expect a code for the SPP with resource constraints to be able to handle such a case.
559559
</p>
560560

doc/read_graphviz.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ <h1><a class="toc-backref" href="#id4">Example</a></h1>
181181
<div class="section" id="building-the-graphviz-readers">
182182
<h1><a class="toc-backref" href="#id5">Building the GraphViz Readers</a></h1>
183183
<p>To use the GraphViz readers, you will need to build and link against
184-
the &quot;boost_graph&quot; and &quot;boost_regex&quot; libraries. These libraries can be built by following the
185-
<a class="reference external" href="../../../more/getting_started.html#Build_Install">Boost Jam Build Instructions</a> for the subdirectories <tt class="docutils literal"><span class="pre">libs/graph/build</span></tt> and <tt class="docutils literal"><span class="pre">libs/regex/build</span></tt>.</p>
184+
the &quot;boost_graph&quot; library. This library can be built by following the
185+
<a class="reference external" href="../../../more/getting_started.html#Build_Install">Boost Jam Build Instructions</a> for the subdirectory <tt class="docutils literal"><span class="pre">libs/graph/build</span></tt>.</p>
186186
</div>
187187
<div class="section" id="notes">
188188
<h1><a class="toc-backref" href="#id6">Notes</a></h1>

doc/read_graphviz.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ GraphViz reader to populate an ``adjacency_list`` graph
182182
Building the GraphViz Readers
183183
-----------------------------
184184
To use the GraphViz readers, you will need to build and link against
185-
the "boost_graph" and "boost_regex" libraries. These libraries can be built by following the
186-
`Boost Jam Build Instructions`_ for the subdirectories ``libs/graph/build`` and ``libs/regex/build``.
185+
the "boost_graph" library. This library can be built by following the
186+
`Boost Jam Build Instructions`_ for the subdirectory ``libs/graph/build``.
187187

188188

189189
Notes

doc/reverse_graph.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <H1><A NAME="sec:reverse-graph-adaptor"></A>
3333
<H3>Example</H3>
3434

3535
The example from <a
36-
href="../example/reverse-graph-eg.cpp"><tt>examples/reverse-graph-eg.cpp</tt></a>.
36+
href="../example/reverse_graph.cpp"><tt>example/reverse_graph.cpp</tt></a>.
3737

3838
<pre>
3939
int

example/fr_layout.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <map>
1717
#include <vector>
1818
#include <boost/random/linear_congruential.hpp>
19-
#include <boost/progress.hpp>
19+
#include <boost/timer/progress_display.hpp>
2020
#include <boost/shared_ptr.hpp>
2121

2222
using namespace boost;
@@ -67,7 +67,7 @@ class progress_cooling : public linear_cooling< double >
6767
public:
6868
explicit progress_cooling(std::size_t iterations) : inherited(iterations)
6969
{
70-
display.reset(new progress_display(iterations + 1, std::cerr));
70+
display.reset(new boost::timer::progress_display(iterations + 1, std::cerr));
7171
}
7272

7373
double operator()()
@@ -77,7 +77,7 @@ class progress_cooling : public linear_cooling< double >
7777
}
7878

7979
private:
80-
shared_ptr< boost::progress_display > display;
80+
shared_ptr< boost::timer::progress_display > display;
8181
};
8282

8383
int main(int argc, char* argv[])

example/hawick_circuits.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ int main(int argc, char const* argv[])
7878
{
7979
if (argc < 2)
8080
{
81-
std::cout << "usage: " << argv[0] << " num_vertices < input\n";
81+
std::cout << "usage: " << argv[0] << " <num_vertices>";
82+
std::cout << " <max_length (optional)>\n";
8283
return EXIT_FAILURE;
8384
}
8485

@@ -88,7 +89,12 @@ int main(int argc, char const* argv[])
8889
build_graph(graph, num_vertices, first_vertex, last_vertex);
8990

9091
cycle_printer< std::ostream > visitor(std::cout);
91-
boost::hawick_circuits(graph, visitor);
92+
if (argc == 2) {
93+
boost::hawick_circuits(graph, visitor);
94+
} else {
95+
unsigned int max_length = boost::lexical_cast< unsigned int >(argv[2]);
96+
boost::hawick_circuits(graph, visitor, max_length);
97+
}
9298

9399
return EXIT_SUCCESS;
94100
}

example/r_c_shortest_paths_example.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ int main()
288288

289289
std::cout << "SPP with time windows:" << std::endl;
290290
std::cout << "Number of optimal solutions: ";
291-
std::cout << static_cast< int >(opt_solutions.size()) << std::endl;
292-
for (int i = 0; i < static_cast< int >(opt_solutions.size()); ++i)
291+
std::cout << static_cast< int >(opt_solutions_spptw.size()) << std::endl;
292+
for (int i = 0; i < static_cast< int >(opt_solutions_spptw.size()); ++i)
293293
{
294294
std::cout << "The " << i << "th shortest path from A to E is: ";
295295
std::cout << std::endl;

include/boost/graph/bandwidth.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <algorithm> // for std::min and std::max
1111
#include <boost/config.hpp>
1212
#include <boost/graph/graph_traits.hpp>
13+
#include <boost/graph/properties.hpp>
1314
#include <boost/detail/numeric_traits.hpp>
1415

1516
namespace boost

include/boost/graph/chrobak_payne_drawing.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <stack>
1515
#include <boost/config.hpp>
1616
#include <boost/graph/graph_traits.hpp>
17+
#include <boost/graph/properties.hpp>
1718
#include <boost/property_map/property_map.hpp>
1819

1920
namespace boost

include/boost/graph/circle_layout.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <boost/graph/graph_traits.hpp>
1515
#include <boost/graph/iteration_macros.hpp>
1616
#include <boost/graph/topology.hpp>
17+
#include <boost/property_map/property_map.hpp>
1718
#include <boost/static_assert.hpp>
1819

1920
namespace boost

include/boost/graph/detail/adjacency_list.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -2189,8 +2189,12 @@ class vec_adj_list_impl : public adj_list_helper< Config, Base >
21892189
}
21902190
// Copy the edges by adding each edge and copying its
21912191
// property object.
2192+
#ifdef BOOST_NO_CXX17_STRUCTURED_BINDINGS
21922193
edge_iterator ei, ei_end;
21932194
for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei)
2195+
#else // Silences -Wmaybe-uninitialized in adj_list_edge_iterator::operator++().
2196+
for (auto [ei, ei_end] = edges(x); ei != ei_end; ++ei)
2197+
#endif
21942198
{
21952199
edge_descriptor e;
21962200
bool inserted;

include/boost/graph/detail/index.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define BOOST_GRAPH_DETAIL_INDEX_HPP
99

1010
#include <boost/graph/graph_traits.hpp>
11+
#include <boost/graph/properties.hpp>
1112

1213
// The structures in this module are responsible for selecting and defining
1314
// types for accessing a builting index map. Note that the selection of these

0 commit comments

Comments
 (0)