| Calling Sequence | RotateTree(tree,side,sub_side)
| |||||||||||||||
| Parameters |
| |||||||||||||||
| Return Type | Tree | |||||||||||||||
| Synopsis | Returns a new, rotated tree rooted half-way through the edge that is indicated by the side and sub-side arguments. The leaves of the tree should have annotated heights, but this is not strictly enforced, unless the rotation is happening directly next to a leaf. | |||||||||||||||
| Examples | > t := Tree(Tree(Leaf(A,15),5,Leaf(B,15)),0,Tree(Leaf(C,15),11,Leaf(D,15))); t := Tree(Tree(Leaf(A,15),5,Leaf(B,15)),0,Tree(Leaf(C,15),11,Leaf(D,15))) > newt := RotateTree(t,Left,Left); newt := Tree(Leaf(A,5),0,Tree(Leaf(B,15),5,Tree(Leaf(C,25),21,Leaf(D,25)),100)) | |||||||||||||||
| See also | AllRootedTrees, AllTernaryRoots, Tree | |||||||||||||||