diff Implab/Formats/ByteAlphabet.cs @ 164:ec35731ae299 ref20160224

Almost complete DFA refactoring
author cin
date Thu, 25 Feb 2016 02:11:13 +0300
parents
children e227e78d72e4
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab/Formats/ByteAlphabet.cs	Thu Feb 25 02:11:13 2016 +0300
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Implab.Automaton {
+    public class ByteAlphabet : IndexedAlphabetBase<byte> {
+        public ByteAlphabet() : base(byte.MaxValue + 1){
+        }
+
+        #region implemented abstract members of IndexedAlphabetBase
+
+        public override int GetSymbolIndex(byte symbol) {
+            return (int)symbol;
+        }
+
+        public IEnumerable<byte> InputSymbols {
+            get {
+                return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>();
+            }
+        }
+
+        #endregion
+    }
+}
+