|     94       It e; first(e); return e; } |     94       It e; first(e); return e; } | 
|     95  |     95  | 
|     96     template< typename It > It first(const Node& v) const {  |     96     template< typename It > It first(const Node& v) const {  | 
|     97       It e; first(e, v); return e; } |     97       It e; first(e, v); return e; } | 
|     98  |     98  | 
|     99     Node head(const Edge& e) const { return graph->head(e); } |     99     Node target(const Edge& e) const { return graph->target(e); } | 
|    100     Node tail(const Edge& e) const { return graph->tail(e); } |    100     Node source(const Edge& e) const { return graph->source(e); } | 
|    101  |    101  | 
|    102     template<typename I> bool valid(const I& i) const  |    102     template<typename I> bool valid(const I& i) const  | 
|    103       { return graph->valid(i); } |    103       { return graph->valid(i); } | 
|    104    |    104    | 
|    105     //template<typename I> void setInvalid(const I &i); |    105     //template<typename I> void setInvalid(const I &i); | 
|    112       return graph->aNode(e); } |    112       return graph->aNode(e); } | 
|    113     template<typename I> Node bNode(const I& e) const {  |    113     template<typename I> Node bNode(const I& e) const {  | 
|    114       return graph->bNode(e); } |    114       return graph->bNode(e); } | 
|    115    |    115    | 
|    116     Node addNode() const { return graph->addNode(); } |    116     Node addNode() const { return graph->addNode(); } | 
|    117     Edge addEdge(const Node& tail, const Node& head) const {  |    117     Edge addEdge(const Node& source, const Node& target) const {  | 
|    118       return graph->addEdge(tail, head); } |    118       return graph->addEdge(source, target); } | 
|    119    |    119    | 
|    120     template<typename I> void erase(const I& i) const { graph->erase(i); } |    120     template<typename I> void erase(const I& i) const { graph->erase(i); } | 
|    121    |    121    | 
|    122     void clear() const { graph->clear(); } |    122     void clear() const { graph->clear(); } | 
|    123      |    123      | 
|    243       It e; this->first(e); return e; } |    243       It e; this->first(e); return e; } | 
|    244  |    244  | 
|    245     template< typename It > It first(const Node& v) const {  |    245     template< typename It > It first(const Node& v) const {  | 
|    246       It e; this->first(e, v); return e; } |    246       It e; this->first(e, v); return e; } | 
|    247  |    247  | 
|    248     Node head(const Edge& e) const { return gw.head(e); } |    248     Node target(const Edge& e) const { return gw.target(e); } | 
|    249     Node tail(const Edge& e) const { return gw.tail(e); } |    249     Node source(const Edge& e) const { return gw.source(e); } | 
|    250  |    250  | 
|    251     template<typename I> bool valid(const I& i) const { return gw.valid(i); } |    251     template<typename I> bool valid(const I& i) const { return gw.valid(i); } | 
|    252    |    252    | 
|    253     //template<typename I> void setInvalid(const I &i); |    253     //template<typename I> void setInvalid(const I &i); | 
|    254     //{ return graph->setInvalid(i); } |    254     //{ return graph->setInvalid(i); } | 
|    258    |    258    | 
|    259     template<typename I> Node aNode(const I& e) const { return gw.aNode(e); } |    259     template<typename I> Node aNode(const I& e) const { return gw.aNode(e); } | 
|    260     template<typename I> Node bNode(const I& e) const { return gw.bNode(e); } |    260     template<typename I> Node bNode(const I& e) const { return gw.bNode(e); } | 
|    261    |    261    | 
|    262     Node addNode() const { return gw.addNode(); } |    262     Node addNode() const { return gw.addNode(); } | 
|    263     Edge addEdge(const Node& tail, const Node& head) const {  |    263     Edge addEdge(const Node& source, const Node& target) const {  | 
|    264       return gw.addEdge(tail, head); } |    264       return gw.addEdge(source, target); } | 
|    265    |    265    | 
|    266     template<typename I> void erase(const I& i) const { gw.erase(i); } |    266     template<typename I> void erase(const I& i) const { gw.erase(i); } | 
|    267    |    267    | 
|    268     void clear() const { gw.clear(); } |    268     void clear() const { gw.clear(); } | 
|    269      |    269      | 
|    320 //       It e; first(e); return e; } |    320 //       It e; first(e); return e; } | 
|    321  |    321  | 
|    322 //     template< typename It > It first(const Node& v) const {  |    322 //     template< typename It > It first(const Node& v) const {  | 
|    323 //       It e; first(e, v); return e; } |    323 //       It e; first(e, v); return e; } | 
|    324  |    324  | 
|    325 //     Node head(const Edge& e) const { return graph->tail(e); } |    325 //     Node target(const Edge& e) const { return graph->source(e); } | 
|    326 //     Node tail(const Edge& e) const { return graph->head(e); } |    326 //     Node source(const Edge& e) const { return graph->target(e); } | 
|    327    |    327    | 
|    328 //     template<typename I> bool valid(const I& i) const  |    328 //     template<typename I> bool valid(const I& i) const  | 
|    329 //       { return graph->valid(i); } |    329 //       { return graph->valid(i); } | 
|    330    |    330    | 
|    331 //     //template<typename I> void setInvalid(const I &i); |    331 //     //template<typename I> void setInvalid(const I &i); | 
|    335 //       return graph->aNode(e); } |    335 //       return graph->aNode(e); } | 
|    336 //     template<typename I> Node bNode(const I& e) const {  |    336 //     template<typename I> Node bNode(const I& e) const {  | 
|    337 //       return graph->bNode(e); } |    337 //       return graph->bNode(e); } | 
|    338  |    338  | 
|    339 //     Node addNode() const { return graph->addNode(); } |    339 //     Node addNode() const { return graph->addNode(); } | 
|    340 //     Edge addEdge(const Node& tail, const Node& head) const {  |    340 //     Edge addEdge(const Node& source, const Node& target) const {  | 
|    341 //       return graph->addEdge(tail, head); } |    341 //       return graph->addEdge(source, target); } | 
|    342    |    342    | 
|    343 //     int nodeNum() const { return graph->nodeNum(); } |    343 //     int nodeNum() const { return graph->nodeNum(); } | 
|    344 //     int edgeNum() const { return graph->edgeNum(); } |    344 //     int edgeNum() const { return graph->edgeNum(); } | 
|    345    |    345    | 
|    346 //     template<typename I> void erase(const I& i) const { graph->erase(i); } |    346 //     template<typename I> void erase(const I& i) const { graph->erase(i); } | 
|    401 //     //  It e; first(e); return e; } |    401 //     //  It e; first(e); return e; } | 
|    402  |    402  | 
|    403 //     //template< typename It > It first(const Node& v) const {  |    403 //     //template< typename It > It first(const Node& v) const {  | 
|    404 //     //  It e; first(e, v); return e; } |    404 //     //  It e; first(e, v); return e; } | 
|    405  |    405  | 
|    406 //     //Node head(const Edge& e) const { return graph->tail(e); } |    406 //     //Node target(const Edge& e) const { return graph->source(e); } | 
|    407 //     //Node tail(const Edge& e) const { return graph->head(e); } |    407 //     //Node source(const Edge& e) const { return graph->target(e); } | 
|    408    |    408    | 
|    409 //     //template<typename I> bool valid(const I& i) const  |    409 //     //template<typename I> bool valid(const I& i) const  | 
|    410 //     //  { return graph->valid(i); } |    410 //     //  { return graph->valid(i); } | 
|    411    |    411    | 
|    412 //     //template<typename I> void setInvalid(const I &i); |    412 //     //template<typename I> void setInvalid(const I &i); | 
|    416 //     //  return graph->aNode(e); } |    416 //     //  return graph->aNode(e); } | 
|    417 //     //template<typename I> Node bNode(const I& e) const {  |    417 //     //template<typename I> Node bNode(const I& e) const {  | 
|    418 //     //  return graph->bNode(e); } |    418 //     //  return graph->bNode(e); } | 
|    419  |    419  | 
|    420 //     //Node addNode() const { return graph->addNode(); } |    420 //     //Node addNode() const { return graph->addNode(); } | 
|    421 //     //Edge addEdge(const Node& tail, const Node& head) const {  |    421 //     //Edge addEdge(const Node& source, const Node& target) const {  | 
|    422 //     //  return graph->addEdge(tail, head); } |    422 //     //  return graph->addEdge(source, target); } | 
|    423    |    423    | 
|    424 //     //int nodeNum() const { return graph->nodeNum(); } |    424 //     //int nodeNum() const { return graph->nodeNum(); } | 
|    425 //     //int edgeNum() const { return graph->edgeNum(); } |    425 //     //int edgeNum() const { return graph->edgeNum(); } | 
|    426    |    426    | 
|    427 //     //template<typename I> void erase(const I& i) const { graph->erase(i); } |    427 //     //template<typename I> void erase(const I& i) const { graph->erase(i); } | 
|    465     typedef typename GraphWrapper<GraphWrapper>::InEdgeIt OutEdgeIt; |    465     typedef typename GraphWrapper<GraphWrapper>::InEdgeIt OutEdgeIt; | 
|    466  |    466  | 
|    467     RevGraphWrapper(GraphWrapper _gw) :  |    467     RevGraphWrapper(GraphWrapper _gw) :  | 
|    468       GraphWrapper<GraphWrapper>(_gw) { }   |    468       GraphWrapper<GraphWrapper>(_gw) { }   | 
|    469  |    469  | 
|    470     Node head(const Edge& e) const  |    470     Node target(const Edge& e) const  | 
|    471       { return GraphWrapper<GraphWrapper>::tail(e); } |    471       { return GraphWrapper<GraphWrapper>::source(e); } | 
|    472     Node tail(const Edge& e) const  |    472     Node source(const Edge& e) const  | 
|    473       { return GraphWrapper<GraphWrapper>::head(e); } |    473       { return GraphWrapper<GraphWrapper>::target(e); } | 
|    474   }; |    474   }; | 
|    475  |    475  | 
|    476   //Subgraph on the same node-set and partial edge-set |    476   //Subgraph on the same node-set and partial edge-set | 
|    477   template<typename GraphWrapper, typename EdgeFilterMap> |    477   template<typename GraphWrapper, typename EdgeFilterMap> | 
|    478   class SubGraphWrapper : public GraphWrapper<GraphWrapper> { |    478   class SubGraphWrapper : public GraphWrapper<GraphWrapper> { | 
|    597 //       return e; |    597 //       return e; | 
|    598 //     } |    598 //     } | 
|    599  |    599  | 
|    600 //     OutEdgeIt& next(OutEdgeIt& e) const { |    600 //     OutEdgeIt& next(OutEdgeIt& e) const { | 
|    601 //       if (e.out_or_in) { |    601 //       if (e.out_or_in) { | 
|    602 // 	Node n=gw.tail(e.out); |    602 // 	Node n=gw.source(e.out); | 
|    603 // 	gw.next(e.out); |    603 // 	gw.next(e.out); | 
|    604 // 	if (!gw.valid(e.out)) { |    604 // 	if (!gw.valid(e.out)) { | 
|    605 // 	  e.out_or_in=false; |    605 // 	  e.out_or_in=false; | 
|    606 // 	  gw.first(e.in, n); |    606 // 	  gw.first(e.in, n); | 
|    607 // 	} |    607 // 	} | 
|    610 //       } |    610 //       } | 
|    611 //       return e; |    611 //       return e; | 
|    612 //     } |    612 //     } | 
|    613  |    613  | 
|    614 //     Node aNode(const OutEdgeIt& e) const {  |    614 //     Node aNode(const OutEdgeIt& e) const {  | 
|    615 //       if (e.out_or_in) return gw.tail(e); else return gw.head(e); } |    615 //       if (e.out_or_in) return gw.source(e); else return gw.target(e); } | 
|    616 //     Node bNode(const OutEdgeIt& e) const {  |    616 //     Node bNode(const OutEdgeIt& e) const {  | 
|    617 //       if (e.out_or_in) return gw.head(e); else return gw.tail(e); } |    617 //       if (e.out_or_in) return gw.target(e); else return gw.source(e); } | 
|    618  |    618  | 
|    619 //     typedef OutEdgeIt InEdgeIt;  |    619 //     typedef OutEdgeIt InEdgeIt;  | 
|    620  |    620  | 
|    621 //     template<typename I> I& first(I& i) const { return gw.first(i); } |    621 //     template<typename I> I& first(I& i) const { return gw.first(i); } | 
|    622 // //     template<typename I, typename P> I& first(I& i, const P& p) const {  |    622 // //     template<typename I, typename P> I& first(I& i, const P& p) const {  | 
|    630 //       It e; first(e); return e; } |    630 //       It e; first(e); return e; } | 
|    631  |    631  | 
|    632 //     template< typename It > It first(const Node& v) const {  |    632 //     template< typename It > It first(const Node& v) const {  | 
|    633 //       It e; first(e, v); return e; } |    633 //       It e; first(e, v); return e; } | 
|    634  |    634  | 
|    635 //     Node head(const Edge& e) const { return gw.head(e); } |    635 //     Node target(const Edge& e) const { return gw.target(e); } | 
|    636 //     Node tail(const Edge& e) const { return gw.tail(e); } |    636 //     Node source(const Edge& e) const { return gw.source(e); } | 
|    637  |    637  | 
|    638 //     template<typename I> bool valid(const I& i) const  |    638 //     template<typename I> bool valid(const I& i) const  | 
|    639 //       { return gw.valid(i); } |    639 //       { return gw.valid(i); } | 
|    640    |    640    | 
|    641 //     //template<typename I> void setInvalid(const I &i); |    641 //     //template<typename I> void setInvalid(const I &i); | 
|    649 // //     template<typename I> Node bNode(const I& e) const {  |    649 // //     template<typename I> Node bNode(const I& e) const {  | 
|    650 // //       return graph->bNode(e); } |    650 // //       return graph->bNode(e); } | 
|    651    |    651    | 
|    652 //     Node addNode() const { return gw.addNode(); } |    652 //     Node addNode() const { return gw.addNode(); } | 
|    653 // // FIXME: ez igy nem jo, mert nem |    653 // // FIXME: ez igy nem jo, mert nem | 
|    654 // //    Edge addEdge(const Node& tail, const Node& head) const {  |    654 // //    Edge addEdge(const Node& source, const Node& target) const {  | 
|    655 // //      return graph->addEdge(tail, head); } |    655 // //      return graph->addEdge(source, target); } | 
|    656    |    656    | 
|    657 //     template<typename I> void erase(const I& i) const { gw.erase(i); } |    657 //     template<typename I> void erase(const I& i) const { gw.erase(i); } | 
|    658    |    658    | 
|    659 //     void clear() const { gw.clear(); } |    659 //     void clear() const { gw.clear(); } | 
|    660      |    660      | 
|    796     template<typename I, typename P> I& first(I& i, const P& p) const {  |    796     template<typename I, typename P> I& first(I& i, const P& p) const {  | 
|    797       gw.first(i, p); return i; } |    797       gw.first(i, p); return i; } | 
|    798  |    798  | 
|    799     OutEdgeIt& next(OutEdgeIt& e) const { |    799     OutEdgeIt& next(OutEdgeIt& e) const { | 
|    800       if (e.out_or_in) { |    800       if (e.out_or_in) { | 
|    801 	Node n=gw.tail(e.out); |    801 	Node n=gw.source(e.out); | 
|    802 	gw.next(e.out); |    802 	gw.next(e.out); | 
|    803 	if (!gw.valid(e.out)) { e.out_or_in=false; gw.first(e.in, n); } |    803 	if (!gw.valid(e.out)) { e.out_or_in=false; gw.first(e.in, n); } | 
|    804       } else { |    804       } else { | 
|    805 	gw.next(e.in); |    805 	gw.next(e.in); | 
|    806       } |    806       } | 
|    807       return e; |    807       return e; | 
|    808     } |    808     } | 
|    809  |    809  | 
|    810     EdgeIt& next(EdgeIt& e) const { |    810     EdgeIt& next(EdgeIt& e) const { | 
|    811       //NodeIt v=tail(e); |    811       //NodeIt v=source(e); | 
|    812       gw.next(e.out); |    812       gw.next(e.out); | 
|    813       while (valid(e.v) && !gw.valid(e.out)) {  |    813       while (valid(e.v) && !gw.valid(e.out)) {  | 
|    814 	next(e.v);  |    814 	next(e.v);  | 
|    815 	if (valid(e.v)) gw.first(e.out, e.v);  |    815 	if (valid(e.v)) gw.first(e.out, e.v);  | 
|    816       } |    816       } | 
|    824       It e; first(e); return e; } |    824       It e; first(e); return e; } | 
|    825  |    825  | 
|    826     template< typename It > It first(const Node& v) const {  |    826     template< typename It > It first(const Node& v) const {  | 
|    827       It e; first(e, v); return e; } |    827       It e; first(e, v); return e; } | 
|    828  |    828  | 
|    829 //    Node head(const Edge& e) const { return gw.head(e); } |    829 //    Node target(const Edge& e) const { return gw.target(e); } | 
|    830 //    Node tail(const Edge& e) const { return gw.tail(e); } |    830 //    Node source(const Edge& e) const { return gw.source(e); } | 
|    831  |    831  | 
|    832 //    template<typename I> bool valid(const I& i) const  |    832 //    template<typename I> bool valid(const I& i) const  | 
|    833 //      { return gw.valid(i); } |    833 //      { return gw.valid(i); } | 
|    834    |    834    | 
|    835 //    int nodeNum() const { return gw.nodeNum(); } |    835 //    int nodeNum() const { return gw.nodeNum(); } | 
|    839 //       return graph->aNode(e); } |    839 //       return graph->aNode(e); } | 
|    840 //     template<typename I> Node bNode(const I& e) const {  |    840 //     template<typename I> Node bNode(const I& e) const {  | 
|    841 //       return graph->bNode(e); } |    841 //       return graph->bNode(e); } | 
|    842  |    842  | 
|    843     Node aNode(const OutEdgeIt& e) const {  |    843     Node aNode(const OutEdgeIt& e) const {  | 
|    844       if (e.out_or_in) return gw.tail(e); else return gw.head(e); } |    844       if (e.out_or_in) return gw.source(e); else return gw.target(e); } | 
|    845     Node bNode(const OutEdgeIt& e) const {  |    845     Node bNode(const OutEdgeIt& e) const {  | 
|    846       if (e.out_or_in) return gw.head(e); else return gw.tail(e); } |    846       if (e.out_or_in) return gw.target(e); else return gw.source(e); } | 
|    847    |    847    | 
|    848 //    Node addNode() const { return gw.addNode(); } |    848 //    Node addNode() const { return gw.addNode(); } | 
|    849  |    849  | 
|    850 // FIXME: ez igy nem jo, mert nem |    850 // FIXME: ez igy nem jo, mert nem | 
|    851 //    Edge addEdge(const Node& tail, const Node& head) const {  |    851 //    Edge addEdge(const Node& source, const Node& target) const {  | 
|    852 //      return graph->addEdge(tail, head); } |    852 //      return graph->addEdge(source, target); } | 
|    853    |    853    | 
|    854 //    template<typename I> void erase(const I& i) const { gw.erase(i); } |    854 //    template<typename I> void erase(const I& i) const { gw.erase(i); } | 
|    855    |    855    | 
|    856 //    void clear() const { gw.clear(); } |    856 //    void clear() const { gw.clear(); } | 
|    857      |    857      | 
|    911 //       It e; first(e); return e; } |    911 //       It e; first(e); return e; } | 
|    912  |    912  | 
|    913 //     template< typename It > It first(Node v) const {  |    913 //     template< typename It > It first(Node v) const {  | 
|    914 //       It e; first(e, v); return e; } |    914 //       It e; first(e, v); return e; } | 
|    915  |    915  | 
|    916 //     Node head(const Edge& e) const { return graph->head(e); } |    916 //     Node target(const Edge& e) const { return graph->target(e); } | 
|    917 //     Node tail(const Edge& e) const { return graph->tail(e); } |    917 //     Node source(const Edge& e) const { return graph->source(e); } | 
|    918    |    918    | 
|    919 //     template<typename I> Node aNode(const I& e) const {  |    919 //     template<typename I> Node aNode(const I& e) const {  | 
|    920 //       return graph->aNode(e); } |    920 //       return graph->aNode(e); } | 
|    921 //     template<typename I> Node bNode(const I& e) const {  |    921 //     template<typename I> Node bNode(const I& e) const {  | 
|    922 //       return graph->bNode(e); } |    922 //       return graph->bNode(e); } | 
|    926    |    926    | 
|    927 //     //template<typename I> void setInvalid(const I &i); |    927 //     //template<typename I> void setInvalid(const I &i); | 
|    928 //     //{ return graph->setInvalid(i); } |    928 //     //{ return graph->setInvalid(i); } | 
|    929    |    929    | 
|    930 //     Node addNode() { return graph->addNode(); } |    930 //     Node addNode() { return graph->addNode(); } | 
|    931 //     Edge addEdge(const Node& tail, const Node& head) {  |    931 //     Edge addEdge(const Node& source, const Node& target) {  | 
|    932 //       return graph->addEdge(tail, head); } |    932 //       return graph->addEdge(source, target); } | 
|    933    |    933    | 
|    934 //     template<typename I> void erase(const I& i) { graph->erase(i); } |    934 //     template<typename I> void erase(const I& i) { graph->erase(i); } | 
|    935    |    935    | 
|    936 //     void clear() { graph->clear(); } |    936 //     void clear() { graph->clear(); } | 
|    937    |    937    | 
|   1178       It e; |   1178       It e; | 
|   1179       first(e, v); |   1179       first(e, v); | 
|   1180       return e;  |   1180       return e;  | 
|   1181     } |   1181     } | 
|   1182  |   1182  | 
|   1183     Node tail(Edge e) const {  |   1183     Node source(Edge e) const {  | 
|   1184       return ((e.out_or_in) ? gw.aNode(e.out) : gw.aNode(e.in)); } |   1184       return ((e.out_or_in) ? gw.aNode(e.out) : gw.aNode(e.in)); } | 
|   1185     Node head(Edge e) const {  |   1185     Node target(Edge e) const {  | 
|   1186       return ((e.out_or_in) ? gw.bNode(e.out) : gw.bNode(e.in)); } |   1186       return ((e.out_or_in) ? gw.bNode(e.out) : gw.bNode(e.in)); } | 
|   1187  |   1187  | 
|   1188     Node aNode(OutEdgeIt e) const {  |   1188     Node aNode(OutEdgeIt e) const {  | 
|   1189       return ((e.out_or_in) ? gw.aNode(e.out) : gw.aNode(e.in)); } |   1189       return ((e.out_or_in) ? gw.aNode(e.out) : gw.aNode(e.in)); } | 
|   1190     Node bNode(OutEdgeIt e) const {  |   1190     Node bNode(OutEdgeIt e) const {  | 
|   1309       It e; this->first(e, v); return e; } |   1309       It e; this->first(e, v); return e; } | 
|   1310  |   1310  | 
|   1311     void erase(const OutEdgeIt& e) const { |   1311     void erase(const OutEdgeIt& e) const { | 
|   1312       OutEdgeIt f=e; |   1312       OutEdgeIt f=e; | 
|   1313       this->next(f); |   1313       this->next(f); | 
|   1314       first_out_edges->set(this->tail(e), f); |   1314       first_out_edges->set(this->source(e), f); | 
|   1315     } |   1315     } | 
|   1316   }; |   1316   }; | 
|   1317  |   1317  | 
|   1318 //   template<typename Graph, typename Number, typename FlowMap, typename CapacityMap> |   1318 //   template<typename Graph, typename Number, typename FlowMap, typename CapacityMap> | 
|   1319 //   class ErasingResGraphWrapper : public ResGraphWrapper<Graph, Number, FlowMap, CapacityMap> { |   1319 //   class ErasingResGraphWrapper : public ResGraphWrapper<Graph, Number, FlowMap, CapacityMap> { | 
|   1379 //       It e; first(e); return e; } |   1379 //       It e; first(e); return e; } | 
|   1380  |   1380  | 
|   1381 //     template< typename It > It first(const Node& v) const {  |   1381 //     template< typename It > It first(const Node& v) const {  | 
|   1382 //       It e; first(e, v); return e; } |   1382 //       It e; first(e, v); return e; } | 
|   1383  |   1383  | 
|   1384 //     //Node head(const Edge& e) const { return gw.head(e); } |   1384 //     //Node target(const Edge& e) const { return gw.target(e); } | 
|   1385 //     //Node tail(const Edge& e) const { return gw.tail(e); } |   1385 //     //Node source(const Edge& e) const { return gw.source(e); } | 
|   1386  |   1386  | 
|   1387 //     //template<typename I> bool valid(const I& i) const  |   1387 //     //template<typename I> bool valid(const I& i) const  | 
|   1388 //     //  { return gw.valid(i); } |   1388 //     //  { return gw.valid(i); } | 
|   1389    |   1389    | 
|   1390 //     //int nodeNum() const { return gw.nodeNum(); } |   1390 //     //int nodeNum() const { return gw.nodeNum(); } | 
|   1394 //     //  return gw.aNode(e); } |   1394 //     //  return gw.aNode(e); } | 
|   1395 //     //template<typename I> Node bNode(const I& e) const {  |   1395 //     //template<typename I> Node bNode(const I& e) const {  | 
|   1396 //     //  return gw.bNode(e); } |   1396 //     //  return gw.bNode(e); } | 
|   1397    |   1397    | 
|   1398 //     //Node addNode() const { return gw.addNode(); } |   1398 //     //Node addNode() const { return gw.addNode(); } | 
|   1399 //     //Edge addEdge(const Node& tail, const Node& head) const {  |   1399 //     //Edge addEdge(const Node& source, const Node& target) const {  | 
|   1400 //     //  return gw.addEdge(tail, head); } |   1400 //     //  return gw.addEdge(source, target); } | 
|   1401    |   1401    | 
|   1402 //     //void erase(const OutEdgeIt& e) { |   1402 //     //void erase(const OutEdgeIt& e) { | 
|   1403 //     //  first_out_edge(this->tail(e))=e; |   1403 //     //  first_out_edge(this->source(e))=e; | 
|   1404 //     //} |   1404 //     //} | 
|   1405 //     void erase(const Edge& e) { |   1405 //     void erase(const Edge& e) { | 
|   1406 //       OutEdgeIt f(e); |   1406 //       OutEdgeIt f(e); | 
|   1407 //       next(f); |   1407 //       next(f); | 
|   1408 //       first_out_edges.set(this->tail(e), f); |   1408 //       first_out_edges.set(this->source(e), f); | 
|   1409 //     } |   1409 //     } | 
|   1410 //     //template<typename I> void erase(const I& i) const { gw.erase(i); } |   1410 //     //template<typename I> void erase(const I& i) const { gw.erase(i); } | 
|   1411    |   1411    | 
|   1412 //     //void clear() const { gw.clear(); } |   1412 //     //void clear() const { gw.clear(); } | 
|   1413      |   1413      | 
|   1457 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, gw.nodeNum()) {  |   1457 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, gw.nodeNum()) {  | 
|   1458 //     } |   1458 //     } | 
|   1459  |   1459  | 
|   1460 //     OutEdgeIt& first(OutEdgeIt& e, const Node& n) const { |   1460 //     OutEdgeIt& first(OutEdgeIt& e, const Node& n) const { | 
|   1461 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::first(e, n); |   1461 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::first(e, n); | 
|   1462 //       while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e))))  |   1462 //       while (valid(e) && (dist.get(source(e))/*+1!=*/>=dist.get(target(e))))  | 
|   1463 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |   1463 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); | 
|   1464 //       return e; |   1464 //       return e; | 
|   1465 //     } |   1465 //     } | 
|   1466  |   1466  | 
|   1467 //     NodeIt& next(NodeIt& e) const { |   1467 //     NodeIt& next(NodeIt& e) const { | 
|   1468 //       return ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |   1468 //       return ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); | 
|   1469 //     } |   1469 //     } | 
|   1470  |   1470  | 
|   1471 //     OutEdgeIt& next(OutEdgeIt& e) const { |   1471 //     OutEdgeIt& next(OutEdgeIt& e) const { | 
|   1472 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |   1472 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); | 
|   1473 //       while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e))))  |   1473 //       while (valid(e) && (dist.get(source(e))/*+1!*/>=dist.get(target(e))))  | 
|   1474 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); |   1474 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e); | 
|   1475 //       return e; |   1475 //       return e; | 
|   1476 //     } |   1476 //     } | 
|   1477  |   1477  | 
|   1478 //     NodeIt& first(NodeIt& n) const { |   1478 //     NodeIt& first(NodeIt& n) const { | 
|   1480 //     } |   1480 //     } | 
|   1481  |   1481  | 
|   1482 //     void erase(const Edge& e) { |   1482 //     void erase(const Edge& e) { | 
|   1483 //       OutEdgeIt f(e); |   1483 //       OutEdgeIt f(e); | 
|   1484 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |   1484 //       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); | 
|   1485 //       while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f))))  |   1485 //       while (valid(f) && (dist.get(source(f))/*+1!=*/>=dist.get(target(f))))  | 
|   1486 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); |   1486 // 	ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f); | 
|   1487 //       first_out_edges.set(this->tail(e), f); |   1487 //       first_out_edges.set(this->source(e), f); | 
|   1488 //     } |   1488 //     } | 
|   1489  |   1489  | 
|   1490 //     //TrivGraphWrapper() : graph(0) { } |   1490 //     //TrivGraphWrapper() : graph(0) { } | 
|   1491 //     //TrivGraphWrapper(Graph& _graph) : graph(&_graph) { } |   1491 //     //TrivGraphWrapper(Graph& _graph) : graph(&_graph) { } | 
|   1492  |   1492  | 
|   1505 //       It e; first(e); return e; } |   1505 //       It e; first(e); return e; } | 
|   1506  |   1506  | 
|   1507 //     template< typename It > It first(const Node& v) const {  |   1507 //     template< typename It > It first(const Node& v) const {  | 
|   1508 //       It e; first(e, v); return e; } |   1508 //       It e; first(e, v); return e; } | 
|   1509  |   1509  | 
|   1510 //     //Node head(const Edge& e) const { return gw.head(e); } |   1510 //     //Node target(const Edge& e) const { return gw.target(e); } | 
|   1511 //     //Node tail(const Edge& e) const { return gw.tail(e); } |   1511 //     //Node source(const Edge& e) const { return gw.source(e); } | 
|   1512  |   1512  | 
|   1513 //     //template<typename I> bool valid(const I& i) const  |   1513 //     //template<typename I> bool valid(const I& i) const  | 
|   1514 //     //  { return gw.valid(i); } |   1514 //     //  { return gw.valid(i); } | 
|   1515    |   1515    | 
|   1516 //     //template<typename I> void setInvalid(const I &i); |   1516 //     //template<typename I> void setInvalid(const I &i); | 
|   1523 //     //  return gw.aNode(e); } |   1523 //     //  return gw.aNode(e); } | 
|   1524 //     //template<typename I> Node bNode(const I& e) const {  |   1524 //     //template<typename I> Node bNode(const I& e) const {  | 
|   1525 //     //  return gw.bNode(e); } |   1525 //     //  return gw.bNode(e); } | 
|   1526    |   1526    | 
|   1527 //     //Node addNode() const { return gw.addNode(); } |   1527 //     //Node addNode() const { return gw.addNode(); } | 
|   1528 //     //Edge addEdge(const Node& tail, const Node& head) const {  |   1528 //     //Edge addEdge(const Node& source, const Node& target) const {  | 
|   1529 //     //  return gw.addEdge(tail, head); } |   1529 //     //  return gw.addEdge(source, target); } | 
|   1530    |   1530    | 
|   1531 //     //template<typename I> void erase(const I& i) const { gw.erase(i); } |   1531 //     //template<typename I> void erase(const I& i) const { gw.erase(i); } | 
|   1532    |   1532    | 
|   1533 //     //void clear() const { gw.clear(); } |   1533 //     //void clear() const { gw.clear(); } | 
|   1534      |   1534      | 
|   1667 //       It e; first(e); return e; } |   1667 //       It e; first(e); return e; } | 
|   1668  |   1668  | 
|   1669 //     template< typename It > It first(Node v) const {  |   1669 //     template< typename It > It first(Node v) const {  | 
|   1670 //       It e; first(e, v); return e; } |   1670 //       It e; first(e, v); return e; } | 
|   1671  |   1671  | 
|   1672 //     Node head(const Edge& e) const { return gw.head(e); } |   1672 //     Node target(const Edge& e) const { return gw.target(e); } | 
|   1673 //     Node tail(const Edge& e) const { return gw.tail(e); } |   1673 //     Node source(const Edge& e) const { return gw.source(e); } | 
|   1674    |   1674    | 
|   1675 //     template<typename I> Node aNode(const I& e) const {  |   1675 //     template<typename I> Node aNode(const I& e) const {  | 
|   1676 //       return gw.aNode(e); } |   1676 //       return gw.aNode(e); } | 
|   1677 //     template<typename I> Node bNode(const I& e) const {  |   1677 //     template<typename I> Node bNode(const I& e) const {  | 
|   1678 //       return gw.bNode(e); } |   1678 //       return gw.bNode(e); } | 
|   1682    |   1682    | 
|   1683 //     //template<typename I> void setInvalid(const I &i); |   1683 //     //template<typename I> void setInvalid(const I &i); | 
|   1684 //     //{ return gw.setInvalid(i); } |   1684 //     //{ return gw.setInvalid(i); } | 
|   1685    |   1685    | 
|   1686 //     Node addNode() { return gw.addNode(); } |   1686 //     Node addNode() { return gw.addNode(); } | 
|   1687 //     Edge addEdge(const Node& tail, const Node& head) {  |   1687 //     Edge addEdge(const Node& source, const Node& target) {  | 
|   1688 //       return gw.addEdge(tail, head); } |   1688 //       return gw.addEdge(source, target); } | 
|   1689    |   1689    | 
|   1690 //     template<typename I> void erase(const I& i) { gw.erase(i); } |   1690 //     template<typename I> void erase(const I& i) { gw.erase(i); } | 
|   1691    |   1691    | 
|   1692 //     void clear() { gw.clear(); } |   1692 //     void clear() { gw.clear(); } | 
|   1693    |   1693    |