Mercurial > pub > ImplabNet
comparison Implab/Automaton/MapAlphabet.cs @ 176:0c3c69fe225b ref20160224
rewritten the text scanner
| author | cin |
|---|---|
| date | Tue, 22 Mar 2016 18:58:40 +0300 |
| parents | 92d5278d1b10 |
| children | d5c5db0335ee |
comparison
equal
deleted
inserted
replaced
| 175:96a89dcb4060 | 176:0c3c69fe225b |
|---|---|
| 67 return m_supportUnclassified || m_map.ContainsKey(symbol); | 67 return m_supportUnclassified || m_map.ContainsKey(symbol); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 public IEnumerable<T> GetSymbols(int cls) { | 71 public IEnumerable<T> GetSymbols(int cls) { |
| 72 Safe.ArgumentAssert(cls > 0, "cls"); | |
| 72 return m_map.Where(p => p.Value == cls).Select(p => p.Key); | 73 return m_map.Where(p => p.Value == cls).Select(p => p.Key); |
| 73 } | 74 } |
| 74 #endregion | 75 #endregion |
| 76 | |
| 77 public IEnumerable<KeyValuePair<T,int>> Mappings { | |
| 78 get { | |
| 79 return m_map; | |
| 80 } | |
| 81 } | |
| 75 } | 82 } |
| 76 } | 83 } |
| 77 | 84 |
