GuideTree implements Iterable<GuideTreeNode<S, C>> { public GuideTree(List<S> sequences, List<PairwiseSequenceScorer<S, C>> scorers) { this.sequences = Collections.unmodifiableList(sequences); this.scorers = Collections.unmodifiableList(scorers); distances = new BasicSymmetricalDistanceMatrix(sequences.size()); BasicSymmetricalDistanceMatrix distclone = new BasicSymmetricalDistanceMatrix(sequences.size()); for (int i = 0, n = 0; i < sequences.size(); i++) { AccessionID id = sequences.get(i).getAccession(); String str = (id == null) ? Integer.toString(i + 1) : id.getID(); distances.setIdentifier(i, str); distclone.setIdentifier(i, str); for (int j = i+1; j < sequences.size(); j++) { double dist = scorers.get(n++).getDistance(); distances.setValue(i, j, dist); distclone.setValue(i, j, dist); } } Phylogeny phylogeny = NeighborJoining.createInstance().execute(distclone); newick = phylogeny.toString(); root = new Node(phylogeny.getRoot(), null); } GuideTree(List<S> sequences, List<PairwiseSequenceScorer<S, C>> scorers); int[] getAllPairsScores(); double[][] getDistanceMatrix(); Node getRoot(); int[][] getScoreMatrix(); List<S> getSequences(); @Override Iterator<GuideTreeNode<S, C>> iterator(); @Override String toString();  }
@Test public void testGuideTree() { assertNotNull(tree); }