Beispiel #1
0
        protected static EdgeInfo CreateSingleEdgeInfo <TKey, TPayload, TRegister, TAccumulator>(AfaStreamable <TKey, TPayload, TRegister, TAccumulator> stream, int targetNodeNumber, SingleElementArc <TPayload, TRegister> searc)
        {
            var edgeInfo = new EdgeInfo()
            {
                Type = EdgeInfo.EdgeType.Single,
                EpsilonReachableNodes = EpsilonClosure(stream.afa, targetNodeNumber),
                SourceNode            = targetNodeNumber,
                Fence = (ts, ev, reg) => searc.Fence.Inline(ts, ev, reg),
            };

            edgeInfo.Transfer = searc.Transfer == null
                ? (Func <string, string, string, string>)null
                : ((ts, ev, reg) => searc.Transfer.Inline(ts, ev, reg));
            return(edgeInfo);
        }
Beispiel #2
0
        protected static EdgeInfo CreateSingleEdgeInfo <TKey, TPayload, TRegister, TAccumulator>(AfaStreamable <TKey, TPayload, TRegister, TAccumulator> stream, int targetNodeNumber, SingleElementArc <TPayload, TRegister> searc, string indexVariableName)
        {
            var edgeInfo = new EdgeInfo()
            {
                Type = EdgeInfo.EdgeType.Single,
                EpsilonReachableNodes = EpsilonClosure(stream.afa, targetNodeNumber),
                SourceNode            = targetNodeNumber,
                Fence = (ts, ev, reg) => searc.Fence.Inline(ts, ev, reg),
            };

            if (searc.Transfer == null)
            {
                edgeInfo.Transfer = null;
            }
            else
            {
                edgeInfo.Transfer = (ts, ev, reg) => searc.Transfer.Inline(ts, ev, reg);
            }
            return(edgeInfo);
        }