Mercurial > pub > ImplabNet
diff Implab/Automaton/MapAlphabet.cs @ 172:92d5278d1b10 ref20160224
Working on text scanner
author | cin |
---|---|
date | Mon, 14 Mar 2016 01:19:38 +0300 |
parents | 0f70905b4652 |
children | 0c3c69fe225b |
line wrap: on
line diff
--- a/Implab/Automaton/MapAlphabet.cs Thu Mar 10 01:19:33 2016 +0300 +++ b/Implab/Automaton/MapAlphabet.cs Mon Mar 14 01:19:38 2016 +0300 @@ -38,7 +38,6 @@ Safe.ArgumentNotNull(symbols, "symbols"); m_nextCls = Math.Max(cls + 1, m_nextCls); - symbols = symbols.Distinct(); foreach (var symbol in symbols) m_map[symbol] = cls; @@ -68,6 +67,10 @@ return m_supportUnclassified || m_map.ContainsKey(symbol); } + + public IEnumerable<T> GetSymbols(int cls) { + return m_map.Where(p => p.Value == cls).Select(p => p.Key); + } #endregion } }