@@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3939
4040namespace {
4141
42- std::vector<II_t_rt> get_bipartition (pgrouting::UndirectedGraph &graph) {
42+ std::vector<II_t_rt> get_bipartition (const pgrouting::UndirectedGraph &graph) {
4343 using V_i = pgrouting::UndirectedGraph::V_i;
4444
4545 std::vector<II_t_rt> results;
@@ -56,7 +56,7 @@ std::vector<II_t_rt> get_bipartition(pgrouting::UndirectedGraph &graph) {
5656 throw ;
5757 } catch (...) {
5858 throw std::make_pair (
59- std::string (" INTERNAL: something went wrong while calling boost::edge_coloring " ),
59+ std::string (" INTERNAL: something went wrong while calling boost::bipartite " ),
6060 std::string (__PGR_PRETTY_FUNCTION__));;
6161 }
6262
@@ -65,7 +65,7 @@ std::vector<II_t_rt> get_bipartition(pgrouting::UndirectedGraph &graph) {
6565 int64_t vid = graph[*v].id ;
6666 boost::get (partition_map, *v) ==
6767 boost::color_traits <boost::default_color_type>::white () ?
68- results.push_back ({{ vid}, { 0 }} ) : results.push_back ({{ vid}, { 1 } });
68+ results.push_back ({vid, 0 } ) : results.push_back ({vid, 1 });
6969 }
7070 return results;
7171}
@@ -75,7 +75,7 @@ std::vector<II_t_rt> get_bipartition(pgrouting::UndirectedGraph &graph) {
7575namespace pgrouting {
7676namespace functions {
7777
78- std::vector<II_t_rt> pgr_bipartite (pgrouting::UndirectedGraph &graph ) {
78+ std::vector<II_t_rt> pgr_bipartite (const pgrouting::UndirectedGraph &graph ) {
7979 bool bipartite = boost::is_bipartite (graph.graph );
8080 return (bipartite)? get_bipartition (graph) : std::vector<II_t_rt>();
8181}
0 commit comments