diff Implab/Automaton/DummyAlphabet.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/DummyAlphabet.cs	Wed Feb 24 20:12:52 2016 +0300
+++ b/Implab/Automaton/DummyAlphabet.cs	Thu Feb 25 02:11:13 2016 +0300
@@ -3,8 +3,16 @@
 using System.Linq;
 
 namespace Implab.Automaton {
+    /// <summary>
+    /// Dummy alphabet consists of integer numbers which are identical to their classes.
+    /// </summary>
     public class DummyAlphabet : IAlphabet<int> {
         readonly int m_size;
+
+        /// <summary>
+        /// Creates a new dummy alphabet with given size.
+        /// </summary>
+        /// <param name="size">The size of the alphabet, must be greater then zero.</param>
         public DummyAlphabet(int size) {
             Safe.ArgumentAssert(size > 0);
             m_size = 0;
@@ -21,6 +29,8 @@
             Safe.ArgumentNotNull(classes, "classes");
             var map = new int[m_size];
             foreach (var cls in classes) {
+                if (cls.Contains(DFAConst.UNCLASSIFIED_INPUT))
+                    continue;
                 var newid = newAlphabet.DefineClass(cls);
                 foreach (var id in cls)
                     map[id] = newid;