diff --git a/include/boost/graph/push_relabel_max_flow.hpp b/include/boost/graph/push_relabel_max_flow.hpp index c70f0ec0..c067e8ed 100644 --- a/include/boost/graph/push_relabel_max_flow.hpp +++ b/include/boost/graph/push_relabel_max_flow.hpp @@ -137,13 +137,14 @@ namespace boost { : g(g_), n(num_vertices(g_)), capacity(cap), src(src_), sink(sink_), index(idx), excess_flow(num_vertices(g_)), - layer_list_ptr(num_vertices(g_)), - current(num_vertices(g_)), + current(num_vertices(g_), out_edges(*vertices(g_).first, g_).second), distance(num_vertices(g_)), color(num_vertices(g_)), reverse_edge(rev), residual_capacity(res), layers(num_vertices(g_)), + layer_list_ptr(num_vertices(g_), + layers.front().inactive_vertices.end()), push_count(0), update_count(0), relabel_count(0), gap_count(0), gap_node_count(0), work_since_last_update(0) @@ -647,7 +648,6 @@ namespace boost { // will need to use random_access_property_map with these std::vector< FlowValue > excess_flow; - std::vector< list_iterator > layer_list_ptr; std::vector< out_edge_iterator > current; std::vector< distance_size_type > distance; std::vector< default_color_type > color; @@ -657,6 +657,7 @@ namespace boost { ResidualCapacityEdgeMap residual_capacity; LayerArray layers; + std::vector< list_iterator > layer_list_ptr; distance_size_type max_distance; // maximal distance distance_size_type max_active; // maximal distance with active node distance_size_type min_active; // minimal distance with active node