// which is used by the merging algorithm and dumping the results.
CmpVertex v = pair.getR();
Iterator<Label> seqIt = seq.iterator();
while(seqIt.hasNext() && v != null)
{
Label input = seqIt.next();
System.out.print(v.toString()+" "+original.transitionMatrix.get(v).keySet()+" input "+input+" ");
List<CmpVertex> extra = mergedVertices.get(v);
if (extra != null)
for(CmpVertex ev:extra)
System.out.print(" "+ev.toString()+" : "+original.transitionMatrix.get(ev).keySet());
System.out.println();
CmpVertex newV = original.transitionMatrix.get(v).get(input);
if (newV != null) v=newV;
else v=original.pairscores.findNextRed(mergedVertices,v,input);
}
System.out.println("final state is "+v);
v=pair.getR();
seqIt = seq.iterator();
while(seqIt.hasNext() && v != null)
{
Label input = seqIt.next();
System.out.println(v.toString()+" "+mergeResult.transitionMatrix.get(v).keySet()+" input "+input+" ");
v = mergeResult.transitionMatrix.get(v).get(input);
}
System.out.println("final state is "+v);