public void AddOutArc(string transitionName, string placeName, int weight = 1) { if (OutArcs == null) { OutArcs = new Dictionary <int, List <OutArc> >(); } int fromIndex = TransitionIndex(transitionName); int toIndex = PlaceIndex(placeName); if (!OutArcs.ContainsKey(fromIndex)) { OutArcs[fromIndex] = new List <OutArc>(); } OutArcs[fromIndex].Add(new OutArc(toIndex, weight)); }
public void IncomingFrequency() { TNext += InArcs.FirstOrDefault().PrevPosition.MarkersCount / OutArcs.FirstOrDefault().Multiplicity; }