}
for(Entry<Label,CmpVertex> state:states.entrySet())
{
for(Label label:ptaClassifier.graph.getCache().getAlphabet())
{
MarkovOutcome transition = ptaClassifier.model.predictionsMatrix.get(new Trace(Arrays.asList(new Label[]{state.getKey(),label}),true));
if (transition != null)
if (transition == MarkovOutcome.positive) outcome.transitionMatrix.get(state.getValue()).put(label,states.get(label));
}
}
List<List<Label>> uniqueSequences = new LinkedList<List<Label>>();
for(Label l1:ptaClassifier.graph.getCache().getAlphabet())
{
boolean nonUnique = false;
Label unique = null;
for(Label lbl:ptaClassifier.graph.getCache().getAlphabet())
{
if (ptaClassifier.model.predictionsMatrix.containsKey(new Trace(Arrays.asList(new Label[]{l1,lbl}),true)))
{
if (unique == null)
unique = lbl;
else
{
nonUnique = true;break;
}
}
}
if (unique != null && !nonUnique)
uniqueSequences.add(Arrays.asList(new Label[]{l1,unique}));
}
List<List<Label>> sequencesUnique2=new LinkedList<List<Label>>();
for(List<Label> prefix:uniqueSequences)
{
boolean nonUnique = false;
List<Label> unique = null;
for(Label lbl:ptaClassifier.graph.getCache().getAlphabet())
{
List<Label> seq = new LinkedList<Label>(prefix);seq.add(lbl);
if (ptaClassifier.model.predictionsMatrix.containsKey(new Trace(seq,true)))
{
if (unique == null)
unique = seq;
else
{