Browse Source

Add isDeterministic() method to TransitionList.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@2186 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
7607a567da
  1. 8
      prism/src/simulator/TransitionList.java

8
prism/src/simulator/TransitionList.java

@ -241,6 +241,14 @@ public class TransitionList
return numChoices == 0; return numChoices == 0;
} }
/**
* Are the choices deterministic? (i.e. a single probability 1.0 transition)
*/
public boolean isDeterministic()
{
return numTransitions == 1 && getChoice(0).getProbability(0) == 1.0;
}
/** /**
* Is there a deterministic self-loop, i.e. do all transitions go to the current state. * Is there a deterministic self-loop, i.e. do all transitions go to the current state.
*/ */

Loading…
Cancel
Save