public TapeArray(TapeArray tapeArray) { tape = new int[tapeArray.tape.Length]; indexBase = tapeArray.indexBase; tapeArray.tape.CopyTo(tape, 0); }
public TMInstance(TMInstance other) { owner = other.owner; Level = other.Level + 1; tape = new TapeArray(other.tape); cellIndex = other.cellIndex; state = other.state; }
public TMInstance(OneTapeTuringMachine owner, int[] input) { this.owner = owner; Level = 0; tape = new TapeArray(); cellIndex = 1; state = owner.qStart; for (long i = 1; i <= input.Length; i++) { int currentInputSymbol = input[i - 1]; Ensure.That(owner.Sigma.Contains(currentInputSymbol)).IsTrue(); tape[i] = currentInputSymbol; } }