gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Add missing tags and functions for item counting in SmartGraph (#3)
0 1 0
default
1 file changed with 7 insertions and 0 deletions:
↑ Collapse diff ↑
Ignore white space 12 line context
... ...
@@ -477,12 +477,19 @@
477 477

	
478 478

	
479 479

	
480 480
    SmartGraphBase()
481 481
      : nodes(), arcs() {}
482 482

	
483
    typedef True NodeNumTag;
484
    typedef True EdgeNumTag;
485
    typedef True ArcNumTag;
486

	
487
    int nodeNum() const { return nodes.size(); }
488
    int edgeNum() const { return arcs.size() / 2; }
489
    int arcNum() const { return arcs.size(); }
483 490

	
484 491
    int maxNodeId() const { return nodes.size()-1; }
485 492
    int maxEdgeId() const { return arcs.size() / 2 - 1; }
486 493
    int maxArcId() const { return arcs.size()-1; }
487 494

	
488 495
    Node source(Arc e) const { return Node(arcs[e._id ^ 1].target); }
0 comments (0 inline)