Removed underscores for public Node methods. Minor cleanup & comments.

This commit is contained in:
Bob Lantz
2010-03-08 15:32:41 -08:00
parent 2626693241
commit 80be564274
12 changed files with 223 additions and 188 deletions
+2 -2
View File
@@ -20,11 +20,11 @@ class TreeTopo( Topo ):
returns: last node added"""
me = n
isSwitch = depth > 0
self._add_node( me, Node( is_switch=isSwitch ) )
self.add_node( me, Node( is_switch=isSwitch ) )
if isSwitch:
for i in range( 0, fanout ):
child = n + 1
self._add_edge( me, child )
self.add_edge( me, child )
n = self.addTree( child, depth-1, fanout )
return n