本文整理匯總了C#中System.Xml.Schema.BitSet.Intersects方法的典型用法代碼示例。如果您正苦於以下問題:C# BitSet.Intersects方法的具體用法?C# BitSet.Intersects怎麽用?C# BitSet.Intersects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Xml.Schema.BitSet
的用法示例。
在下文中一共展示了BitSet.Intersects方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetApplicableMinMaxFollowPos
//For each position, this method calculates the additional follows of any range nodes that need to be added to its followpos
//((ab?)2-4)c, Followpos of a is b as well as that of node R(2-4) = c
private BitSet GetApplicableMinMaxFollowPos(BitSet curpos, BitSet posWithRangeTerminals, BitSet[] minmaxFollowPos) {
if (curpos.Intersects(posWithRangeTerminals)) {
BitSet newSet = new BitSet(positions.Count); //Doing work again
newSet.Or(curpos);
newSet.And(posWithRangeTerminals);
curpos = curpos.Clone();
for (int pos = newSet.NextSet(-1); pos != -1; pos = newSet.NextSet(pos)) {
LeafRangeNode lrNode = positions[pos].particle as LeafRangeNode;
curpos.Or(minmaxFollowPos[lrNode.Pos]);
}
}
return curpos;
}
示例2: GetApplicableMinMaxFollowPos
private BitSet GetApplicableMinMaxFollowPos(BitSet curpos, BitSet posWithRangeTerminals, BitSet[] minmaxFollowPos)
{
if (curpos.Intersects(posWithRangeTerminals))
{
BitSet set = new BitSet(this.positions.Count);
set.Or(curpos);
set.And(posWithRangeTerminals);
curpos = curpos.Clone();
for (int i = set.NextSet(-1); i != -1; i = set.NextSet(i))
{
LeafRangeNode particle = this.positions[i].particle as LeafRangeNode;
curpos.Or(minmaxFollowPos[particle.Pos]);
}
}
return curpos;
}