- Fixed some semantics issues to make data structure names more akin to their mathematical equivalents
- multiset.h TODO: test - Fixed some double underscores that I missed
This commit is contained in:
@@ -180,23 +180,15 @@ class RDTreePrinter:
|
||||
if child < self.capacity:
|
||||
self.visit.appendleft((child, 0, depth + 1))
|
||||
|
||||
if child == 18446744073709551615: # If the child is NULL
|
||||
if nprevc != 18446744073709551615: # And there was a previous child
|
||||
if nnext != 18446744073709551615: # And there is a next node
|
||||
index += '┌' # Begin new branch
|
||||
else: # Otherwise
|
||||
index += '─' # Add single branch
|
||||
elif nnext != 18446744073709551615: # Else if there is a next node
|
||||
index += '├' # Continue Branch
|
||||
else: # Otherwise
|
||||
index += '└' # Terminate Branch
|
||||
elif nprevc != 18446744073709551615: # Else if there is a previous child (this node has a child)
|
||||
index += '─' # Add single branch
|
||||
else: # Otherwise
|
||||
index += '└' # Terminate Branch
|
||||
# ┌ ─ ├ └
|
||||
|
||||
if nnext != 18446744073709551615:
|
||||
index += '├'
|
||||
else:
|
||||
index += '└'
|
||||
|
||||
index += '─'
|
||||
index += '[{}]'.format(i)
|
||||
index += '[{}, {}]'.format(i, node)
|
||||
print(index)
|
||||
if value is None:
|
||||
return index, '{ empty }'
|
||||
@@ -214,8 +206,6 @@ class RDTreePrinter:
|
||||
return "{ size = " + str(self.size) + " }"
|
||||
|
||||
def children(self):
|
||||
if self.size == 0:
|
||||
return None
|
||||
return self.Iterator(self.tree, 0, self.capacity)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user