C# Класс BitsetsNET.RoaringBitset

Наследование: IBitset
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Add() публичный Метод

Adds the specified value to the current bitmap
public Add ( int x ) : void
x int Value to be added
Результат void

Add() публичный Метод

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
Результат void

And() публичный Метод

Creates a new bitset that is the bitwise AND of this bitset with another
public And ( IBitset otherSet ) : IBitset
otherSet IBitset Other bitset
Результат IBitset

And() публичный статический Метод

public static And ( RoaringBitset x1, RoaringBitset x2 ) : RoaringBitset
x1 RoaringBitset
x2 RoaringBitset
Результат RoaringBitset

AndNot() публичный Метод

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
Результат IBitset

AndWith() публичный Метод

Performs an in-place intersection of two Roaring Bitsets.
public AndWith ( IBitset otherSet ) : void
otherSet IBitset the second Roaring Bitset to intersect
Результат void

Cardinality() публичный Метод

The number of members of the set
public Cardinality ( ) : int
Результат int

Clone() публичный Метод

Create a new bitset that is a deep copy of this one.
public Clone ( ) : IBitset
Результат IBitset

Create() публичный статический Метод

public static Create ( int input ) : RoaringBitset
input int
Результат RoaringBitset

Deserialize() публичный статический Метод

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.
Результат RoaringBitset

Difference() публичный Метод

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
Результат IBitset

DifferenceWith() публичный Метод

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
Результат void

Equals() публичный Метод

public Equals ( Object o ) : bool
o Object
Результат bool

Flip() публичный Метод

If the given index is not in the set add it, otherwise remove it.
public Flip ( int x ) : void
x int
Результат void

Flip() публичный Метод

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)
Результат void

Get() публичный Метод

Return whether the given index is a member of this set
public Get ( int index ) : bool
index int the index to test
Результат bool

GetEnumerator() публичный Метод

public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

GetObjectData() публичный Метод

public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
Результат void

IAndNot() публичный Метод

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
Результат void

Or() публичный Метод

Creates a new bitset that is the bitwise OR of this bitset with another
public Or ( IBitset otherSet ) : IBitset
otherSet IBitset Other bitset
Результат IBitset

OrWith() публичный Метод

Computes the in-place bitwise OR of this bitset with another
public OrWith ( IBitset otherSet ) : void
otherSet IBitset Other bitset
Результат void

Remove() публичный Метод

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
Результат void

Select() публичный Метод

public Select ( int j ) : int
j int
Результат int

Serialize() публичный Метод

Write a binary serialization of this roaring bitset.
public Serialize ( Stream stream ) : void
stream Stream The stream to write to.
Результат void

Set() публичный Метод

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
Результат void

Set() публичный Метод

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
Результат void

ToBitArray() публичный Метод

public ToBitArray ( ) : BitArray
Результат System.Collections.BitArray