C# Class BitsetsNET.RoaringBitset

Inheritance: IBitset
Afficher le fichier Open project: BitSetsNet/BitSetsNet Class Usage Examples

Méthodes publiques

Méthode Description
Add ( int x ) : void

Adds the specified value to the current bitmap

Add ( int rangeStart, int rangeEnd ) : void

Add to the current bitmap all integers in [rangeStart,rangeEnd).

And ( IBitset otherSet ) : IBitset

Creates a new bitset that is the bitwise AND of this bitset with another

And ( RoaringBitset x1, RoaringBitset x2 ) : RoaringBitset
AndNot ( RoaringBitset otherSet ) : IBitset

Finds members of a bitset that are not in the other set (ANDNOT). This does not modify either bitset.

AndWith ( IBitset otherSet ) : void

Performs an in-place intersection of two Roaring Bitsets.

Cardinality ( ) : int

The number of members of the set

Clone ( ) : IBitset

Create a new bitset that is a deep copy of this one.

Create ( int input ) : RoaringBitset
Deserialize ( Stream stream ) : RoaringBitset

Read a binary serialization of a roaring bitset, as written by the Serialize method.

Difference ( IBitset otherSet ) : IBitset

Finds members of this bitset that are not in the other set (ANDNOT). This does not modify either bitset.

DifferenceWith ( IBitset otherSet ) : void

Finds members of this bitset that are not in the other set (ANDNOT). Places the results in the current bitset (modifies in place).

Equals ( Object o ) : bool
Flip ( int x ) : void

If the given index is not in the set add it, otherwise remove it.

Flip ( int start, int end ) : void

For indices in the range [start, end) add the index to the set if it does not exists, otherwise remove it.

Get ( int index ) : bool

Return whether the given index is a member of this set

GetEnumerator ( ) : IEnumerator
GetHashCode ( ) : int
GetObjectData ( SerializationInfo info, StreamingContext context ) : void
IAndNot ( RoaringBitset otherSet ) : void

Finds members of this bitset that are not in the other set (ANDNOT). Modifies current bitset in place.

Or ( IBitset otherSet ) : IBitset

Creates a new bitset that is the bitwise OR of this bitset with another

OrWith ( IBitset otherSet ) : void

Computes the in-place bitwise OR of this bitset with another

Remove ( int rangeStart, int rangeEnd ) : void

Remove from the current bitmap all integers in [rangeStart,rangeEnd).

Select ( int j ) : int
Serialize ( Stream stream ) : void

Write a binary serialization of this roaring bitset.

Set ( int index, bool value ) : void

Adds the current index to the set if value is true, otherwise removes it if the set contains it.

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.

ToBitArray ( ) : BitArray

Private Methods

Méthode Description
AndWith ( RoaringBitset other ) : void

Performs an in-place intersection of two Roaring Bitsets.

IEnumerable ( ) : IEnumerator

Get an enumerator of the set indices of this bitset.

Method Details

Add() public méthode

Adds the specified value to the current bitmap
public Add ( int x ) : void
x int Value to be added
Résultat void

Add() public méthode

Add to the current bitmap all integers in [rangeStart,rangeEnd).
public Add ( int rangeStart, int rangeEnd ) : void
rangeStart int Inclusive beginning of range
rangeEnd int Exclusive ending of range
Résultat void

And() public méthode

Creates a new bitset that is the bitwise AND of this bitset with another
public And ( IBitset otherSet ) : IBitset
otherSet IBitset Other bitset
Résultat IBitset

And() public static méthode

public static And ( RoaringBitset x1, RoaringBitset x2 ) : RoaringBitset
x1 RoaringBitset
x2 RoaringBitset
Résultat RoaringBitset

AndNot() public méthode

Finds members of a bitset that are not in the other set (ANDNOT). This does not modify either bitset.
public AndNot ( RoaringBitset otherSet ) : IBitset
otherSet RoaringBitset The set to compare against
Résultat IBitset

AndWith() public méthode

Performs an in-place intersection of two Roaring Bitsets.
public AndWith ( IBitset otherSet ) : void
otherSet IBitset the second Roaring Bitset to intersect
Résultat void

Cardinality() public méthode

The number of members of the set
public Cardinality ( ) : int
Résultat int

Clone() public méthode

Create a new bitset that is a deep copy of this one.
public Clone ( ) : IBitset
Résultat IBitset

Create() public static méthode

public static Create ( int input ) : RoaringBitset
input int
Résultat RoaringBitset

Deserialize() public static méthode

Read a binary serialization of a roaring bitset, as written by the Serialize method.
public static Deserialize ( Stream stream ) : RoaringBitset
stream Stream The stream to read from.
Résultat RoaringBitset

Difference() public méthode

Finds members of this bitset that are not in the other set (ANDNOT). This does not modify either bitset.
public Difference ( IBitset otherSet ) : IBitset
otherSet IBitset The set to compare against
Résultat IBitset

DifferenceWith() public méthode

Finds members of this bitset that are not in the other set (ANDNOT). Places the results in the current bitset (modifies in place).
public DifferenceWith ( IBitset otherSet ) : void
otherSet IBitset The set to compare against
Résultat void

Equals() public méthode

public Equals ( Object o ) : bool
o Object
Résultat bool

Flip() public méthode

If the given index is not in the set add it, otherwise remove it.
public Flip ( int x ) : void
x int
Résultat void

Flip() public méthode

For indices in the range [start, end) add the index to the set if it does not exists, otherwise remove it.
public Flip ( int start, int end ) : void
start int the index to start from (inclusive)
end int the index to stop at (exclusive)
Résultat void

Get() public méthode

Return whether the given index is a member of this set
public Get ( int index ) : bool
index int the index to test
Résultat bool

GetEnumerator() public méthode

public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetObjectData() public méthode

public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
Résultat void

IAndNot() public méthode

Finds members of this bitset that are not in the other set (ANDNOT). Modifies current bitset in place.
public IAndNot ( RoaringBitset otherSet ) : void
otherSet RoaringBitset The set to compare against
Résultat void

Or() public méthode

Creates a new bitset that is the bitwise OR of this bitset with another
public Or ( IBitset otherSet ) : IBitset
otherSet IBitset Other bitset
Résultat IBitset

OrWith() public méthode

Computes the in-place bitwise OR of this bitset with another
public OrWith ( IBitset otherSet ) : void
otherSet IBitset Other bitset
Résultat void

Remove() public méthode

Remove from the current bitmap all integers in [rangeStart,rangeEnd).
public Remove ( int rangeStart, int rangeEnd ) : void
rangeStart int inclusive beginning of range
rangeEnd int exclusive ending of range
Résultat void

Select() public méthode

public Select ( int j ) : int
j int
Résultat int

Serialize() public méthode

Write a binary serialization of this roaring bitset.
public Serialize ( Stream stream ) : void
stream Stream The stream to write to.
Résultat void

Set() public méthode

Adds the current index to the set if value is true, otherwise removes it if the set contains it.
public Set ( int index, bool value ) : void
index int The index to set
value bool Boolean of whether to add or remove the index
Résultat void

Set() public méthode

For indices in the range [start, end) add the index to the set if the value is true, otherwise remove it.
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

ToBitArray() public méthode

public ToBitArray ( ) : BitArray
Résultat System.Collections.BitArray