Mercurial > pub > ImplabNet
comparison Implab/Automaton/CDFADefinition.cs @ 162:0526412bbb26 ref20160224
DFA refactoring
author | cin |
---|---|
date | Wed, 24 Feb 2016 08:39:53 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
161:2a8466f0cb8a | 162:0526412bbb26 |
---|---|
1 namespace Implab.Automaton { | |
2 public class CDFADefinition : DFADefinition { | |
3 readonly CharAlphabet m_alphabet; | |
4 | |
5 public CharAlphabet Alphabet { | |
6 get { return m_alphabet; } | |
7 } | |
8 | |
9 public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) { | |
10 m_alphabet = alphabet; | |
11 } | |
12 | |
13 public CDFADefinition Optimize() { | |
14 | |
15 return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet()); | |
16 } | |
17 | |
18 public void PrintDFA() { | |
19 PrintDFA(m_alphabet); | |
20 } | |
21 } | |
22 } |