Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main() {

std::vector<Descriptor> path;
Res result{0, 0};
r_c_shortest_paths(g, get(vertex_index, g), get(&Edge::idx, g),
r_c_shortest_paths(g, get(vertex_index, g),
vertex(0, g), vertex(3, g), path, result,
Res{0, 0}, ResExt{}, Dom{});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,37 @@ include::example$algorithms/shortest_paths/r_c_shortest.txt[]
----
template <class Graph,
class VertexIndexMap,
class EdgeIndexMap,
class Resource_Container,
class Resource_Extension_Function,
class Dominance_Function,
class Label_Allocator,
class Visitor>
void r_c_shortest_paths(
const Graph& g,
const VertexIndexMap& vertex_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,
std::vector<Resource_Container>& pareto_optimal_resource_containers,
const Resource_Container& rc,
const Resource_Extension_Function& ref,
const Dominance_Function& dominance,
Label_Allocator la,
Visitor vis)
----

Old interface, to be deprecated in future releases.

[source,cpp]
----
template <class Graph,
class VertexIndexMap,
class EdgeIndexMap,
class Resource_Container,
class Resource_Extension_Function,
class Dominance_Function,
class Label_Allocator,
class Visitor>
void r_c_shortest_paths(
const Graph& g,
const VertexIndexMap& vertex_index_map,
Expand Down Expand Up @@ -127,6 +152,31 @@ void r_c_shortest_paths(

=== (2) One Pareto-optimal solution, with allocator and visitor

[source,cpp]
----
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(
const Graph& g,
const VertexIndexMap& vertex_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,
Resource_Container& pareto_optimal_resource_container,
const Resource_Container& rc,
const Resource_Extension_Function& ref,
const Dominance_Function& dominance,
Label_Allocator la,
Visitor vis)
----

Old interface, to be deprecated in future releases.

[source,cpp]
----
template <class Graph,
Expand Down Expand Up @@ -231,6 +281,27 @@ void r_c_shortest_paths(

=== (3) All Pareto-optimal solutions, default allocator and visitor

[source,cpp]
----
template <class Graph,
class VertexIndexMap,
class Resource_Container,
class Resource_Extension_Function,
class Dominance_Function>
void r_c_shortest_paths(
const Graph& g,
const VertexIndexMap& vertex_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,
std::vector<Resource_Container>& pareto_optimal_resource_containers,
const Resource_Container& rc,
const Resource_Extension_Function& ref,
const Dominance_Function& dominance)
----

Old interface, to be deprecated in future releases.

[source,cpp]
----
template <class Graph,
Expand All @@ -252,7 +323,7 @@ void r_c_shortest_paths(
const Dominance_Function& dominance)
----

[cols="1,2,5"]
[%autowrap, cols="1,2,5"]
|===
| Direction | Parameter | Description

Expand Down Expand Up @@ -335,6 +406,27 @@ void r_c_shortest_paths(
const Dominance_Function& dominance)
----

Old interface, to be deprecated in future releases.

[source,cpp]
----
template <class Graph,
class VertexIndexMap,
class Resource_Container,
class Resource_Extension_Function,
class Dominance_Function>
void r_c_shortest_paths(
const Graph& g,
const VertexIndexMap& vertex_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,
Resource_Container& pareto_optimal_resource_container,
const Resource_Container& rc,
const Resource_Extension_Function& ref,
const Dominance_Function& dominance)
----

[cols="1,2,5"]
|===
| Direction | Parameter | Description
Expand Down
1 change: 1 addition & 0 deletions example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ exe push-relable : push-relabel-eg.cpp ;
run put-get-helper-eg.cpp ;
run quick_tour.cpp ;
run quick-tour.cpp ;
run r_c_shortest_paths_example_old.cpp ;
run r_c_shortest_paths_example.cpp ;
run read_graphviz.cpp /boost/graph//boost_graph ;
exe read_write_dimacs : read_write_dimacs-eg.cpp ;
Expand Down
6 changes: 3 additions & 3 deletions example/r_c_shortest_paths_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class ref_spptw
spp_spptw_res_cont& new_cont, const spp_spptw_res_cont& old_cont,
graph_traits< SPPRC_Example_Graph >::edge_descriptor ed) const
{
const SPPRC_Example_Graph_Arc_Prop& arc_prop = get(edge_bundle, g)[ed];
const SPPRC_Example_Graph_Arc_Prop arc_prop = get(edge_bundle, g)[ed];
const SPPRC_Example_Graph_Vert_Prop& vert_prop
= get(vertex_bundle, g)[target(ed, g)];
new_cont.cost = old_cont.cost + arc_prop.cost;
Expand Down Expand Up @@ -249,7 +249,7 @@ int main()
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,
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,
Expand Down Expand Up @@ -278,7 +278,7 @@ int main()
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,
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,
Expand Down
Loading
Loading