java.lang.Object
org.maxicp.util.algo.Tree
Tree structure for visualizing search trees (e.g., backtracking algorithms).
Implements this tree layout algorithm:
https://www.microsoft.com/en-us/research/wp-content/uploads/1996/01/drawingtrees.pdf
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTree node containing logical data (not layout).static enumstatic final recordImmutable pairstatic classLayout node: wraps a Node with its calculated horizontal position. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateNode(int id, int parentId, Tree.NodeType type) voidcreateNode(int id, int parentId, Tree.NodeType type, String nodeLabel, String edgeLabel) static voidroot()
-
Constructor Details
-
Tree
public Tree(int rootId)
-
-
Method Details
-
createNode
-
createNode
public void createNode(int id, int parentId, Tree.NodeType type, String nodeLabel, String edgeLabel) -
root
-
main
-