Changeset 986:e997802b855c in lemon-0.x for src/work/marci/bipartite_graph_wrapper.h
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/bipartite_graph_wrapper.h
r921 r986 168 168 // InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; } 169 169 170 // Node tail(const Edge& e) {171 // if (!(*(this->s_false_t_true_map))[this->graph-> tail(e)])172 // return Node(this->graph-> tail(e));170 // Node source(const Edge& e) { 171 // if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 172 // return Node(this->graph->source(e)); 173 173 // else 174 // return Node(this->graph-> head(e));175 // } 176 // Node head(const Edge& e) {177 // if (!(*(this->s_false_t_true_map))[this->graph-> tail(e)])178 // return Node(this->graph-> head(e));174 // return Node(this->graph->target(e)); 175 // } 176 // Node target(const Edge& e) { 177 // if (!(*(this->s_false_t_true_map))[this->graph->source(e)]) 178 // return Node(this->graph->target(e)); 179 179 // else 180 // return Node(this->graph-> tail(e));180 // return Node(this->graph->source(e)); 181 181 // } 182 182 … … 253 253 254 254 /// A new edge is inserted. 255 ///\pre \c tail have to be in \c S_Class and \c headin \c T_Class.256 Edge addEdge(const Node& tail, const Node& head) {257 return Parent::graph->addEdge( tail, head);255 ///\pre \c source have to be in \c S_Class and \c target in \c T_Class. 256 Edge addEdge(const Node& source, const Node& target) { 257 return Parent::graph->addEdge(source, target); 258 258 } 259 259 … … 696 696 } 697 697 698 Node tail(const Edge& e) const {698 Node source(const Edge& e) const { 699 699 switch (e.spec) { 700 700 case 0: 701 return Node(this->graph-> tail(e));701 return Node(this->graph->source(e)); 702 702 break; 703 703 case 1: … … 710 710 } 711 711 } 712 Node head(const Edge& e) const {712 Node target(const Edge& e) const { 713 713 switch (e.spec) { 714 714 case 0: 715 return Node(this->graph-> head(e));715 return Node(this->graph->target(e)); 716 716 break; 717 717 case 1: … … 733 733 } 734 734 735 Node aNode(const OutEdgeIt& e) const { return tail(e); }736 Node aNode(const InEdgeIt& e) const { return head(e); }737 Node bNode(const OutEdgeIt& e) const { return head(e); }738 Node bNode(const InEdgeIt& e) const { return tail(e); }735 Node aNode(const OutEdgeIt& e) const { return source(e); } 736 Node aNode(const InEdgeIt& e) const { return target(e); } 737 Node bNode(const OutEdgeIt& e) const { return target(e); } 738 Node bNode(const InEdgeIt& e) const { return source(e); } 739 739 740 740 void addNode() const { } … … 742 742 743 743 // Node addNode() const { return Node(this->graph->addNode()); } 744 // Edge addEdge(const Node& tail, const Node& head) const {745 // return Edge(this->graph->addEdge( tail, head)); }744 // Edge addEdge(const Node& source, const Node& target) const { 745 // return Edge(this->graph->addEdge(source, target)); } 746 746 747 747 // void erase(const Node& i) const { this->graph->erase(i); }
Note: See TracChangeset
for help on using the changeset viewer.