當前位置: 首頁>>代碼示例>>C#>>正文


C# BitSet.Clone方法代碼示例

本文整理匯總了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;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:16,代碼來源:ParticleContentValidator.cs

示例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;
 }
開發者ID:iskiselev,項目名稱:JSIL.NetFramework,代碼行數:15,代碼來源:ContentValidator.cs

示例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();
            }
        }
開發者ID:gbarnett,項目名稱:shared-source-cli-2.0,代碼行數:20,代碼來源:contentvalidator.cs


注:本文中的System.Xml.Schema.BitSet.Clone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。