Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
converged: yes
vertex 0: (21.7, -0.0)
vertex 0: (25.0, 0.0)
vertex 1: (7.7, 23.8)
vertex 2: (-20.2, 14.7)
vertex 3: (-20.2, -14.7)
vertex 4: (5.8, -22.0)
vertex 3: (-19.1, -12.3)
vertex 4: (6.7, -20.7)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Maximum matching (3 edges):
0 - 3
1 - 2
0 - 1
2 - 3
4 - 5
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,34 @@ 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.

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