System.Xml.Schema.BitSet.Intersects C# (CSharp) Method

Intersects() public method

public Intersects ( BitSet other ) : bool
other BitSet
return bool
        public bool Intersects(BitSet other) {
            int i = Math.Min(this.bits.Length, other.bits.Length);
            while (--i >= 0) {
                if ((this.bits[i] & other.bits[i]) != 0) {
                    return true;
                }
            }
            return false;
        }

Usage Example

Esempio n. 1
0
 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);
 }
All Usage Examples Of System.Xml.Schema.BitSet::Intersects