Class BitArrayExtensions
  
  This class provides supporting methods of java.util.BitSet
that are not present in System.Collections.BitArray.
 
  
  
    Inheritance
    System.Object
    BitArrayExtensions
   
  
    Inherited Members
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: Lucene.Net.dll
  Syntax
  
    public static class BitArrayExtensions
   
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  And_UnequalLengths(BitArray, BitArray)
  
  
  Declaration
  
    public static BitArray And_UnequalLengths(this BitArray bitsA, BitArray bitsB)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitsA | 
         | 
      
      
        | System.Collections.BitArray | 
        bitsB | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AndNot(BitArray, BitArray)
  
  
  Declaration
  
    public static void AndNot(this BitArray bitsA, BitArray bitsB)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitsA | 
         | 
      
      
        | System.Collections.BitArray | 
        bitsB | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  BitWiseEquals(BitArray, BitArray)
  
  
  Declaration
  
    public static bool BitWiseEquals(this BitArray bitsA, BitArray bitsB)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitsA | 
         | 
      
      
        | System.Collections.BitArray | 
        bitsB | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Cardinality(BitArray)
  Returns the number of bits set to true in this BitSet.
 
  
  Declaration
  
    public static int Cardinality(this BitArray bits)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
        The BitArray object. 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
        The number of bits set to true in this BitSet. 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Clear(BitArray)
  
  
  Declaration
  
    public static void Clear(this BitArray bits)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
        The BitArray object. 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Clear(BitArray, Int32)
  Sets the bit at the given index to false.
 
  
  Declaration
  
    public static void Clear(this BitArray bits, int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
        The BitArray object. 
 | 
      
      
        | System.Int32 | 
        index | 
        The position to set to false. 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Clear(BitArray, Int32, Int32)
  
  
  Declaration
  
    public static void Clear(this BitArray bits, int startIdx, int endIdx)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
         | 
      
      
        | System.Int32 | 
        startIdx | 
         | 
      
      
        | System.Int32 | 
        endIdx | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Equal(BitArray, OpenBitSet)
  
  
  Declaration
  
    public static bool Equal(this BitArray a, OpenBitSet b)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        a | 
         | 
      
      
        | OpenBitSet | 
        b | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Flip(BitArray, Int32, Int32)
  
  
  Declaration
  
    public static void Flip(this BitArray bits, int startIdx, int endIdx)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
         | 
      
      
        | System.Int32 | 
        startIdx | 
         | 
      
      
        | System.Int32 | 
        endIdx | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  NextClearBit(BitArray, Int32)
  Returns the next un-set bit at or after index, or -1 if no such bit exists.
 
  
  Declaration
  
    public static int NextClearBit(this BitArray bitArray, int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitArray | 
         | 
      
      
        | System.Int32 | 
        index | 
        the index of bit array at which to start checking 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
        the next set bit or -1 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  NextSetBit(BitArray, Int32)
  Returns the next set bit at or after index, or -1 if no such bit exists.
 
  
  Declaration
  
    public static int NextSetBit(this BitArray bitArray, int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitArray | 
         | 
      
      
        | System.Int32 | 
        index | 
        the index of bit array at which to start checking 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
        the next set bit or -1 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Or_UnequalLengths(BitArray, BitArray)
  
  
  Declaration
  
    public static BitArray Or_UnequalLengths(this BitArray bitsA, BitArray bitsB)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitsA | 
         | 
      
      
        | System.Collections.BitArray | 
        bitsB | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PrevSetBit(BitArray, Int32)
  
  
  Declaration
  
    public static int PrevSetBit(this BitArray bitArray, int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitArray | 
         | 
      
      
        | System.Int32 | 
        index | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  SafeGet(BitArray, Int32)
  
  
  Declaration
  
    public static bool SafeGet(this BitArray a, int loc)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        a | 
         | 
      
      
        | System.Int32 | 
        loc | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  SafeSet(BitArray, Int32, Boolean)
  
  
  Declaration
  
    public static void SafeSet(this BitArray a, int loc, bool value)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        a | 
         | 
      
      
        | System.Int32 | 
        loc | 
         | 
      
      
        | System.Boolean | 
        value | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Set(BitArray, Int32)
  Sets the bit at the given index to true.
 
  
  Declaration
  
    public static void Set(this BitArray bits, int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
        The BitArray object. 
 | 
      
      
        | System.Int32 | 
        index | 
        The position to set to true. 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Set(BitArray, Int32, Int32)
  
  
  Declaration
  
    public static void Set(this BitArray bits, int startIdx, int endIdx)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
         | 
      
      
        | System.Int32 | 
        startIdx | 
         | 
      
      
        | System.Int32 | 
        endIdx | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Set(BitArray, Int32, Int32, Boolean)
  Sets the bit at the given index range to true.
 
  
  Declaration
  
    public static void Set(this BitArray bits, int fromIndex, int toIndex, bool value)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bits | 
        The BitArray object. 
 | 
      
      
        | System.Int32 | 
        fromIndex | 
        The start of the range to set(inclusive) 
 | 
      
      
        | System.Int32 | 
        toIndex | 
        The end of the range to set(exclusive) 
 | 
      
      
        | System.Boolean | 
        value | 
        the value to set to the range 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Xor_UnequalLengths(BitArray, BitArray)
  
  
  Declaration
  
    public static BitArray Xor_UnequalLengths(this BitArray bitsA, BitArray bitsB)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
        bitsA | 
         | 
      
      
        | System.Collections.BitArray | 
        bitsB | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.BitArray | 
         |