diff Implab/Formats/ByteAlphabet.cs @ 192:f1da3afc3521 release v2.1

Слияние с v2
author cin
date Fri, 22 Apr 2016 13:10:34 +0300
parents a0ff6a0e9c44
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab/Formats/ByteAlphabet.cs	Fri Apr 22 13:10:34 2016 +0300
@@ -0,0 +1,23 @@
+using System.Collections.Generic;
+using System.Linq;
+using Implab.Automaton;
+
+namespace Implab.Formats {
+    public class ByteAlphabet : IndexedAlphabetBase<byte> {
+
+        #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
+    }
+}
+