diff --git a/doc/r_c_shortest_paths.html b/doc/r_c_shortest_paths.html index 98b6cc26d..d87924baa 100644 --- a/doc/r_c_shortest_paths.html +++ b/doc/r_c_shortest_paths.html @@ -24,7 +24,6 @@

template<class Graph, class VertexIndexMap, - class EdgeIndexMap, class Resource_Container, class Resource_Extension_Function, class Dominance_Function, @@ -32,7 +31,6 @@

class Visitor> void r_c_shortest_paths( const Graph& g, const VertexIndexMap& vertex_index_map, - const EdgeIndexMap& edge_index_map, typename graph_traits<Graph>::vertex_descriptor s, typename graph_traits<Graph>::vertex_descriptor t, std::vector<std::vector<typename graph_traits<Graph>::edge_descriptor> >& pareto_optimal_solutions, @@ -45,7 +43,6 @@

template<class Graph, class VertexIndexMap, - class EdgeIndexMap, class Resource_Container, class Resource_Extension_Function, class Dominance_Function, @@ -53,7 +50,6 @@

class Visitor> void r_c_shortest_paths( const Graph& g, const VertexIndexMap& vertex_index_map, - const EdgeIndexMap& edge_index_map, typename graph_traits<Graph>::vertex_descriptor s, typename graph_traits<Graph>::vertex_descriptor t, std::vector<typename graph_traits<Graph>::edge_descriptor>& pareto_optimal_solution, @@ -66,13 +62,11 @@

template<class Graph, class VertexIndexMap, - class EdgeIndexMap, class Resource_Container, class Resource_Extension_Function, class Dominance_Function> void r_c_shortest_paths( const Graph& g, const VertexIndexMap& vertex_index_map, - const EdgeIndexMap& edge_index_map, typename graph_traits<Graph>::vertex_descriptor s, typename graph_traits<Graph>::vertex_descriptor t, std::vector<std::vector<typename graph_traits<Graph>::edge_descriptor> >& pareto_optimal_solutions, @@ -83,13 +77,11 @@

template<class Graph, class VertexIndexMap, - class EdgeIndexMap, class Resource_Container, class Resource_Extension_Function, class Dominance_Function> void r_c_shortest_paths( const Graph& g, const VertexIndexMap& vertex_index_map, - const EdgeIndexMap& edge_index_map, typename graph_traits<Graph>::vertex_descriptor s, typename graph_traits<Graph>::vertex_descriptor t, std::vector<typename graph_traits<Graph>::edge_descriptor>& pareto_optimal_solution, @@ -370,7 +362,6 @@

DominanceFunction

 r_c_shortest_paths( g,
                     vertex_index_map,
-                    edge_index_map,
                     s,
                     t,
                     pareto_optimal_solutions,
@@ -427,10 +418,6 @@ 

Parameters

A ReadablePropertyMap mapping vertex descriptors to integers in [0, num_vertices(g)).
-IN: const EdgeIndexMap& edge_index_map -
-A ReadablePropertyMap mapping edge descriptors to integers in [0, num_edges(g)). -
IN: typename graph_traits<Graph>::vertex_descriptor s
A vertex descriptor describing the start vertex of the path. diff --git a/example/r_c_shortest_paths_example.cpp b/example/r_c_shortest_paths_example.cpp index 77326bb7c..0ba97f19c 100644 --- a/example/r_c_shortest_paths_example.cpp +++ b/example/r_c_shortest_paths_example.cpp @@ -248,8 +248,7 @@ int main() opt_solutions; std::vector< spp_no_rc_res_cont > pareto_opt_rcs_no_rc; - r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g), - get(&SPPRC_Example_Graph_Arc_Prop::num, g), s, t, opt_solutions, + r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g), s, t, opt_solutions, pareto_opt_rcs_no_rc, spp_no_rc_res_cont(0), ref_no_res_cont(), dominance_no_res_cont(), std::allocator< r_c_shortest_paths_label< SPPRC_Example_Graph, @@ -277,8 +276,7 @@ int main() opt_solutions_spptw; std::vector< spp_spptw_res_cont > pareto_opt_rcs_spptw; - r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g), - get(&SPPRC_Example_Graph_Arc_Prop::num, g), s, t, opt_solutions_spptw, + r_c_shortest_paths(g, get(&SPPRC_Example_Graph_Vert_Prop::num, g), s, t, opt_solutions_spptw, pareto_opt_rcs_spptw, spp_spptw_res_cont(0, 0), ref_spptw(), dominance_spptw(), std::allocator< r_c_shortest_paths_label< SPPRC_Example_Graph, diff --git a/include/boost/graph/r_c_shortest_paths.hpp b/include/boost/graph/r_c_shortest_paths.hpp index 12edb43dc..59933511f 100644 --- a/include/boost/graph/r_c_shortest_paths.hpp +++ b/include/boost/graph/r_c_shortest_paths.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP #define BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP -#include +#include #include #include #include @@ -25,7 +25,7 @@ namespace boost // r_c_shortest_paths_label struct template < class Graph, class Resource_Container > struct r_c_shortest_paths_label -: public boost::enable_shared_from_this< +: boost::enable_shared_from_this< r_c_shortest_paths_label< Graph, Resource_Container > > { r_c_shortest_paths_label(const unsigned long n, @@ -163,12 +163,11 @@ namespace detail { // r_c_shortest_paths_dispatch function (body/implementation) - template < class Graph, class VertexIndexMap, class EdgeIndexMap, + template < class Graph, class VertexIndexMap, class Resource_Container, class Resource_Extension_Function, class Dominance_Function, class Label_Allocator, class Visitor > void r_c_shortest_paths_dispatch(const Graph& g, const VertexIndexMap& vertex_index_map, - const EdgeIndexMap& /*edge_index_map*/, typename graph_traits< Graph >::vertex_descriptor s, typename graph_traits< Graph >::vertex_descriptor t, // each inner vector corresponds to a pareto-optimal path @@ -176,7 +175,7 @@ namespace detail std::vector< typename graph_traits< Graph >::edge_descriptor > >& pareto_optimal_solutions, std::vector< Resource_Container >& pareto_optimal_resource_containers, - bool b_all_pareto_optimal_solutions, + const bool b_all_pareto_optimal_solutions, // to initialize the first label/resource container // and to carry the type information const Resource_Container& rc, Resource_Extension_Function& ref, @@ -184,47 +183,39 @@ namespace detail // to specify the memory management strategy for the labels Label_Allocator /*la*/, Visitor vis) { + + using EdgeDescriptor = typename graph_traits< Graph >::edge_descriptor; + using Label = r_c_shortest_paths_label< Graph, Resource_Container >; + using Splabel = boost::shared_ptr