本文整理匯總了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();
}
}