use of dr.evomodel.bigfasttree.constrainedtree.CladeRef in project beast-mcmc by beast-dev.
the class CladeAwareSubtreeLeapTest method testTreeRemoveRoot.
public void testTreeRemoveRoot() {
NodeRef node = tree.getNode(3);
NodeRef parent = tree.getParent(node);
NodeRef grandparent = tree.getParent(parent);
NodeRef sibling = tree.getNode(7);
NodeRef j = tree.getNode(6);
CladeRef clade = cladeNodeModel.getClade(node);
operator.doOperation(node, parent, sibling, j, clade, 1.5);
assertEquals(7, cladeNodeModel.getRootNode(clade).getNumber());
assertTrue(noNodeLeftBehind(tree));
}
use of dr.evomodel.bigfasttree.constrainedtree.CladeRef in project beast-mcmc by beast-dev.
the class CladeAwareSubtreeLeapTest method testSuperSeedTreeRoot.
public void testSuperSeedTreeRoot() {
NodeRef node = tree.getNode(5);
NodeRef parent = tree.getParent(node);
NodeRef grandparent = tree.getParent(parent);
NodeRef sibling = tree.getNode(4);
NodeRef j = tree.getNode(10);
CladeRef clade = cladeNodeModel.getClade(parent);
operator.doOperation(node, parent, sibling, j, clade, 4.5);
assertEquals(9, cladeNodeModel.getRootNode(clade).getNumber());
assertEquals(9, tree.getRoot().getNumber());
assertTrue(noNodeLeftBehind(tree));
}
Aggregations