AbstractDiscretePartitionRefiner implements DiscretePartitionRefiner { private String getHalfMatrixString(Permutation permutation) { StringBuilder builder = new StringBuilder(permutation.size()); int size = permutation.size(); for (int indexI = 0; indexI < size - 1; indexI++) { for (int indexJ = indexI + 1; indexJ < size; indexJ++) { builder.append(getConnectivity(permutation.get(indexI), permutation.get(indexJ))); } } return builder.toString(); } AbstractDiscretePartitionRefiner(); void setup(PermutationGroup group, EquitablePartitionRefiner refiner); boolean firstIsIdentity(); Partition getAutomorphismPartition(); String getFirstHalfMatrixString(); String getHalfMatrixString(); PermutationGroup getAutomorphismGroup(); Permutation getBest(); Permutation getFirst(); boolean isCanonical(); void refine(Partition partition);  }
@Test public void getHalfMatrixStringTest() { int n = 3; Graph g = new Graph(n); g.connectionTable = new int[][]{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}}; MockRefiner refiner = new MockRefiner(g); String hms = refiner.getHalfMatrixString(); String expected = "110"; Assert.assertEquals(expected, hms); }