829 //FilterGraphWrapper<Graph, Number, FlowMap, CapacityMap>::NodeMap<typename ResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt> first_out_edges; |
833 //FilterGraphWrapper<Graph, Number, FlowMap, CapacityMap>::NodeMap<typename ResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::OutEdgeIt> first_out_edges; |
830 |
834 |
831 public: |
835 public: |
832 FilterGraphWrapper(const Graph& _G, FlowMap& _flow, |
836 FilterGraphWrapper(const Graph& _G, FlowMap& _flow, |
833 const CapacityMap& _capacity) : |
837 const CapacityMap& _capacity) : |
834 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this) { |
838 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, graph->nodeNum()) { |
835 } |
839 } |
836 |
840 |
837 OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const { |
841 OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const { |
838 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::/*getF*/first(e, n); |
842 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::/*getF*/first(e, n); |
839 while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e)))) |
843 while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e)))) |
840 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
844 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
841 return e; |
845 return e; |
842 } |
846 } |
843 |
847 |
844 NodeIt& next(NodeIt& e) const { |
848 NodeIt& next(NodeIt& e) const { |
845 return ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
849 return ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
846 } |
850 } |
847 |
851 |
848 OutEdgeIt& next(OutEdgeIt& e) const { |
852 OutEdgeIt& next(OutEdgeIt& e) const { |
849 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
853 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
850 while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e)))) |
854 while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e)))) |
851 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
855 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |
852 return e; |
856 return e; |
853 } |
857 } |
854 |
858 |
855 NodeIt& /*getF*/first(NodeIt& n) const { |
859 NodeIt& /*getF*/first(NodeIt& n) const { |
857 } |
861 } |
858 |
862 |
859 void erase(const Edge& e) { |
863 void erase(const Edge& e) { |
860 OutEdgeIt f(e); |
864 OutEdgeIt f(e); |
861 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |
865 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |
862 while (valid(f) && (dist.get(tail(f))+1!=dist.get(head(f)))) |
866 while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f)))) |
863 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |
867 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |
864 first_out_edges.set(this->tail(e), f); |
868 first_out_edges.set(this->tail(e), f); |
865 } |
869 } |
866 |
870 |
867 //TrivGraphWrapper() : graph(0) { } |
871 //TrivGraphWrapper() : graph(0) { } |