lemon/smart_graph.h
changeset 138 a0f755a30cf1
parent 125 19e82bda606a
child 139 701c529ba737
equal deleted inserted replaced
1:5e52d5997554 2:ca3a545f00ca
   556       nodes[n].first_out = -1;
   556       nodes[n].first_out = -1;
   557       
   557       
   558       return Node(n);
   558       return Node(n);
   559     }
   559     }
   560     
   560     
   561     Edge addArc(Node u, Node v) {
   561     Edge addEdge(Node u, Node v) {
   562       int n = arcs.size();
   562       int n = arcs.size();
   563       arcs.push_back(ArcT());
   563       arcs.push_back(ArcT());
   564       arcs.push_back(ArcT());
   564       arcs.push_back(ArcT());
   565       
   565       
   566       arcs[n].target = u._id;
   566       arcs[n].target = u._id;
   637     
   637     
   638     ///Add a new edge to the graph with node \c s
   638     ///Add a new edge to the graph with node \c s
   639     ///and \c t.
   639     ///and \c t.
   640     ///\return the new edge.
   640     ///\return the new edge.
   641     Edge addEdge(const Node& s, const Node& t) { 
   641     Edge addEdge(const Node& s, const Node& t) { 
   642       return Parent::addArc(s, t); 
   642       return Parent::addEdge(s, t); 
   643     }
   643     }
   644 
   644 
   645     ///Clear the graph.
   645     ///Clear the graph.
   646     
   646     
   647     ///Erase all the nodes and edges from the graph.
   647     ///Erase all the nodes and edges from the graph.