Exemplo n.º 1
0
 @Override
 public void compare(IntGraph otherGraph, GraphDifference.Callback callback) {
   GraphDiscretePartitionRefiner refiner = new GraphDiscretePartitionRefiner();
   refiner.getAutomorphismGroup(otherGraph);
   BigInteger cert = refiner.calculateCertificate(refiner.getBest());
   if (graphs.containsKey(cert)) {
     IntGraph graph = graphs.get(cert);
     //            System.out.println(cert + " " + graph + " = " + otherGraph);
     callback.same(graph, otherGraph);
   } else {
     callback.different(null, otherGraph); // TODO!
   }
 }
Exemplo n.º 2
0
 @Override
 public void add(IntGraph graph) {
   GraphDiscretePartitionRefiner refiner = new GraphDiscretePartitionRefiner();
   refiner.getAutomorphismGroup(graph);
   graphs.put(refiner.getCertificate(), graph);
 }