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

DFA refactoring
author cin
date Wed, 24 Feb 2016 08:39:53 +0300
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
1 namespace Implab.Automaton {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
2 public class CDFADefinition : DFADefinition {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
3 readonly CharAlphabet m_alphabet;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
4
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
5 public CharAlphabet Alphabet {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
6 get { return m_alphabet; }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
7 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
8
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
9 public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
10 m_alphabet = alphabet;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
11 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
12
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
13 public CDFADefinition Optimize() {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
14
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
15 return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet());
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
16 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
17
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
18 public void PrintDFA() {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
19 PrintDFA(m_alphabet);
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
20 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
21 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
22 }