コード例 #1
0
ファイル: Partitions.cs プロジェクト: kzyg/spark
        private void DoSingleton(int ch)
        {
            if (partition.bSingletons[(int)ch] != partition.tSingletons[(int)ch])
            {
                throw new GplexInternalException("BitArray and TreeSet not synchronized");
            }
            if (!partition.tSingletons[(int)ch])
            {
                partition.bSingletons[(int)ch] = true; // Keep bitset and tree synchronized

                partition.tSingletons[(int)ch] = true;
                partition.Refine(new RangeLiteral(ch));
            }
        }
コード例 #2
0
ファイル: Partitions.cs プロジェクト: BlueMadWolf/MMCS_CS311
        // Refine based on a single, isolated character.
        // The singleton is transformed into a RangeLiteral with just
        // one element in its RangeList, with a one-length range.
        private void DoSingleton(int ch)
        {
#if DEBUG
            char c = (char)ch; // For readability
#endif
            if (this.partition.myTask.CaseAgnostic)
            {
                partition.Refine(RangeLiteral.NewCaseAgnosticPair(ch));
            }
            else
            {
                partition.Refine(new RangeLiteral(ch));
            }
        }