本文整理匯總了C#中BitSet.ClearAll方法的典型用法代碼示例。如果您正苦於以下問題:C# BitSet.ClearAll方法的具體用法?C# BitSet.ClearAll怎麽用?C# BitSet.ClearAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類BitSet
的用法示例。
在下文中一共展示了BitSet.ClearAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: computeClasses
private static void computeClasses(Spec spec)
{
SimplifyNfa.original_charset_size = spec.dtrans_ncols;
SimplifyNfa.ccls = new char[SimplifyNfa.original_charset_size];
char c = '\u0001';
BitSet bitSet = new BitSet();
BitSet bitSet2 = new BitSet();
Dictionary<char, char> dictionary = new Dictionary<char, char>();
Console.WriteLine("Working on character classes.");
for (int i = 0; i < spec.nfa_states.Count; i++)
{
Nfa nfa = spec.nfa_states[i];
if (nfa.Edge != '�' && nfa.Edge != '')
{
bitSet.ClearAll();
bitSet2.ClearAll();
for (int j = 0; j < SimplifyNfa.ccls.Length; j++)
{
if ((int)nfa.Edge == j || (nfa.Edge == '' && nfa.GetCharSet().contains(j)))
{
bitSet.Set((int)SimplifyNfa.ccls[j], true);
}
else
{
bitSet2.Set((int)SimplifyNfa.ccls[j], true);
}
}
bitSet.And(bitSet2);
if (bitSet.GetLength() != 0)
{
dictionary.Clear();
for (int k = 0; k < SimplifyNfa.ccls.Length; k++)
{
if (bitSet.Get((int)SimplifyNfa.ccls[k]) && ((int)nfa.Edge == k || (nfa.Edge == '' && nfa.GetCharSet().contains(k))))
{
char c2 = SimplifyNfa.ccls[k];
if (!dictionary.ContainsKey(c2))
{
Dictionary<char, char> arg_14F_0 = dictionary;
char arg_14F_1 = c2;
char expr_14A = c;
c = (char)(expr_14A + '\u0001');
arg_14F_0.Add(arg_14F_1, expr_14A);
}
SimplifyNfa.ccls[k] = dictionary[c2];
}
}
}
}
}
SimplifyNfa.mapped_charset_size = (int)c;
}