summaryrefslogtreecommitdiffstats
path: root/microbe/traverser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'microbe/traverser.cpp')
-rw-r--r--microbe/traverser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/microbe/traverser.cpp b/microbe/traverser.cpp
index e066381..3436d0c 100644
--- a/microbe/traverser.cpp
+++ b/microbe/traverser.cpp
@@ -34,8 +34,8 @@ Traverser::~Traverser()
BTreeNode * Traverser::start()
{
/* To find the start we will iterate, or possibly recurse
- down the tree, each time turning down the node that has children,
- if they both have no children we have reached the end and it shouldn't
+ down the tree, each time turning down the node that has tqchildren,
+ if they both have no tqchildren we have reached the end and it shouldn't
really matter which we pick (check this algorithm) */
BTreeNode *n = m_root;
@@ -54,7 +54,7 @@ BTreeNode * Traverser::start()
else n = n->left();
}
}
- //if(n->parent()) m_current = n->parent();
+ //if(n->tqparent()) m_current = n->tqparent();
//else m_current = n;
m_current = n;
return m_current;
@@ -62,22 +62,22 @@ BTreeNode * Traverser::start()
BTreeNode * Traverser::next()
{
- // a.t.m we will just take the next thing to be the parent.
- if( m_current != m_root ) m_current = m_current->parent();
+ // a.t.m we will just take the next thing to be the tqparent.
+ if( m_current != m_root ) m_current = m_current->tqparent();
return m_current;
}
bool Traverser::onLeftBranch()
{
- return current()->parent()->left() == current();
+ return current()->tqparent()->left() == current();
}
BTreeNode * Traverser::oppositeNode()
{
if ( onLeftBranch() )
- return current()->parent()->right();
+ return current()->tqparent()->right();
else
- return current()->parent()->left();
+ return current()->tqparent()->left();
}
void Traverser::descendLeftwardToTerminal()
@@ -95,6 +95,6 @@ void Traverser::descendLeftwardToTerminal()
void Traverser::moveToParent()
{
- if(current()->parent()) m_current = current()->parent();
+ if(current()->tqparent()) m_current = current()->tqparent();
}