Mercurial > pub > ImplabNet
diff Implab/Automaton/MapAlphabet.cs @ 164:ec35731ae299 ref20160224
Almost complete DFA refactoring
author | cin |
---|---|
date | Thu, 25 Feb 2016 02:11:13 +0300 |
parents | 419aa51b04fd |
children | 0f70905b4652 |
line wrap: on
line diff
--- a/Implab/Automaton/MapAlphabet.cs Wed Feb 24 20:12:52 2016 +0300 +++ b/Implab/Automaton/MapAlphabet.cs Thu Feb 25 02:11:13 2016 +0300 @@ -5,11 +5,14 @@ namespace Implab.Automaton { public class MapAlphabet<T> : IAlphabetBuilder<T> { readonly Dictionary<T,int> m_map; - int m_nextCls; + int m_nextCls = 1; + + public MapAlphabet() { + m_map = new Dictionary<T, int>(); + } public MapAlphabet(IEqualityComparer<T> comparer) { m_map = new Dictionary<T, int>(comparer); - m_nextCls = 1; } #region IAlphabetBuilder implementation @@ -71,6 +74,9 @@ var map = new int[rmap.Length]; foreach (var cls in classes) { + if (cls.Contains(DFAConst.UNCLASSIFIED_INPUT)) + continue; + var symbols = new List<T>(); foreach (var id in cls) { if (id < 0 || id >= rmap.Length)