Skip to content

Commit

Permalink
Merge pull request #377 from boostorg/develop
Browse files Browse the repository at this point in the history
Merge a few years worth of changes
  • Loading branch information
jeremy-murphy authored May 20, 2024
2 parents a649be5 + 5557ccf commit 198616d
Show file tree
Hide file tree
Showing 57 changed files with 1,619 additions and 708 deletions.
82 changes: 0 additions & 82 deletions .drone.star

Large diffs are not rendered by default.

96 changes: 4 additions & 92 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,57 +51,10 @@ jobs:
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
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=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
run: ../../../b2 toolset=$TOOLSET cxxstd=11,14,17,2a
working-directory: ../boost-root/libs/graph/test
macos:
runs-on: macos-latest
Expand Down Expand Up @@ -136,51 +89,10 @@ jobs:
run: ./b2 headers
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_0:
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
toolset: [ msvc-14.0 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[apple];[Apple];[APPLE];[linux];[Linux];[LINUX]'
commit-filter-separator: ';'
fail-fast: true
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update tools/boostdep
run: git submodule update --init tools/boostdep
working-directory: ../boost-root
- name: Copy files
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\graph
working-directory: ../boost-root
- name: Install deps
run: python tools/boostdep/depinst/depinst.py graph
working-directory: ../boost-root
- name: Bootstrap
run: bootstrap
working-directory: ../boost-root
- name: Generate headers
run: b2 headers
working-directory: ../boost-root
- name: Config info
run: ..\..\..\b2 print_config_info cxxstd=14,17 address-model=64 toolset=msvc-14.0
run: ../../../b2 print_config_info toolset=${{ matrix.toolset }} cxxstd=11,14,17,2a
working-directory: ../boost-root/libs/config/test
- name: Test
run: ..\..\..\b2 --hash address-model=64 cxxstd=14,17 toolset=msvc-14.0
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=11,14,17,2a define=CI_SUPPRESS_KNOWN_ISSUES
working-directory: ../boost-root/libs/graph/test
windows_msvc_14_2:
runs-on: windows-2019
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ kevin-bacon2.dat
random.dot
triangular-fr.dot
triangular-kk.dot
test/*.dot
example/routing-table.dat
example/figs/ospf-sptree.dot
CMakeFiles/
1 change: 0 additions & 1 deletion build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ lib boost_graph
read_graphviz_new.cpp
graphml.cpp
:
<library>../../regex/build//boost_regex
<link>shared:<define>BOOST_GRAPH_DYN_LINK=1
# Without these flags, MSVC 7.1 and 8.0 crash
# User reports that VC++ 8.0 does not fail anymore, so that is removed
Expand Down
2 changes: 1 addition & 1 deletion doc/challenge.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2>Boost Graph Library Challenge and To-Do Items</h2>
<tt>mutable_queue.hpp</tt>, <tt>fibonacci_heap.hpp</tt>.
Somehow merge implementation with Dietmer's heaps and queues.</li>

<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">)</li>
<li><tt>disjoint_sets</tt> (see <a href="disjoint_sets.html">Disjoint Sets</a>)</li>
</ul>

<li>Construct a set of planar graph algorithms.</li>
Expand Down
12 changes: 9 additions & 3 deletions doc/hawick_circuits.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
<h1 id="hawick_circuits"><code>hawick_circuits</code></h1>

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

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

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

<p><strong>IN:</strong> <code>unsigned int max_length = 0</code></p>

<blockquote>
<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>
</blockquote>

<hr />

<div class="footer">
Expand Down
23 changes: 8 additions & 15 deletions doc/isomorphism.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ <h3>Named Parameters</h3>

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

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

IN: <tt>vertex_index1_map(VertexIndex1Map i1_map)</tt>
Expand Down
6 changes: 3 additions & 3 deletions doc/r_c_shortest_paths.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1><a name="sec:espprc"></a>
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp; pareto_optimal_solution,
Resource_Container&gt;&amp; pareto_optimal_resource_container,
Resource_Container&amp; pareto_optimal_resource_container,
const Resource_Container&amp; rc,
const Resource_Extension_Function&amp; ref,
const Dominance_Function&amp; dominance,
Expand Down Expand Up @@ -93,7 +93,7 @@ <h1><a name="sec:espprc"></a>
typename graph_traits&lt;Graph&gt;::vertex_descriptor s,
typename graph_traits&lt;Graph&gt;::vertex_descriptor t,
std::vector&lt;typename graph_traits&lt;Graph&gt;::edge_descriptor&gt;&amp; pareto_optimal_solution,
Resource_Container&gt;&amp; pareto_optimal_resource_container,
Resource_Container&amp; pareto_optimal_resource_container,
const Resource_Container&amp; rc,
const Resource_Extension_Function&amp; ref,
const Dominance_Function&amp; dominance )
Expand Down Expand Up @@ -554,7 +554,7 @@ <h3>Examples</h3>

<p>
The file <a href="../example/r_c_shortest_paths_example.cpp">
<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>
<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>
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.
</p>

Expand Down
4 changes: 2 additions & 2 deletions doc/read_graphviz.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ <h1><a class="toc-backref" href="#id4">Example</a></h1>
<div class="section" id="building-the-graphviz-readers">
<h1><a class="toc-backref" href="#id5">Building the GraphViz Readers</a></h1>
<p>To use the GraphViz readers, you will need to build and link against
the &quot;boost_graph&quot; and &quot;boost_regex&quot; libraries. These libraries can be built by following the
<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>
the &quot;boost_graph&quot; library. This library can be built by following the
<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>
</div>
<div class="section" id="notes">
<h1><a class="toc-backref" href="#id6">Notes</a></h1>
Expand Down
4 changes: 2 additions & 2 deletions doc/read_graphviz.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ GraphViz reader to populate an ``adjacency_list`` graph
Building the GraphViz Readers
-----------------------------
To use the GraphViz readers, you will need to build and link against
the "boost_graph" and "boost_regex" libraries. These libraries can be built by following the
`Boost Jam Build Instructions`_ for the subdirectories ``libs/graph/build`` and ``libs/regex/build``.
the "boost_graph" library. This library can be built by following the
`Boost Jam Build Instructions`_ for the subdirectory ``libs/graph/build``.


Notes
Expand Down
2 changes: 1 addition & 1 deletion doc/reverse_graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <H1><A NAME="sec:reverse-graph-adaptor"></A>
<H3>Example</H3>

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

<pre>
int
Expand Down
6 changes: 3 additions & 3 deletions example/fr_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <map>
#include <vector>
#include <boost/random/linear_congruential.hpp>
#include <boost/progress.hpp>
#include <boost/timer/progress_display.hpp>
#include <boost/shared_ptr.hpp>

using namespace boost;
Expand Down Expand Up @@ -67,7 +67,7 @@ class progress_cooling : public linear_cooling< double >
public:
explicit progress_cooling(std::size_t iterations) : inherited(iterations)
{
display.reset(new progress_display(iterations + 1, std::cerr));
display.reset(new boost::timer::progress_display(iterations + 1, std::cerr));
}

double operator()()
Expand All @@ -77,7 +77,7 @@ class progress_cooling : public linear_cooling< double >
}

private:
shared_ptr< boost::progress_display > display;
shared_ptr< boost::timer::progress_display > display;
};

int main(int argc, char* argv[])
Expand Down
10 changes: 8 additions & 2 deletions example/hawick_circuits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ int main(int argc, char const* argv[])
{
if (argc < 2)
{
std::cout << "usage: " << argv[0] << " num_vertices < input\n";
std::cout << "usage: " << argv[0] << " <num_vertices>";
std::cout << " <max_length (optional)>\n";
return EXIT_FAILURE;
}

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

cycle_printer< std::ostream > visitor(std::cout);
boost::hawick_circuits(graph, visitor);
if (argc == 2) {
boost::hawick_circuits(graph, visitor);
} else {
unsigned int max_length = boost::lexical_cast< unsigned int >(argv[2]);
boost::hawick_circuits(graph, visitor, max_length);
}

return EXIT_SUCCESS;
}
4 changes: 2 additions & 2 deletions example/r_c_shortest_paths_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ int main()

std::cout << "SPP with time windows:" << std::endl;
std::cout << "Number of optimal solutions: ";
std::cout << static_cast< int >(opt_solutions.size()) << std::endl;
for (int i = 0; i < static_cast< int >(opt_solutions.size()); ++i)
std::cout << static_cast< int >(opt_solutions_spptw.size()) << std::endl;
for (int i = 0; i < static_cast< int >(opt_solutions_spptw.size()); ++i)
{
std::cout << "The " << i << "th shortest path from A to E is: ";
std::cout << std::endl;
Expand Down
1 change: 1 addition & 0 deletions include/boost/graph/bandwidth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <algorithm> // for std::min and std::max
#include <boost/config.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/properties.hpp>
#include <boost/detail/numeric_traits.hpp>

namespace boost
Expand Down
1 change: 1 addition & 0 deletions include/boost/graph/chrobak_payne_drawing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <stack>
#include <boost/config.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/properties.hpp>
#include <boost/property_map/property_map.hpp>

namespace boost
Expand Down
1 change: 1 addition & 0 deletions include/boost/graph/circle_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/iteration_macros.hpp>
#include <boost/graph/topology.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/static_assert.hpp>

namespace boost
Expand Down
4 changes: 4 additions & 0 deletions include/boost/graph/detail/adjacency_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2189,8 +2189,12 @@ class vec_adj_list_impl : public adj_list_helper< Config, Base >
}
// Copy the edges by adding each edge and copying its
// property object.
#ifdef BOOST_NO_CXX17_STRUCTURED_BINDINGS
edge_iterator ei, ei_end;
for (boost::tie(ei, ei_end) = edges(x); ei != ei_end; ++ei)
#else // Silences -Wmaybe-uninitialized in adj_list_edge_iterator::operator++().
for (auto [ei, ei_end] = edges(x); ei != ei_end; ++ei)
#endif
{
edge_descriptor e;
bool inserted;
Expand Down
1 change: 1 addition & 0 deletions include/boost/graph/detail/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define BOOST_GRAPH_DETAIL_INDEX_HPP

#include <boost/graph/graph_traits.hpp>
#include <boost/graph/properties.hpp>

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

0 comments on commit 198616d

Please sign in to comment.