Méthode | Description | |
---|---|---|
And ( IBitset otherSet ) : IBitset | ||
AndWith ( IBitset otherSet ) : void |
Intersects an IBitset with another IBitset, modifying the first IBitset rather than creating a new IBitset
|
|
Cardinality ( ) : int |
Returns the number of 1's in the uncompressed set (i.e. 1's only).
|
|
Clone ( ) : IBitset |
Returns a deep copy of this RLEBitset.
|
|
CreateFrom ( |
Creates a RLEBitset from a BitArray.
|
|
CreateFrom ( int indices ) : IBitset |
Creates a RLEBitset from an array of indices. Each value in the input array represents the position (i.e. index) of a 1.
|
|
CreateFrom ( int indices, int capacity ) : IBitset |
Creates a RLEBitset from an array of indices and a capacity value. Each value in the input array represents the position (i.e. index) of a 1. The capity represents the length of the uncompressed data.
|
|
Deserialize ( System.Stream stream ) : |
Read a binary serialization of a RLE bitset, as written by the Serialize method.
|
|
Difference ( IBitset otherSet ) : IBitset |
Performs the set difference, defined as the set in A and not in B.
|
|
DifferenceWith ( IBitset otherSet ) : void |
Performs the set difference, defined as the set in A and not in B.
|
|
Equals ( object otherSet ) : bool |
Determines if the other IBitset is equal to this one.
|
|
Flip ( int index ) : void |
Flips the bit at the specified index.
|
|
Flip ( int start, int end ) : void |
Flips each bit in the specified range
|
|
Get ( int index ) : bool |
Gets the boolean value at the given index.
|
|
GetEnumerator ( ) : IEnumerator |
Get an enumerator of the set indices of this bitset. Meaning, it returns the indicies where the value is set to "true" or "1".
|
|
GetHashCode ( ) : int | ||
GetObjectData ( |
||
Length ( ) : int |
Returns the length of the uncompressed set (i.e. 1's and 0's).
|
|
Not ( ) : IBitset |
Inverts all the values in the current IBitset, so that elements set to true are changed to false, and elements set to false are changed to true.
|
|
Or ( IBitset otherSet ) : IBitset | ||
OrWith ( IBitset otherSet ) : void | ||
Serialize ( System.Stream stream ) : void |
Write a binary serialization of this RLE bitset.
|
|
Set ( int index, bool value ) : void |
Sets the bit at a specific position in the IBitset to the specified value.
|
|
Set ( int start, int end, bool value ) : void |
For indices in the range [start, end] add the index to the set if the value is true, otherwise remove it.
|
|
SetRange ( int startIndex, int count, bool value ) : void |
Sets all bits in the given range to the specified value.
|
|
ToBitArray ( ) : |
Returns the contents of this set as a bit array where the value is set to true for each index that is a member of this set
|
Méthode | Description | |
---|---|---|
AddRunToRLE ( |
Helper function for Or operations. Adds the given run to the run-array by. Either: a) merges it with the previous run if overlap with previous in array b) adds it as next run if no overlap with previous in array
|
|
GetRange ( int start, int end ) : List |
||
Merge ( Run ¤t, Run &next, bool shouldInsert, int index ) : bool | ||
MergeOtherRun ( |
||
TryCreateIntersection ( Run runA, Run runB, Run &output ) : bool | ||
TryCreateUnion ( Run runA, Run runB, Run &output ) : bool | ||
mergeExistingRun ( Run ¤t, int &nextIndex ) : void |
public AndWith ( IBitset otherSet ) : void | ||
otherSet | IBitset | the other IBitset |
Résultat | void |
public static CreateFrom ( |
||
bits | a BitArray | |
Résultat | IBitset |
public static CreateFrom ( int indices ) : IBitset | ||
indices | int | an array of integers representing the positions of 1's |
Résultat | IBitset |
public static CreateFrom ( int indices, int capacity ) : IBitset | ||
indices | int | an array of integers representing the positions of 1's |
capacity | int | the length of the uncompressed array |
Résultat | IBitset |
public static Deserialize ( System.Stream stream ) : |
||
stream | System.Stream | The stream to read from. |
Résultat |
public Difference ( IBitset otherSet ) : IBitset | ||
otherSet | IBitset | the other IBitset |
Résultat | IBitset |
public DifferenceWith ( IBitset otherSet ) : void | ||
otherSet | IBitset | the other IBitset |
Résultat | void |
public Equals ( object otherSet ) : bool | ||
otherSet | object | the other IBitset |
Résultat | bool |
public Flip ( int start, int end ) : void | ||
start | int | Start of range |
end | int | End of range |
Résultat | void |
public GetObjectData ( |
||
info | ||
context | ||
Résultat | void |
public Serialize ( System.Stream stream ) : void | ||
stream | System.Stream | The stream to write to. |
Résultat | void |
public Set ( int index, bool value ) : void | ||
index | int | The zero-based index of the bit to set. |
value | bool | The Boolean value to assign to the bit. |
Résultat | void |
public Set ( int start, int end, bool value ) : void | ||
start | int | the index to start from (inclusive) |
end | int | the index to stop at (exclusive) |
value | bool | |
Résultat | void |
public SetRange ( int startIndex, int count, bool value ) : void | ||
startIndex | int | The zero-based start position of the range. |
count | int | The number of bits in the range. |
value | bool | The Boolean value to assign to the bits. |
Résultat | void |