Пример #1
0
        public override void Init()
        {
            G          = new TypedDAG <TASGNodeInfo, StdEdgeInfo>("TASG");
            TapeLBound = 1;
            TapeRBound = 1;

            DAGNode s = new(nodeId++);

            G.AddNode(s);
            G.SetSourceNode(s);

            ComputationStep compStep = new()
            {
                q         = MEAPSharedContext.MNP.qStart,
                s         = MEAPSharedContext.Input[0],
                qNext     = MEAPSharedContext.MNP.qStart,
                sNext     = MEAPSharedContext.Input[0],
                m         = TMDirection.S,
                Shift     = 1,
                kappaTape = 1,
                kappaStep = 0
            };

            nodeEnumeration[s.Id]    = s;
            compStepToNode[compStep] = s.Id;

            idToInfoMap[s.Id] = new TASGNodeInfo
            {
                CompStep = compStep
            };

            endNodeIds.Add(0);
        }
Пример #2
0
        public override void Init()
        {
            G          = new TypedDAG <TASGNodeInfo, StdEdgeInfo>("TASG");
            TapeLBound = 0;
            TapeRBound = 0;

            DAGNode s = new(nodeId++);

            G.AddNode(s);
            G.SetSourceNode(s);

            MEAPSharedContext.NodeLevelInfo.AddNodeAtLevel(s.Id, 0);
            processedMu = 0;

            sCompStep = new ComputationStep
            {
                q         = MEAPSharedContext.MNP.qStart,
                s         = MEAPSharedContext.Input[0],
                qNext     = MEAPSharedContext.MNP.qStart,
                sNext     = MEAPSharedContext.Input[0],
                m         = TMDirection.R,
                Shift     = 1,
                kappaTape = 0,
                kappaStep = 0,
                sTheSame  = OneTapeTuringMachine.blankSymbol
            };

            nodeEnumeration[s.Id] = s;

            idToInfoMap[s.Id] = new TASGNodeInfo
            {
                CompStep = sCompStep
            };

            propSymbolsKeeper = new PropSymbolsKeeperFactCPLTM(MEAPSharedContext);
            propSymbolsKeeper.Init(s.Id);

            CPLTMInfo = MEAPSharedContext.CPLTMInfo;

            endNodeIds.Add(G.GetSourceNodeId());
        }