Open recursion-ninja opened 4 years ago
A quick note: currently we use an IntMap e
data structure for child nodes which makes consistently tracking left and right nodes extremely difficult to impossible and a direct rewrite of this code will probably require herculean effort to get closer to correct for what the algorithm needs (this code is already inherently extremely fiddly). The new graph type uses a pair type and should make it easier to add this sort of information but this is not at all in place at present on that branch.
We currently generate invalid implied alignment. The pre-order traversal of implied alignment algorithm relies on knowing if the current node is the left or right child of it's parent. This information is context sensitive, potentially different for each dynamic character, given that it will depend on the character's traversal foci selected during the rerooting procedure. Currently, the information of the whether the current node is left or right child is passed into the implied alignment algorithm from the pre-order traversal infrastructure code. This supporting infrastructure code supplies erroneous left or right child values that do not correctly reflect whether the child is the left or right child of the parent node as determined by the re-rooting context. This garbage input to the implied alignment algorithm causes garbage alignments as output.
This issue is critical and should be fixed as soon as possible.