DirectedSparseGraph g = (DirectedSparseGraph)graphToMerge.copy();
DeterministicVertex newBlue = DeterministicDirectedSparseGraph.findVertexNamed(pair.getQ(),g);
DeterministicVertex newRed = DeterministicDirectedSparseGraph.findVertexNamed(pair.getR(),g);
Map<CmpVertex,List<CmpVertex>> mergedVertices = conf.getTransitionMatrixImplType() == STATETREE.STATETREE_ARRAY?
new ArrayMapWithSearch<CmpVertex,List<CmpVertex>>(g.numVertices()):
new HashMapWithSearch<CmpVertex,List<CmpVertex>>(g.numVertices());
// Special configuration is necessary to ensure that computePairCompatibilityScore_internal
// builds mergedVertices using g's vertices rather than StringVertices or clones of g's vertices.
Configuration VertexCloneConf = conf.copy();VertexCloneConf.setLearnerUseStrings(false);VertexCloneConf.setLearnerCloneGraph(false);
LearnerGraph s=new LearnerGraph(g,VertexCloneConf);