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

BitSet of fixed length (numBits), backed by accessible (#getBits) long[], accessed with an int index, implementing GetBits and DocIdSet. If you need to manage more than 2.1B bits, use LongBitSet. @lucene.internal
Наследование: DocIdSet, Bits
Показать файл Открыть проект Примеры использования класса

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

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

Does in-place AND of the bits provided by the iterator.

And ( FixedBitSet other ) : void

this = this AND other

AndNot ( DocIdSetIterator iter ) : void

Does in-place AND NOT of the bits provided by the iterator.

AndNot ( FixedBitSet other ) : void

this = this AND NOT other

AndNotCount ( FixedBitSet a, FixedBitSet b ) : long

Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))". Neither set is modified.

Bits2words ( int numBits ) : int

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

Cardinality ( ) : int

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

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

Clears a range of bits.

Clone ( ) : FixedBitSet
EnsureCapacity ( FixedBitSet bits, int numBits ) : FixedBitSet

If the given FixedBitSet is large enough to hold {@code numBits}, returns the given bits, otherwise returns a new FixedBitSet 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

FixedBitSet ( int numBits ) : System
FixedBitSet ( long storedBits, int numBits ) : System
Flip ( int startIndex, int endIndex ) : void

Flips a range of bits

Get ( int index ) : bool
GetAndClear ( int index ) : bool
GetAndSet ( int index ) : bool
GetBits ( ) : Bits
GetHashCode ( ) : int
GetIterator ( ) : DocIdSetIterator
IntersectionCount ( FixedBitSet a, FixedBitSet b ) : long

Returns the popcount or cardinality of the intersection of the two sets. Neither set is modified.

Intersects ( FixedBitSet other ) : bool

returns true if the sets have any elements in common

Length ( ) : int
NextSetBit ( int index ) : int

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

Or ( DocIdSetIterator iter ) : void

Does in-place OR of the bits provided by the iterator.

Or ( FixedBitSet other ) : void

this = this OR other

PrevSetBit ( int index ) : int

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 ( int index ) : void
Set ( int startIndex, int endIndex ) : void

Sets a range of bits

UnionCount ( FixedBitSet a, FixedBitSet b ) : long

Returns the popcount or cardinality of the union of the two sets. Neither set is modified.

Xor ( DocIdSetIterator iter ) : void

Does in-place XOR of the bits provided by the iterator.

Xor ( FixedBitSet other ) : void

this = this XOR other

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

Метод Описание
And ( long otherArr, int otherNumWords ) : void
AndNot ( long otherArr, int otherNumWords ) : void
Or ( long otherArr, int otherNumWords ) : void

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

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

Does in-place AND of the bits provided by the iterator.
public And ( DocIdSetIterator iter ) : void
iter DocIdSetIterator
Результат void

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

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

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

Does in-place AND NOT of the bits provided by the iterator.
public AndNot ( DocIdSetIterator iter ) : void
iter DocIdSetIterator
Результат void

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

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

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

Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))". Neither set is modified.
public static AndNotCount ( FixedBitSet a, FixedBitSet b ) : long
a FixedBitSet
b FixedBitSet
Результат long

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

returns the number of 64 bit words it would take to hold numBits
public static Bits2words ( int numBits ) : int
numBits int
Результат 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 ( ) : int
Результат int

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

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

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

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

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

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

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

If the given FixedBitSet is large enough to hold {@code numBits}, returns the given bits, otherwise returns a new FixedBitSet 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 ( FixedBitSet bits, int numBits ) : FixedBitSet
bits FixedBitSet
numBits int
Результат FixedBitSet

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

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

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

public FixedBitSet ( int numBits ) : System
numBits int
Результат System

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

public FixedBitSet ( long storedBits, int numBits ) : System
storedBits long
numBits int
Результат System

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

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

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

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

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

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

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

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

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

public GetBits ( ) : Bits
Результат Bits

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

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

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

public GetIterator ( ) : DocIdSetIterator
Результат DocIdSetIterator

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

Returns the popcount or cardinality of the intersection of the two sets. Neither set is modified.
public static IntersectionCount ( FixedBitSet a, FixedBitSet b ) : long
a FixedBitSet
b FixedBitSet
Результат long

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

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

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

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

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 ( int index ) : int
index int
Результат int

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

Does in-place OR of the bits provided by the iterator.
public Or ( DocIdSetIterator iter ) : void
iter DocIdSetIterator
Результат void

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

this = this OR other
public Or ( FixedBitSet other ) : void
other FixedBitSet
Результат 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 ( int index ) : int
index int
Результат int

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

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

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

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

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

Returns the popcount or cardinality of the union of the two sets. Neither set is modified.
public static UnionCount ( FixedBitSet a, FixedBitSet b ) : long
a FixedBitSet
b FixedBitSet
Результат long

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

Does in-place XOR of the bits provided by the iterator.
public Xor ( DocIdSetIterator iter ) : void
iter DocIdSetIterator
Результат void

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

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