/** Checks that both the old and the two new algorithms report the same score for a pair of states and ask the same questions.
* @param states being merged are called "A" and "B".
*/
public final void testNewLearnerQuestions(String fsm, int expectedScore, String learnerName)
{
DirectedSparseGraph g = FsmParser.buildGraph(fsm, learnerName);
//Visualiser.updateFrame(g, null);Visualiser.waitForKey();
LearnerGraph s = new LearnerGraph(g, testConfig);
OrigStatePair pairOrig =
new OrigStatePair(
DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("B"), g),
DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, new VertexID("A"), g));
StatePair pairNew1 = new StatePair(s.findVertex(new VertexID("B")),s.findVertex(new VertexID("A")));
DirectedSparseGraph
temp = mergeAndDeterminize((Graph)g.copy(), pairOrig),
tempB = MergeStates.mergeAndDeterminize(g, pairNew1,testConfig);
// Now check that ComputeStateScores properly does mergeAndDeterminize
// (on the test data we are dealing with in these tests, there are separate tests for mergeAndDeterminize)