Beispiel #1
0
        private void GetNewTableMinus(int countState, HashSet <char> alphabet)
        {
            var table = TableCommand;

            TableCommand = new TableCommand(countState, alphabet);
            for (int i = 1; i < TableCommand.Commands.GetLength(0); i++)
            {
                for (int j = 1; j < TableCommand.Commands.GetLength(1); j++)
                {
                    TableCommand.Commands[i, j] = table.Commands[i, j];
                }
            }
        }
Beispiel #2
0
        internal Turing(int countState, HashSet <char> alphabet)
        {
            if (countState < 1)
            {
                countState = 1;
            }
            if (alphabet is null)
            {
                alphabet = new HashSet <char>();
            }
            CountState = countState + 1;

            var alf = alphabet.ToList();

            alf.Remove(' ');
            alf.Add(' ');
            alf.Remove('\0');
            alf.Insert(0, '\0');

            Alphabet = alf.ToHashSet();

            TableCommand = new TableCommand(CountState, Alphabet);
        }
Beispiel #3
0
 public Turing(SettingsTuringDefault settings, TableCommand table) : this(settings)
 {
     TableCommand = table ?? throw new ArgumentNullException(nameof(table));
 }