diff options
Diffstat (limited to 'src/main/java/bjc/funcdata/bst/TreeLinearizationMethod.java')
| -rw-r--r-- | src/main/java/bjc/funcdata/bst/TreeLinearizationMethod.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/bjc/funcdata/bst/TreeLinearizationMethod.java b/src/main/java/bjc/funcdata/bst/TreeLinearizationMethod.java new file mode 100644 index 0000000..35b116b --- /dev/null +++ b/src/main/java/bjc/funcdata/bst/TreeLinearizationMethod.java @@ -0,0 +1,24 @@ +package bjc.funcdata.bst; + +/** + * Represents the ways to linearize a tree for traversal. + * + * @author ben + */ +public enum TreeLinearizationMethod { + /** + * Visit the left side of this tree part, the tree part itself, and then + * the right part. + */ + INORDER, + /** + * Visit the left side of this tree part, the right side, and then the + * tree part itself. + */ + POSTORDER, + /** + * Visit the tree part itself, then the left side of tthis tree part and + * then the right part. + */ + PREORDER +} |
