Extension_Graph= new LearnerGraph(shallowCopy);
LearnerGraph.copyGraphs(tentativeAutomaton, Extension_Graph);
Set<Label> allElementsOfAlphabet = tentativeAutomaton.learnerCache.getAlphabet();
List<Label> pathToNewState=new LinkedList<Label>();
// mapping map to store all paths leave each state in different length
@SuppressWarnings("rawtypes")
AbstractLearnerGraph Inverse_Graph = computeInverseGraph(tentativeAutomaton, predictForward);
Map<Trace, UpdatablePairInteger> occurrenceMatrix=getOccurrence(predictForward);
for(Object vertObj:Inverse_Graph.transitionMatrix.keySet())
{
CmpVertex vert = (CmpVertex)vertObj;
if(vert.isAccept() )
{
Map<Label,UpdatablePairDouble> outgoing_labels_probabilities=new HashMap<Label,UpdatablePairDouble>();
Map<Label,UpdatablePairInteger> outgoing_labels_occurrences=new HashMap<Label,UpdatablePairInteger>();
LinkedList<FrontLineElem> ListofFrontElem=new LinkedList<FrontLineElem>();
LinkedList<FrontLineElem> frontline = new LinkedList<FrontLineElem>();
FrontLineElem e=new FrontLineElem(new LinkedList<Label>(),vert);
frontline.add(e);
UpdatablePairInteger sum=new UpdatablePairInteger(0,0);
while(!frontline.isEmpty())
{
e=frontline.pop();
@SuppressWarnings("rawtypes")
Map transitions = (Map)Inverse_Graph.transitionMatrix.get(e.currentState);
for(Object lblObj:transitions.keySet())
{
Label lbl = (Label)lblObj;
for(Object targetObj:Inverse_Graph.getTargets(transitions.get(lbl)))
{
CmpVertex target = (CmpVertex)targetObj;
pathToNewState=new ArrayList<Label>();
pathToNewState.addAll(e.pathToFrontLine);
pathToNewState.add(lbl);