GuideTree implements Iterable<GuideTreeNode<S, C>> { public double[][] getDistanceMatrix() { double[][] matrix = new double[distances.getSize()][distances.getSize()]; for (int i = 0; i < matrix.length; i++) { for (int j = i+1; j < matrix.length; j++) { matrix[i][j] = matrix[j][i] = distances.getValue(i, j); } } return matrix; } 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 testGetDistanceMatrix() { assertArrayEquals(tree.getDistanceMatrix(), new double[][] { {0.0, 0.0, 1.0, 0.4}, {0.0, 0.0, 1.0, 0.4}, {1.0, 1.0, 0.0, 1.0}, {0.4, 0.4, 1.0, 0.0}}); }