Property | Type | Description | |
---|---|---|---|
Bitmap | long[] | ||
Cardinality | int |
Property | Type | Description | |
---|---|---|---|
MAX_CAPACITY | int |
Method | Description | |
---|---|---|
Add ( ushort x ) : Container |
Add a short to the container. May generate a new container.
|
|
Add ( ushort rangeStart, ushort rangeEnd ) : Container |
Add to the current bitmap all integers in [rangeStart,rangeEnd).
|
|
And ( |
Computes the bitwise AND of this container with another (intersection). This container as well as the provided container are left unaffected.
|
|
And ( |
Computes the bitwise AND of this container with another (intersection). This container as well as the provided container are left unaffected.
|
|
AndNot ( |
Returns the elements of this BitsetContainer that are not in the ArrayContainer.
|
|
AndNot ( |
Returns the elements of this BitsetContainer that are not in the other BitsetContainer.
|
|
BitsetContainer ( ) : System | ||
BitsetContainer ( int cardinality, long bitmap ) : System | ||
Clone ( ) : Container |
Creates a deep copy of this bitset container.
|
|
Contains ( ushort x ) : bool |
Checks whether the container contains the provided value.
|
|
Deserialize ( |
Deserialize a container from binary format, as written by the Serialize method minus the first 32 bits giving the cardinality.
|
|
Equals ( Object o ) : bool | ||
FillArray ( ushort array ) : void |
Fill the array with set bits.
|
|
FillLeastSignificant16bits ( int x, int i, int mask ) : void |
Fill the least significant 16 bits of the integer array, starting at index i, with the short values from this container. The caller is responsible to allocate enough room. The most significant 16 bits of each integer are given by the most significant bits of the provided mask.
|
|
Flip ( ushort i ) : Container |
Add a short to the container if it is not present, otherwise remove it. May generate a new container.
|
|
GetCardinality ( ) : int |
Computes the distinct number of short values in the container. Can be expected to run in constant time.
|
|
GetEnumerator ( ) : IEnumerator |
||
GetHashCode ( ) : int | ||
IAdd ( ushort begin, ushort end ) : Container |
Add all shorts in [begin,end) using an unsigned interpretation. May generate a new container.
|
|
IAnd ( |
Performs an "in-place" intersection with an ArrayContainer. Since no in-place operation is actually possible, this method defaults to calling ArrayContainer's and() method with this as input.
|
|
IAnd ( |
Performs an intersection with another BitsetContainer. Depending on the cardinality of the result, this will either modify the container in place or return a new ArrayContainer.
|
|
IAndNot ( |
Returns the elements of this BitsetContainer that are not in the ArrayContainer by modifying the current container in place.
|
|
IAndNot ( |
Returns the elements of this BitsetContainer that are not in the other BitsetContainer. Depending on the cardinality of the result, this will either modify the container in place or return a new ArrayContainer.
|
|
INot ( int rangeStart, int rangeEnd ) : Container |
Computes the in-place bitwise NOT of this container (complement). Only those bits within the range are affected.The current container is generally modified.May generate a new container.
|
|
IOr ( |
Computes the in-place bitwise OR of this container with another (union). The current container is generally modified, whereas the provided container(x) is unaffected.May generate a new container.
|
|
IOr ( |
Computes the in-place bitwise OR of this container with another (union). The current container is generally modified, whereas the provided container(x) is unaffected.May generate a new container.
|
|
Intersects ( |
Returns true if the current container intersects the other container.
|
|
Intersects ( |
Returns true if the current container intersects the other container.
|
|
LoadData ( |
||
Or ( |
Computes the bitwise OR of this container with another (union). This container as well as the provided container are left unaffected.
|
|
Or ( |
Computes the bitwise OR of this container with another (union). This container as well as the provided container are left unaffected.
|
|
Remove ( ushort x ) : Container |
Remove specified short from this container. May create a new container.
|
|
Remove ( ushort begin, ushort end ) : Container |
Remove shorts in [begin,end) using an unsigned interpretation. May generate a new container.
|
|
Select ( int j ) : ushort |
Return the jth value of the container.
|
|
Serialize ( |
Serialize this container in a binary format. The format of the serialization is the cardinality of this container as a 32-bit integer, followed by the bit array. The cardinality is used in deserialization to distinguish BitsetContainers from ArrayContainers. |
|
ToArrayContainer ( ) : |
Copies the data to an array container
|
Method | Description | |
---|---|---|
ComputeCardinality ( ) : void |
Recomputes the cardinality of the bitmap.
|
public Add ( ushort rangeStart, ushort rangeEnd ) : Container | ||
rangeStart | ushort | inclusive beginning of range |
rangeEnd | ushort | exclusive ending of range |
return | Container |
public And ( |
||
x | Other container | |
return | Container |
public And ( |
||
x | Other container | |
return | Container |
public AndNot ( |
||
x | the ArrayContainer to compare against | |
return | Container |
public AndNot ( |
||
x | the other BitsetContainer | |
return | Container |
public BitsetContainer ( int cardinality, long bitmap ) : System | ||
cardinality | int | |
bitmap | long | |
return | System |
public static Deserialize ( |
||
reader | The reader to deserialize from. | |
cardinality | int | |
return |
public FillArray ( ushort array ) : void | ||
array | ushort | Container (should be sufficiently large) |
return | void |
public FillLeastSignificant16bits ( int x, int i, int mask ) : void | ||
x | int | Provided array |
i | int | Starting index |
mask | int | Indicates most significant bits |
return | void |
public Flip ( ushort i ) : Container | ||
i | ushort | short to be added |
return | Container |
public IAdd ( ushort begin, ushort end ) : Container | ||
begin | ushort | Start of range |
end | ushort | End of range |
return | Container |
public IAnd ( |
||
other | the ArrayContainer to intersect | |
return | Container |
public IAnd ( |
||
other | the other BitsetContainer to intersect | |
return | Container |
public IAndNot ( |
||
x | the ArrayContainer to compare against | |
return | Container |
public IAndNot ( |
||
x | the other BitsetContainer | |
return | Container |
public INot ( int rangeStart, int rangeEnd ) : Container | ||
rangeStart | int | beginning of range (inclusive); 0 is beginning of this container. |
rangeEnd | int | ending of range (exclusive) |
return | Container |
public IOr ( |
||
x | Other container | |
return | Container |
public IOr ( |
||
x | Other container | |
return | Container |
public Intersects ( |
||
x | Other container | |
return | bool |
public Intersects ( |
||
x | Other container | |
return | bool |
public LoadData ( |
||
arrayContainer | ||
return | void |
public Or ( |
||
x | Other container | |
return | Container |
public Or ( |
||
x | Other container | |
return | Container |
public Remove ( ushort x ) : Container | ||
x | ushort | Short to be removed |
return | Container |
public Remove ( ushort begin, ushort end ) : Container | ||
begin | ushort | Start of range (inclusive) |
end | ushort | End of range (exclusive) |
return | Container |
public Serialize ( |
||
writer | The writer to which to serialize this container. | |
return | void |