}
// in this part the tree is extended depending on what we learnt from traces.
for(Entry<CmpVertex, Map<Label, UpdatablePairDouble>> outgoing:state_outgoing.entrySet())
{
CmpVertex currrent_state_to_explore_outgoing= outgoing.getKey();
Map<Label, UpdatablePairDouble> list_of_outgoing = outgoing.getValue();
for(Entry<Label, UpdatablePairDouble> out:list_of_outgoing.entrySet())
{
Map<Label, CmpVertex> already_outgoing = graph.transitionMatrix.get(currrent_state_to_explore_outgoing);
assert already_outgoing!=null : "state "+currrent_state_to_explore_outgoing+" is not mentioned in the transition diagram";
if(!already_outgoing.containsKey(out.getKey()))
{
if(out.getValue().firstElem > highThreshold && out.getValue().secondElem <= lowThreshold && currrent_state_to_explore_outgoing.isAccept()==true)
{
if(!outcome.transitionMatrix.get(currrent_state_to_explore_outgoing).keySet().contains(out.getKey()))
{
extendWithLabel(outcome,currrent_state_to_explore_outgoing, true, out.getKey());
}
}
if(out.getValue().secondElem > highThreshold && out.getValue().firstElem <= lowThreshold && currrent_state_to_explore_outgoing.isAccept()==true)
{
if(!outcome.transitionMatrix.get(currrent_state_to_explore_outgoing).keySet().contains(out.getKey()))
{
extendWithLabel(outcome,currrent_state_to_explore_outgoing, false, out.getKey());
}