コード例 #1
0
 @Override
 public void replaceSlidableChildren(NodeRef node, NodeRef lft, NodeRef rgt) {
   int nn = node.getNumber();
   int lftn = lft.getNumber();
   int rgtn = rgt.getNumber();
   assert pionodes[nn].lft >= 0;
   pionodes[nn].lft = lftn;
   pionodes[nn].rgt = rgtn;
   pionodes[lftn].anc = pionodes[nn].nodeNumber;
   pionodes[rgtn].anc = pionodes[nn].nodeNumber;
 }
コード例 #2
0
 @Override
 public NodeRef getSlidableChild(NodeRef node, int j) {
   int n = node.getNumber();
   return j == 0 ? pionodes[pionodes[n].lft] : pionodes[pionodes[n].rgt];
 }
コード例 #3
0
 @Override
 public boolean isExternalSlidable(NodeRef node) {
   return (pionodes[node.getNumber()].lft < 0);
 }
コード例 #4
0
 @Override
 public void setSlidableNodeHeight(NodeRef node, double height) {
   assert node == pionodes[node.getNumber()];
   ((PopsIONode) node).height = height;
 }
コード例 #5
0
 @Override
 public double getSlidableNodeHeight(NodeRef node) {
   assert node == pionodes[node.getNumber()];
   return ((PopsIONode) node).getHeight();
 }
コード例 #6
0
 @Override
 public Taxon getSlidableNodeTaxon(NodeRef node) {
   assert node == pionodes[node.getNumber()];
   return ((PopsIONode) node).getTaxon();
 }
コード例 #7
0
 @Override
 public void replaceSlidableRoot(NodeRef newroot) {
   rootn = newroot.getNumber();
   pionodes[rootn].anc = -1;
 }