예제 #1
0
        //[Pure]
        public override IEnumerable <int> NonInhibitorsIntoTransition(int transitionId)
        {
            Contract.Requires(Transitions.ContainsKey(transitionId));

            for (int i = 0; i < InMatrix.GetColumn(transitionId).Count; i++)
            {
                if (InMatrix[i, transitionId] != 0.0 && !ArcIsInhibitor(i, transitionId))
                {
                    yield return(i);
                }
            }
        }
예제 #2
0
        public override bool IsEmptyTransition(int transitionId)
        {
            Contract.Requires(Transitions.ContainsKey(transitionId));

            return(InMatrix.GetColumn(transitionId).Sum() == 0);
        }