works
This commit is contained in:
Binary file not shown.
@@ -64,20 +64,19 @@ public class MorseTree {
|
|||||||
|
|
||||||
public void printHirarchical(BinaryTree<DecisionNode> pRoot, int xOff) {
|
public void printHirarchical(BinaryTree<DecisionNode> pRoot, int xOff) {
|
||||||
if (pRoot.getContent() == null) {
|
if (pRoot.getContent() == null) {
|
||||||
xOff--;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
printOffset(xOff);
|
||||||
|
System.out.println(pRoot.getContent());
|
||||||
if (pRoot.getLeftTree() != null) {
|
if (pRoot.getLeftTree() != null) {
|
||||||
printOffset(xOff);
|
|
||||||
System.out.println(pRoot.getContent());
|
|
||||||
xOff++;
|
xOff++;
|
||||||
printHirarchical(pRoot.getLeftTree(), xOff);
|
printHirarchical(pRoot.getLeftTree(), xOff);
|
||||||
|
xOff--;
|
||||||
}
|
}
|
||||||
if (pRoot.getRightTree() != null) {
|
if (pRoot.getRightTree() != null) {
|
||||||
printOffset(xOff);
|
|
||||||
System.out.println(pRoot.getContent());
|
|
||||||
xOff++;
|
xOff++;
|
||||||
printHirarchical(pRoot.getRightTree(), xOff);
|
printHirarchical(pRoot.getRightTree(), xOff);
|
||||||
|
xOff--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,17 +5,17 @@ dependency1.type=UsesDependency
|
|||||||
dependency2.from=DecisionNode
|
dependency2.from=DecisionNode
|
||||||
dependency2.to=Dataset
|
dependency2.to=Dataset
|
||||||
dependency2.type=UsesDependency
|
dependency2.type=UsesDependency
|
||||||
dependency3.from=MorseTree
|
dependency3.from=Decision
|
||||||
dependency3.to=BinaryTree
|
dependency3.to=Dataset
|
||||||
dependency3.type=UsesDependency
|
dependency3.type=UsesDependency
|
||||||
dependency4.from=MorseTree
|
dependency4.from=MorseTree
|
||||||
dependency4.to=DecisionNode
|
dependency4.to=BinaryTree
|
||||||
dependency4.type=UsesDependency
|
dependency4.type=UsesDependency
|
||||||
dependency5.from=MorseTree
|
dependency5.from=MorseTree
|
||||||
dependency5.to=Decision
|
dependency5.to=DecisionNode
|
||||||
dependency5.type=UsesDependency
|
dependency5.type=UsesDependency
|
||||||
dependency6.from=Decision
|
dependency6.from=MorseTree
|
||||||
dependency6.to=Dataset
|
dependency6.to=Decision
|
||||||
dependency6.type=UsesDependency
|
dependency6.type=UsesDependency
|
||||||
editor.fx.0.height=1026
|
editor.fx.0.height=1026
|
||||||
editor.fx.0.width=1696
|
editor.fx.0.width=1696
|
||||||
|
|||||||
Reference in New Issue
Block a user