Add missing tags and functions for item counting in SmartGraph (#3)
authorPeter Kovacs <kpeter@inf.elte.hu>
Thu, 06 Nov 2008 18:35:38 +0100
changeset 368a7e8ad460d66
parent 366 efbd0ab50a77
child 369 02bc940cbb0e
Add missing tags and functions for item counting in SmartGraph (#3)
lemon/smart_graph.h
     1.1 --- a/lemon/smart_graph.h	Thu Nov 06 14:40:32 2008 +0000
     1.2 +++ b/lemon/smart_graph.h	Thu Nov 06 18:35:38 2008 +0100
     1.3 @@ -480,6 +480,13 @@
     1.4      SmartGraphBase()
     1.5        : nodes(), arcs() {}
     1.6  
     1.7 +    typedef True NodeNumTag;
     1.8 +    typedef True EdgeNumTag;
     1.9 +    typedef True ArcNumTag;
    1.10 +
    1.11 +    int nodeNum() const { return nodes.size(); }
    1.12 +    int edgeNum() const { return arcs.size() / 2; }
    1.13 +    int arcNum() const { return arcs.size(); }
    1.14  
    1.15      int maxNodeId() const { return nodes.size()-1; }
    1.16      int maxEdgeId() const { return arcs.size() / 2 - 1; }