C# Класс Lucene.Net.Util.LongBitSet

BitSet of fixed length (numBits), backed by accessible (#getBits) long[], accessed with a long index. Use it only if you intend to store more than 2.1B bits, otherwise you should use FixedBitSet. @lucene.internal
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
And ( LongBitSet other ) : void

this = this AND other

AndNot ( LongBitSet other ) : void

this = this AND NOT other

Bits2words ( long numBits ) : int

returns the number of 64 bit words it would take to hold numBits

Cardinality ( ) : long

Returns number of set bits. NOTE: this visits every long in the backing bits array, and the result is not internally cached!

Clear ( long index ) : void
Clear ( long startIndex, long endIndex ) : void

Clears a range of bits.

Clone ( ) : LongBitSet
EnsureCapacity ( LongBitSet bits, long numBits ) : LongBitSet

If the given LongBitSet is large enough to hold {@code numBits}, returns the given bits, otherwise returns a new LongBitSet which can hold the requested number of bits.

NOTE: the returned bitset reuses the underlying {@code long[]} of the given {@code bits} if possible. Also, calling #length() on the returned bits may return a value greater than {@code numBits}.

Equals ( object o ) : bool

returns true if both sets have the same bits set

Flip ( long startIndex, long endIndex ) : void

Flips a range of bits

Get ( long index ) : bool
GetAndClear ( long index ) : bool
GetAndSet ( long index ) : bool
GetHashCode ( ) : int
Intersects ( LongBitSet other ) : bool

returns true if the sets have any elements in common

Length ( ) : long

Returns the number of bits stored in this bitset.

LongBitSet ( long numBits ) : Lucene.Net.Support
LongBitSet ( long storedBits, long numBits ) : Lucene.Net.Support
NextSetBit ( long index ) : long

Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.

Or ( LongBitSet other ) : void

this = this OR other

PrevSetBit ( long index ) : long

Returns the index of the last set bit before or on the index specified. -1 is returned if there are no more set bits.

Set ( long index ) : void
Set ( long startIndex, long endIndex ) : void

Sets a range of bits

Xor ( LongBitSet other ) : void

this = this XOR other

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

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

this = this AND other
public And ( LongBitSet other ) : void
other LongBitSet
Результат void

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

this = this AND NOT other
public AndNot ( LongBitSet other ) : void
other LongBitSet
Результат void

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

returns the number of 64 bit words it would take to hold numBits
public static Bits2words ( long numBits ) : int
numBits long
Результат int

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

Returns number of set bits. NOTE: this visits every long in the backing bits array, and the result is not internally cached!
public Cardinality ( ) : long
Результат long

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

public Clear ( long index ) : void
index long
Результат void

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

Clears a range of bits.
public Clear ( long startIndex, long endIndex ) : void
startIndex long lower index
endIndex long one-past the last bit to clear
Результат void

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

public Clone ( ) : LongBitSet
Результат LongBitSet

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

If the given LongBitSet is large enough to hold {@code numBits}, returns the given bits, otherwise returns a new LongBitSet which can hold the requested number of bits.

NOTE: the returned bitset reuses the underlying {@code long[]} of the given {@code bits} if possible. Also, calling #length() on the returned bits may return a value greater than {@code numBits}.

public static EnsureCapacity ( LongBitSet bits, long numBits ) : LongBitSet
bits LongBitSet
numBits long
Результат LongBitSet

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

returns true if both sets have the same bits set
public Equals ( object o ) : bool
o object
Результат bool

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

Flips a range of bits
public Flip ( long startIndex, long endIndex ) : void
startIndex long lower index
endIndex long one-past the last bit to flip
Результат void

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

public Get ( long index ) : bool
index long
Результат bool

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

public GetAndClear ( long index ) : bool
index long
Результат bool

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

public GetAndSet ( long index ) : bool
index long
Результат bool

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

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

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

returns true if the sets have any elements in common
public Intersects ( LongBitSet other ) : bool
other LongBitSet
Результат bool

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

Returns the number of bits stored in this bitset.
public Length ( ) : long
Результат long

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

public LongBitSet ( long numBits ) : Lucene.Net.Support
numBits long
Результат Lucene.Net.Support

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

public LongBitSet ( long storedBits, long numBits ) : Lucene.Net.Support
storedBits long
numBits long
Результат Lucene.Net.Support

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

Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.
public NextSetBit ( long index ) : long
index long
Результат long

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

this = this OR other
public Or ( LongBitSet other ) : void
other LongBitSet
Результат void

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

Returns the index of the last set bit before or on the index specified. -1 is returned if there are no more set bits.
public PrevSetBit ( long index ) : long
index long
Результат long

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

public Set ( long index ) : void
index long
Результат void

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

Sets a range of bits
public Set ( long startIndex, long endIndex ) : void
startIndex long lower index
endIndex long one-past the last bit to set
Результат void

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

this = this XOR other
public Xor ( LongBitSet other ) : void
other LongBitSet
Результат void