diff Implab/Automaton/CDFADefinition.cs @ 162:0526412bbb26 ref20160224

DFA refactoring
author cin
date Wed, 24 Feb 2016 08:39:53 +0300
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab/Automaton/CDFADefinition.cs	Wed Feb 24 08:39:53 2016 +0300
@@ -0,0 +1,22 @@
+namespace Implab.Automaton {
+    public class CDFADefinition : DFADefinition {
+        readonly CharAlphabet m_alphabet;
+
+        public CharAlphabet Alphabet {
+            get { return m_alphabet; }
+        }
+
+        public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) {
+            m_alphabet = alphabet;
+        }
+
+        public CDFADefinition Optimize() {
+            
+            return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet());
+        }
+
+        public void PrintDFA() {
+            PrintDFA(m_alphabet);
+        }
+    }
+}