Created
November 7, 2019 18:07
-
-
Save Jingbang-liu-lix/2bbcb6a5dde6d723676e7fbc11641709 to your computer and use it in GitHub Desktop.
Tree Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EvalTree<T> implements AbstractEvalTree<T> { | |
/** | |
* All nodes in the evaluation tree. Root node is the first element of the array with 0th index. | |
*\ | |
*/ | |
AbstractEvalNode[] _nodes; | |
/** | |
* Length of list of children of a node in {@link #_nodes}. | |
* <code>_childCounts[i]</code> corresponds to number of children of <code>_nodes[i]</code> | |
*/ | |
byte[] _childCounts; | |
/** | |
* Position of the first child of a given node of evaluation tree in {@link #_nodes} or -1 if a node does not have children. | |
* <code>_childListStartPositions[i]</code> corresponds to starting position of a list of children of <code>_nodes[i]</code> | |
*/ | |
short[] _childListStartPositions; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment