当前位置: 首页>>代码示例>>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;未经允许,请勿转载。