GuideTree implements Iterable<GuideTreeNode<S, C>> { public int[][] getScoreMatrix() { int[][] matrix = new int[sequences.size()][sequences.size()]; for (int i = 0, n = 0; i < matrix.length; i++) { matrix[i][i] = scorers.get(i).getMaxScore(); for (int j = i+1; j < matrix.length; j++) { matrix[i][j] = matrix[j][i] = scorers.get(n++).getScore(); } } 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 testGetScoreMatrix() { assertArrayEquals(tree.getScoreMatrix(), new int[][] { {4, 4, 0, 3}, {4, 6, 0, 3}, {0, 0, 5, 0}, {3, 3, 0, 6}}); }