Changeset 1106:0a7d604a9763 in lemon0.x
 Timestamp:
 01/28/05 16:37:08 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1505
 Location:
 src/lemon
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

src/lemon/concept/graph_component.h
r1043 r1106 298 298 int id(const Node&) const { return 1;} 299 299 300 /// \brief Gives back the node by the unique id. 301 /// 302 /// Gives back the node by the unique id. 303 /// If the graph does not contain node with the given id 304 /// then the result of the function is undetermined. 305 Node fromId(int id, Node) const { return INVALID;} 306 307 /// \brief Gives back an unique integer id for the Edge. 308 /// 300 309 /// Gives back an unique integer id for the Edge. 301 302 /// Gives back an unique integer id for the Edge.303 310 /// 304 311 int id(const Edge&) const { return 1;} 312 313 /// \brief Gives back the edge by the unique id. 314 /// 315 /// Gives back the edge by the unique id. 316 /// If the graph does not contain edge with the given id 317 /// then the result of the function is undetermined. 318 Edge fromId(int id, Edge) const { return INVALID;} 305 319 306 320 template <typename _Graph> … … 312 326 int nid = graph.id(node); 313 327 nid = graph.id(node); 328 node = graph.fromId(nid, Node()); 314 329 typename _Graph::Edge edge; 315 330 int eid = graph.id(edge); 316 331 eid = graph.id(edge); 332 edge = graph.fromId(eid, Edge()); 317 333 } 318 334 
src/lemon/full_graph.h
r1039 r1106 103 103 static int id(Edge e) { return e.id; } 104 104 105 static Node fromId(int id, Node) { return Node(id);} 106 107 static Edge fromId(int id, Edge) { return Edge(id);} 108 105 109 /// Finds an edge between two nodes. 106 110 
src/lemon/list_graph.h
r1080 r1106 163 163 static int id(Edge e) { return e.id; } 164 164 165 static Node fromId(int id, Node) { return Node(id);} 166 static Edge fromId(int id, Edge) { return Edge(id);} 167 165 168 /// Adds a new node to the graph. 166 169 
src/lemon/smart_graph.h
r1082 r1106 122 122 static int id(Edge e) { return e.n; } 123 123 124 static Node fromId(int id, Node) { return Node(id);} 125 126 static Edge fromId(int id, Edge) { return Edge(id);} 127 124 128 Node addNode() { 125 129 Node n; n.n=nodes.size();
Note: See TracChangeset
for help on using the changeset viewer.