private void computeNodeToRestrictionMap() { Arrays.fill(partialsMap, null); for (Set<String> taxonNames : partialsRestrictions.keySet()) { NodeRef node = Tree.Utils.getCommonAncestorNode(treeModel, taxonNames); partialsMap[node.getNumber()] = partialsRestrictions.get(taxonNames); } }
/** @return the ancestral state of the MRCA node. */ public String getAncestralState() { NodeRef node = Tree.Utils.getCommonAncestorNode(tree, leafSet); if (node == null) throw new RuntimeException("No node found that is MRCA of " + leafSet); return ancestralTrait.getTraitString(tree, node); }