Package groupthink :: Module aatree :: Class TreeHideList :: Class MultiSumWalker
[hide private]
[frames] | no frames]

Class MultiSumWalker

source code

Walker --+
         |
        TreeHideList.MultiSumWalker

Instance Methods [hide private]
 
prepare_descend(self, target, index)
An optional method to prepare for descent
source code
int
descend(self, node)
Returns: descend must return 0 if the node in question is the one desired, -1 if the left child would be better, or 1 if the right child would be better.
source code
 
prepare_ascend(self, index)
An optional method to prepare for ascent
source code
bool
ascend(self, node)
Returns: ascend should return True iff it should run again on the parent of node.
source code
Class Variables [hide private]
  index = 0
  target = 0
  offset = 0
Method Details [hide private]

prepare_descend(self, target, index)

source code 

An optional method to prepare for descent

Overrides: Walker.prepare_descend
(inherited documentation)

descend(self, node)

source code 
Parameters:
  • node - A node from which to descend.
Returns: int
descend must return 0 if the node in question is the one desired, -1 if the left child would be better, or 1 if the right child would be better.
Overrides: Walker.descend
(inherited documentation)

prepare_ascend(self, index)

source code 

An optional method to prepare for ascent

Overrides: Walker.prepare_ascend
(inherited documentation)

ascend(self, node)

source code 
Parameters:
  • node - A node from which to ascend
Returns: bool
ascend should return True iff it should run again on the parent of node. It should set the walker's internal state such that a subsequent descent would retrace these steps.
Overrides: Walker.ascend
(inherited documentation)