Method | Description | |
---|---|---|
AreAllBitsCleared ( int index, int length ) : bool |
Determines if any of the provided bits are cleared.
|
|
AreAllBitsSet ( int index, int length ) : bool |
Determines if any of the provided bits are set.
|
|
BitArray ( bool initialState, int count = BitsPerElement ) : System |
Initializes BitArray.
|
|
ClearAll ( ) : void |
Clears all bits.
|
|
ClearBit ( int index ) : void |
Sets the corresponding bit to false
|
|
ClearBits ( int index, int length ) : void |
Clears a series of bits
|
|
EnsureCapacity ( int capacity ) : void |
Verifies that the BitArray has the capacity to store the provided number of elements. If not, the bit array will autogrow by a factor of 2 or at least the capacity
|
|
FindClearedBit ( ) : int |
Returns the index of the first bit that is cleared. -1 is returned if all bits are set.
|
|
FindSetBit ( ) : int |
Returns the index of the first bit that is set. -1 is returned if all bits are set.
|
|
GetAllClearedBits ( ) : IEnumerable |
Yields a list of all bits that are cleared.
|
|
GetAllSetBits ( ) : IEnumerable |
Yields a list of all bits that are set.
|
|
GetBit ( int index ) : bool |
Gets the status of the corresponding bit.
|
|
SetAll ( ) : void |
Sets all bits.
|
|
SetBit ( int index ) : void |
Sets the corresponding bit to true
|
|
SetBits ( int index, int length ) : void |
Sets a series of bits
|
|
SetCapacity ( int capacity ) : void |
Increases the capacity of the bit array. Decreasing capacity is currently not supported
|
|
TryClearBit ( int index ) : bool |
Sets the corresponding bit to false. Returns true if the bit state was changed. True if the bit state was changed. False if the bit was already cleared. |
|
TrySetBit ( int index ) : bool |
Sets the corresponding bit to true. Returns true if the bit state was changed. True if the bit state was changed. False if the bit was already set. |
|
this ( int index ) : bool |
Gets/Sets individual bits in this array.
|
Method | Description | |
---|---|---|
GetBitUnchecked ( int index ) : bool | ||
ThrowException ( int index ) : void | ||
ThrowException ( int index, int length ) : void | ||
Validate ( int index ) : void | ||
Validate ( int index, int length ) : void |
public AreAllBitsCleared ( int index, int length ) : bool | ||
index | int | the starting index |
length | int | the length of the run |
return | bool |
public AreAllBitsSet ( int index, int length ) : bool | ||
index | int | the starting index |
length | int | the length of the run |
return | bool |
public BitArray ( bool initialState, int count = BitsPerElement ) : System | ||
initialState | bool | Set to true to initial will all elements set. False to have all elements cleared. |
count | int | The number of bit positions to support |
return | System |
public ClearBits ( int index, int length ) : void | ||
index | int | the starting index to clear |
length | int | the length of bits |
return | void |
public EnsureCapacity ( int capacity ) : void | ||
capacity | int | |
return | void |
public SetBits ( int index, int length ) : void | ||
index | int | the starting index to clear |
length | int | the length of bits |
return | void |
public SetCapacity ( int capacity ) : void | ||
capacity | int | the number of bits to support |
return | void |
public this ( int index ) : bool | ||
index | int | the bit position to get. |
return | bool |