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

Наследование: Lucene.Net.Search.DocIdSet, System.ICloneable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
internalbits long[]
wlen int

Private Properties

Свойство Тип Описание

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

Метод Описание
And ( OpenBitSet other ) : void
AndNot ( OpenBitSet other ) : void
AndNotCount ( OpenBitSet a, OpenBitSet b ) : long

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

Bits2words ( long numBits ) : int

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

Capacity ( ) : long

Returns the current capacity in bits (1 greater than the index of the last bit)

Cardinality ( ) : long
Clear ( int startIndex, int endIndex ) : void

Clears a range of bits. Clearing past the end does not change the size of the set.

Clear ( long index ) : void

clears a bit, allowing access beyond the current set size without changing the size.

Clear ( long startIndex, long endIndex ) : void

Clears a range of bits. Clearing past the end does not change the size of the set.

Clone ( ) : Object
EnsureCapacity ( long numBits ) : void

Ensure that the long[] is big enough to hold numBits, expanding it if necessary. getNumWords() is unchanged by this call.

EnsureCapacityWords ( int numWords ) : void

Expand the long[] with the size given as a number of words (64 bit longs). getNumWords() is unchanged by this call.

Equals ( System o ) : bool

returns true if both sets have the same bits set

FastClear ( int index ) : void

clears a bit. The index should be less than the OpenBitSet size.

FastClear ( long index ) : void

clears a bit. The index should be less than the OpenBitSet size.

FastFlip ( int index ) : void

flips a bit. The index should be less than the OpenBitSet size.

FastFlip ( long index ) : void

flips a bit. The index should be less than the OpenBitSet size.

FastGet ( int index ) : bool

Returns true or false for the specified bit index. The index should be less than the OpenBitSet size

FastGet ( long index ) : bool

Returns true or false for the specified bit index. The index should be less than the OpenBitSet size.

FastSet ( int index ) : void

Sets the bit at the specified index. The index should be less than the OpenBitSet size.

FastSet ( long index ) : void

Sets the bit at the specified index. The index should be less than the OpenBitSet size.

Flip ( long index ) : void

flips a bit, expanding the set size if necessary

Flip ( long startIndex, long endIndex ) : void

Flips a range of bits, expanding the set size if necessary

FlipAndGet ( int index ) : bool

flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.

FlipAndGet ( long index ) : bool

flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.

Get ( int index ) : bool

Returns true or false for the specified bit index.

Get ( long index ) : bool

Returns true or false for the specified bit index

GetAndSet ( int index ) : bool

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.

GetAndSet ( long index ) : bool

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.

GetBit ( int index ) : int

returns 1 if the bit is set, 0 if not. The index should be less than the OpenBitSet size

GetHashCode ( ) : int
Intersect ( OpenBitSet other ) : void

this = this AND other

IntersectionCount ( OpenBitSet a, OpenBitSet b ) : long

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

Intersects ( OpenBitSet other ) : bool

returns true if the sets have any elements in common

IsEmpty ( ) : bool

Returns true if there are no set bits

Iterator ( ) : Lucene.Net.Search.DocIdSetIterator
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.

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.

OpenBitSet ( ) : System
OpenBitSet ( long numBits ) : System

Constructs an OpenBitSet large enough to hold numBits.

OpenBitSet ( long bits, int numWords ) : System

Constructs an OpenBitSet from an existing long[].
The first 64 bits are in long[0], with bit index 0 at the least significant bit, and bit index 63 at the most significant. Given a bit index, the word containing it is long[index/64], and it is at bit number index%64 within that word.

numWords are the number of elements in the array that contain set bits (non-zero longs). numWords should be <= bits.length, and any existing words in the array at position >= numWords should be zero.

Or ( OpenBitSet other ) : void
Remove ( OpenBitSet other ) : void

Remove all elements set in other. this = this AND_NOT other

Set ( long index ) : void

sets a bit, expanding the set size if necessary

Set ( long startIndex, long endIndex ) : void

Sets a range of bits, expanding the set size if necessary

Size ( ) : long

Returns the current capacity of this set. Included for compatibility. This is *not* equal to Cardinality

TrimTrailingZeros ( ) : void

Lowers numWords, the number of words in use, by checking for trailing zero words.

Union ( OpenBitSet other ) : void

this = this OR other

UnionCount ( OpenBitSet a, OpenBitSet b ) : long

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

Xor ( OpenBitSet other ) : void

this = this XOR other

XorCount ( OpenBitSet a, OpenBitSet b ) : long

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

Защищенные методы

Метод Описание
ExpandingWordNum ( long index ) : int

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

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

