本文整理汇总了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;
}