2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-19 04:12:11 +00:00

Merge branch 'issue_175' of https://github.com/bkpoon/graph into pr190_integration

This commit is contained in:
John Maddock
2021-04-20 19:14:58 +01:00
2 changed files with 4 additions and 3 deletions

View File

@@ -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);

View File

@@ -23,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.
@@ -244,7 +245,7 @@ namespace detail
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)));