Method | Description | |
---|---|---|
And ( |
Performs a logical AND of this target bit set with the argument bit set. This bit set is modified so that each bit in it has the value
|
|
AndNot ( |
Clears all of the bits in this bit set whose corresponding bit is set in the specified bit set.
|
|
BitSet ( ) : System |
Initializes a new instance of the CyrusBuilt.MonoPi.BitSet class. This is the default constructor.
|
|
BitSet ( |
Initializes a new instance of the CyrusBuilt.MonoPi.BitSet class whose intial size is large enough to explicitly represent bits with indices in the range of 0 through nBits - 1. All bits are intially
|
|
BitSet ( long words ) : System |
Initializes a new instance of the CyrusBuilt.MonoPi.BitSet class from the specified array (words) as the internal representation. The last word (if there is one) must be non-zero.
|
|
Cardinality ( ) : |
Returns the number of bits set to
|
|
Clear ( ) : void |
Sets all of the bits in this CyrusBuilt.MonoPi.BitSet instance to
|
|
Clear ( |
Sets the bit at the specified position (index) to
|
|
Clear ( |
Sets the bits from the specified from index (inclusive) to the specified to index (exclusive) to
|
|
Clone ( ) : Object |
Creates a new object that is a copy of the current instance.
|
|
ContainsAll ( |
This method is used by EnumSet for efficiency. It checks to see if this instance contains all the same bits as the specified bit set.
|
|
Equals ( object obj ) : bool |
Determines whether the specified System.Object is equal to the current CyrusBuilt.MonoPi.BitSet.
|
|
Flip ( |
Sets the bit at the specified index to the compliment of its current value.
|
|
Flip ( |
Sets each bit from the specified from (inclusive) to the specified to (exclusive) to the complement of its current value.
|
|
Get ( |
Returns a new bit set composed of bits from this bit set from the specified from index (inclusive) to the to index (exclusive).
|
|
Get ( |
Gets the value of the bit at the specified index.
|
|
GetHashCode ( ) : int |
Gets a hash code value for this bit set. The hash code depends only on which bits are set within this instance.
|
|
Intersects ( |
Returns true if the specified bit set has any bits set to true that are also set to true in this bit set.
|
|
NextClearBit ( |
Returns the index of the first bit that is set to
|
|
NextSetBit ( |
Returns the index of the first bit that is set to
|
|
Or ( |
Performs a logical OR of this bit set with the specified bit set. This bit set is modified so that a bit in it has the value
|
|
PreviousClearBit ( |
Returns the index of the nearest bit that is set to
|
|
PreviousSetBit ( |
Returns the index of the nearest bit that is set to
|
|
Set ( |
Sets the bit at the specified index to
|
|
Set ( |
Sets the bit at the specified index to the specified value.
|
|
Set ( |
Sets the bits from the specified from index (inclusive) to the specified to index (exclusive) to
|
|
Set ( |
Sets the bits from the specified from index (inclusive) to the specified to index (exclusive) to the specified value.
|
|
ToByteArray ( ) : Byte[] |
Returns a new byte array containing all the bits in this bit set instance.
|
|
ToLongArray ( ) : long[] |
Returns a new array of longs containing all the bits in this bit set instance.
|
|
ToString ( ) : string |
Returns a System.String that represents the current CyrusBuilt.MonoPi.BitSet. For every index for which this bit set contains a bit in the set state, the decimal representation of that index is included in the result. Such indices are listed in order from lowest to highest, separated by ", " (a comma and a space) and surrounded by braces, resulting in the usual mathematical notation for a set of integers.
|
|
ValueOf ( Byte bytes ) : |
Returns a new bit set containing all the bits in the specified byte array.
|
|
ValueOf ( long words ) : |
Returns a new bit set containing all the bits in the specified array of longs.
|
|
XOr ( |
Performs a logical XOR of this bit set with the specified bit set. This bit set is modified so that a bit in it has the value
|
Method | Description | |
---|---|---|
CheckInvariants ( ) : void |
Every public method must preserve the invariants. This method checks to see if this is true using assertions.
|
|
CheckRange ( |
Checks to see if the specified "from" index and "to" index is a valid range of bit indices.
|
|
EnsureCapacity ( |
Ensures that this BitSet can hold enough words.
|
|
ExpandTo ( |
Ensures that the BitSet can accomodate a given word index, temporarily violating the invariants. The caller must restore the invariants before returning to the user, possibly using CyrusBuilt.MonoPi.BitSet.RecalculateWordsInUse().
|
|
NumberOfTrailingZeros ( long n ) : |
Gets the number of trailing zeros in the specified long.
|
|
RecalculateWordsInUse ( ) : void |
Sets the internal word use count field to the logical size in words of the bit set. WARNING: This method assumes that the number of words actually in use is less than or equal to the current value of the words in use field!!!
|
|
TrimToSize ( ) : void |
Attempts to reduce internal storage used for the bits in this bit set. Calling this method may, but is not required to, affect the value returned by a subsequent call to the CyrusBuilt.MonoPi.BitSet.Size property.
|
|
WordIndex ( |
Given the specified bit index, returns the word index containing it.
|
public AndNot ( |
||
bs | /// The bit set with which to mask this instance. /// | |
return | void |
public BitSet ( |
||
nBits | /// The initial size of the bit set. /// | |
return | System |
public BitSet ( long words ) : System | ||
words | long | /// The array (words) to compose this instance from. /// |
return | System |
public Clear ( |
||
pos | /// The index of the bit to be cleared. /// | |
return | void |
public Clear ( |
||
from | /// The index of the first bit to be cleared. /// | |
to | /// The index after the last bit to be cleared. /// | |
return | void |
public ContainsAll ( |
||
other | /// The bit set to check. /// | |
return | System.Boolean |
public Equals ( object obj ) : bool | ||
obj | object |
/// The |
return | bool |
public Flip ( |
||
index | /// The index of the bit to flip. /// | |
return | void |
public Flip ( |
||
from | /// The index of the first bit to flip. /// | |
to | /// The index after the last bit to flip. /// | |
return | void |
public Get ( |
||
from | /// The index of the first bit to include. /// | |
to | /// The index after the last bit to include. /// | |
return |
public Get ( |
||
pos | /// The index at which to get the bit value. /// | |
return | System.Boolean |
public Intersects ( |
||
bs | /// The bit set to intersect with. /// | |
return | System.Boolean |
public NextClearBit ( |
||
from | /// The index to start checking from (inclusive). /// | |
return |
public NextSetBit ( |
||
from | /// The index to start checking from (inclusive). /// | |
return |
public PreviousClearBit ( |
||
fromIndex | /// The index to start checking from (inclusive). /// | |
return |
public PreviousSetBit ( |
||
fromIndex | /// The index to start checking from (inclusive). /// | |
return |
public Set ( |
||
index | /// The index of the bit to set. /// | |
return | void |
public Set ( |
||
index | /// The index of the bit to set. /// | |
value | System.Boolean | /// The value to set. /// |
return | void |
public Set ( |
||
from | /// The index of the first bit to set. /// | |
to | /// The index after the last bit to set. /// | |
return | void |
public Set ( |
||
from | /// The index of the first bit to set. /// | |
to | /// The index after the last bit to set. /// | |
value | System.Boolean | /// The value to set. /// |
return | void |
public static ValueOf ( Byte bytes ) : |
||
bytes | Byte | /// A byte array containing a little-endian representation of a /// sequence of bits to be used as the intial set of the new bit set. /// |
return |
public static ValueOf ( long words ) : |
||
words | long | /// A long array containing a little-endian representation of a /// sequence of bits to be used as the intial bits of the new /// bit set. /// |
return |