COIN-OR::LEMON - Graph Library

Changeset 1106:0a7d604a9763 in lemon-0.x for src/lemon/concept


Ignore:
Timestamp:
01/28/05 16:37:08 (19 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1505
Message:

Concept modification to resolve the item by its ID.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/concept/graph_component.h

    r1043 r1106  
    298298      int id(const Node&) const { return -1;}
    299299
     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      ///
    300309      /// Gives back an unique integer id for the Edge.
    301 
    302       /// Gives back an unique integer id for the Edge.
    303310      ///
    304311      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;}
    305319
    306320      template <typename _Graph>
     
    312326          int nid = graph.id(node);
    313327          nid = graph.id(node);
     328          node = graph.fromId(nid, Node());
    314329          typename _Graph::Edge edge;
    315330          int eid = graph.id(edge);
    316331          eid = graph.id(edge);
     332          edge = graph.fromId(eid, Edge());
    317333        }
    318334
Note: See TracChangeset for help on using the changeset viewer.