lemon/bits/graph_extender.h
changeset 1870 b9c9b52f839e
parent 1820 22099ef840d7
child 1875 98698b69a902
equal deleted inserted replaced
1:79f2319bbf00 2:d0baa1e8465d
   472     void nextOut(Edge& edge) const {
   472     void nextOut(Edge& edge) const {
   473       if (edge.forward) {
   473       if (edge.forward) {
   474 	Parent::nextDown(edge);
   474 	Parent::nextDown(edge);
   475       } else {
   475       } else {
   476 	Parent::nextUp(edge);
   476 	Parent::nextUp(edge);
   477 	if (edge == INVALID) {
   477         edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
   478 	  edge.forward = true;
       
   479 	}	
       
   480       }
   478       }
   481     }
   479     }
   482 
   480 
   483     void firstIn(Edge& edge, const Node& node) const {
   481     void firstIn(Edge& edge, const Node& node) const {
   484       if (Parent::lower(node)) {
   482       if (Parent::lower(node)) {
   492     void nextIn(Edge& edge) const {
   490     void nextIn(Edge& edge) const {
   493       if (edge.forward) {
   491       if (edge.forward) {
   494 	Parent::nextUp(edge);
   492 	Parent::nextUp(edge);
   495       } else {
   493       } else {
   496 	Parent::nextDown(edge);
   494 	Parent::nextDown(edge);
   497 	if (edge == INVALID) {
   495 	edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
   498 	  edge.forward = true;
       
   499 	}	
       
   500       }
   496       }
   501     }
   497     }
   502 
   498 
   503     Node source(const Edge& edge) const {
   499     Node source(const Edge& edge) const {
   504       return edge.forward ? Parent::upperNode(edge) : Parent::lowerNode(edge);
   500       return edge.forward ? Parent::upperNode(edge) : Parent::lowerNode(edge);