/** Tests that conversion between numerical state pairs and back works. */
@Test
public final void testNumberToState_and_Back()
{
LearnerGraph gr=new LearnerGraph(buildGraph("A-a->Q\nA-b->C\nA-d->C\nD-a->C\nD-b->C\nD-d->C-a->C\nD-c->A-c-#R\nC-f-#T\nC-e->G-a-#K\nG-b->S-a-#U","TestFindIncompatibleStatesB"),Configuration.getDefaultConfiguration());
StatesToConsider filter = LearnerGraphND.ignoreRejectStates;
GDLearnerGraph ndGraph = new GDLearnerGraph(gr,filter, false);
for(CmpVertex A:gr.transitionMatrix.keySet())
if (filter.stateToConsider(A))
for(CmpVertex B:gr.transitionMatrix.keySet())
if (filter.stateToConsider(B))
{
PairScore received1 = ndGraph.getPairScore(ndGraph.vertexToIntNR(A,B), 1, 2);
Assert.assertTrue(
received1.equals(new PairScore(A,B,1,2)) ||
received1.equals(new PairScore(B,A,1,2))