本文整理汇总了C#中System.Xml.Schema.BitSet.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# BitSet.Clone方法的具体用法?C# BitSet.Clone怎么用?C# BitSet.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Schema.BitSet
的用法示例。
在下文中一共展示了BitSet.Clone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: ConstructPos
public override void ConstructPos(BitSet firstpos, BitSet lastpos, BitSet[] followpos) {
BitSet lastposLeft = new BitSet(lastpos.Count);
LeftChild.ConstructPos(firstpos, lastposLeft, followpos);
BitSet firstposRight = new BitSet(firstpos.Count);
RightChild.ConstructPos(firstposRight, lastpos, followpos);
if (LeftChild.IsNullable && !RightChild.IsRangeNode) {
firstpos.Or(firstposRight);
}
if (RightChild.IsNullable) {
lastpos.Or(lastposLeft);
}
for (int pos = lastposLeft.NextSet(-1); pos != -1; pos = lastposLeft.NextSet(pos)) {
followpos[pos].Or(firstposRight);
}
if (RightChild.IsRangeNode) { //firstpos is leftchild.firstpos as the or with firstposRight has not been done as it is a rangenode
((LeafRangeNode)RightChild).NextIteration = firstpos.Clone();
}
}