IllegalArgumentException exORIG = null;
{// testing the orig part
LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
try
{
s.paths.ORIGcomputePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
Map<String,String> actual = engine.getDebugDataMapDepth(paths);
Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
}
catch(IllegalArgumentException ex)
{ exORIG = ex; }
}
IllegalArgumentException exNew = null;
{// testing the new part
LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
PTASequenceEngine.SequenceSet paths = engine.new SequenceSet();
if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
try
{
s.pathroutines.computePathsSBetween(s.findVertex(FirstState), s.findVertex(SecondState),initSet,paths);
Map<String,String> actual = engine.getDebugDataMapDepth(paths);
Assert.assertTrue("expected: "+expected+", actual: "+actual, expected.equals(actual));
}
catch(IllegalArgumentException ex)
{ exNew = ex; }
}
IllegalArgumentException exCaching = null;
{// testing the latest part with caching.
LearnerGraph s = buildLearnerGraph(machine, testName, testConfig,getLabelConverter());
PTASequenceEngine engine = new PTASequenceEngine();engine.init(new PTASequenceSetAutomaton());
PTASequenceEngine.SequenceSet initSet = engine.new SequenceSet();initSet.setIdentity();
if (initSeq != null) initSet=initSet.cross(TestFSMAlgo.buildSet(initSeq, testConfig,getLabelConverter()));
try
{
Map<CmpVertex,PTASequenceEngine.SequenceSet> map = s.pathroutines.computePathsSBetween_All(s.findVertex(FirstState), engine,initSet);