public And ( OpenBitSet other ) : void
other OpenBitSet
Результат void

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

public AndNot ( OpenBitSet other ) : void
other OpenBitSet
Результат void

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

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

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

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

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

Returns the current capacity in bits (1 greater than the index of the last bit)
public Capacity ( ) : long
Результат long

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

public Cardinality ( ) : long
Результат long

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

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

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

clears a bit, allowing access beyond the current set size without changing the size.
public Clear ( long index ) : void
index long
Результат void

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

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

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

public Clone ( ) : Object
Результат System.Object

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

Ensure that the long[] is big enough to hold numBits, expanding it if necessary. getNumWords() is unchanged by this call.
public EnsureCapacity ( long numBits ) : void
numBits long
Результат void

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

Expand the long[] with the size given as a number of words (64 bit longs). getNumWords() is unchanged by this call.
public EnsureCapacityWords ( int numWords ) : void
numWords int
Результат void

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

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

ExpandingWordNum() защищенный Метод

protected ExpandingWordNum ( long index ) : int
index long
Результат int

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

clears a bit. The index should be less than the OpenBitSet size.
public FastClear ( int index ) : void
index int
Результат void

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

clears a bit. The index should be less than the OpenBitSet size.
public FastClear ( long index ) : void
index long
Результат void

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

flips a bit. The index should be less than the OpenBitSet size.
public FastFlip ( int index ) : void
index int
Результат void

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

flips a bit. The index should be less than the OpenBitSet size.
public FastFlip ( long index ) : void
index long
Результат void

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

Returns true or false for the specified bit index. The index should be less than the OpenBitSet size
public FastGet ( int index ) : bool
index int
Результат bool

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

Returns true or false for the specified bit index. The index should be less than the OpenBitSet size.
public FastGet ( long index ) : bool
index long
Результат bool

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

Sets the bit at the specified index. The index should be less than the OpenBitSet size.
public FastSet ( int index ) : void
index int
Результат void

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

Sets the bit at the specified index. The index should be less than the OpenBitSet size.
public FastSet ( long index ) : void
index long
Результат void

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

flips a bit, expanding the set size if necessary
public Flip ( long index ) : void
index long
Результат void

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

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

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

flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.
public FlipAndGet ( int index ) : bool
index int
Результат bool

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

flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.
public FlipAndGet ( long index ) : bool
index long
Результат bool

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

Returns true or false for the specified bit index.
public Get ( int index ) : bool
index int
Результат bool

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

Returns true or false for the specified bit index
public Get ( long index ) : bool
index long
Результат bool

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

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
public GetAndSet ( int index ) : bool
index int
Результат bool

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

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
public GetAndSet ( long index ) : bool
index long
Результат bool

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

returns 1 if the bit is set, 0 if not. The index should be less than the OpenBitSet size
public GetBit ( int index ) : int
index int
Результат int

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

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

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

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

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

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

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

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

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

Returns true if there are no set bits
public IsEmpty ( ) : bool
Результат bool

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

public Iterator ( ) : Lucene.Net.Search.DocIdSetIterator
Результат Lucene.Net.Search.DocIdSetIterator

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

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

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

public OpenBitSet ( ) : System
Результат System

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

Constructs an OpenBitSet large enough to hold numBits.
public OpenBitSet ( long numBits ) : System
numBits long ///
Результат System

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

Constructs an OpenBitSet from an existing long[].
The first 64 bits are in long[0], with bit index 0 at the least significant bit, and bit index 63 at the most significant. Given a bit index, the word containing it is long[index/64], and it is at bit number index%64 within that word.

numWords are the number of elements in the array that contain set bits (non-zero longs). numWords should be <= bits.length, and any existing words in the array at position >= numWords should be zero.

public OpenBitSet ( long bits, int numWords ) : System
bits long
numWords int
Результат System

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

public Or ( OpenBitSet other ) : void
other OpenBitSet
Результат void

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

Remove all elements set in other. this = this AND_NOT other
public Remove ( OpenBitSet other ) : void
other OpenBitSet
Результат void

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

sets a bit, expanding the set size if necessary
public Set ( long index ) : void
index long
Результат void

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

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

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

Returns the current capacity of this set. Included for compatibility. This is *not* equal to Cardinality
public Size ( ) : long
Результат long

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

Lowers numWords, the number of words in use, by checking for trailing zero words.
public TrimTrailingZeros ( ) : void
Результат void

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

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

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

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

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

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

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

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

Описание свойств

internalbits защищенное свойство

protected long[] internalbits
Результат long[]

wlen защищенное свойство

protected int wlen
Результат int