[Lemon-commits] Peter Kovacs: Add missing tags and functions for...
Lemon HG
hg at lemon.cs.elte.hu
Fri Nov 7 07:40:00 CET 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/a7e8ad460d66
changeset: 380:a7e8ad460d66
user: Peter Kovacs <kpeter [at] inf.elte.hu>
date: Thu Nov 06 18:35:38 2008 +0100
description:
Add missing tags and functions for item counting in SmartGraph (#3)
diffstat:
1 file changed, 7 insertions(+)
lemon/smart_graph.h | 7 +++++++
diffs (17 lines):
diff -r efbd0ab50a77 -r a7e8ad460d66 lemon/smart_graph.h
--- a/lemon/smart_graph.h Thu Nov 06 14:40:32 2008 +0000
+++ b/lemon/smart_graph.h Thu Nov 06 18:35:38 2008 +0100
@@ -480,6 +480,13 @@
SmartGraphBase()
: nodes(), arcs() {}
+ typedef True NodeNumTag;
+ typedef True EdgeNumTag;
+ typedef True ArcNumTag;
+
+ int nodeNum() const { return nodes.size(); }
+ int edgeNum() const { return arcs.size() / 2; }
+ int arcNum() const { return arcs.size(); }
int maxNodeId() const { return nodes.size()-1; }
int maxEdgeId() const { return arcs.size() / 2 - 1; }
More information about the Lemon-commits
mailing list