# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1225992938 -3600
# Node ID a7e8ad460d6648e3f188f15e2aaaeaae7ab2c6b6
# Parent efbd0ab50a774de69ec772748d18ab5d56bc233a
Add missing tags and functions for item counting in SmartGraph (#3)
diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h
a
|
b
|
|
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; } |