/** * Returns the list of leaves contained in all trees * * @param trees the trees * @return sharedLeaves the leaves common to all trees */ public static List<String> commonLeaves(Collection<Tree> trees) { return commonLeaves(trees.toArray(new Tree[trees.size()])); }
for (int i = 0; i < trees.size() - 1; i++) { for (int j = i + 1; j < trees.size(); j++) { List<String> commonTaxa = TreeUtils.commonLeaves(Arrays.asList(trees.get(i), trees.get(j))); if (commonTaxa.size() > 1) { double[] distances = new double[commonTaxa.size() - 1];