C# Class Lucene.Net.Util.OpenBitSet

Inheritance: Lucene.Net.Search.DocIdSet, System.ICloneable
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Свойство Type Description
internalbits long[]
wlen int

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
ExpandingWordNum ( long index ) : int

Method Details

And() public méthode

public And ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

AndNot() public méthode

public AndNot ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

AndNotCount() public static méthode

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
Résultat long

Bits2words() public static méthode

returns the number of 64 bit words it would take to hold numBits
public static Bits2words ( long numBits ) : int
numBits long
Résultat int

Capacity() public méthode

Returns the current capacity in bits (1 greater than the index of the last bit)
public Capacity ( ) : long
Résultat long

Cardinality() public méthode

public Cardinality ( ) : long
Résultat long

Clear() public méthode

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 ///
Résultat void

Clear() public méthode

clears a bit, allowing access beyond the current set size without changing the size.
public Clear ( long index ) : void
index long
Résultat void

Clear() public méthode

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 ///
Résultat void

Clone() public méthode

public Clone ( ) : Object
Résultat System.Object

EnsureCapacity() public méthode

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
Résultat void

EnsureCapacityWords() public méthode

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
Résultat void

Equals() public méthode

returns true if both sets have the same bits set
public Equals ( System o ) : bool
o System
Résultat bool

ExpandingWordNum() protected méthode

protected ExpandingWordNum ( long index ) : int
index long
Résultat int

FastClear() public méthode

clears a bit. The index should be less than the OpenBitSet size.
public FastClear ( int index ) : void
index int
Résultat void

FastClear() public méthode

clears a bit. The index should be less than the OpenBitSet size.
public FastClear ( long index ) : void
index long
Résultat void

FastFlip() public méthode

flips a bit. The index should be less than the OpenBitSet size.
public FastFlip ( int index ) : void
index int
Résultat void

FastFlip() public méthode

flips a bit. The index should be less than the OpenBitSet size.
public FastFlip ( long index ) : void
index long
Résultat void

FastGet() public méthode

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
Résultat bool

FastGet() public méthode

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
Résultat bool

FastSet() public méthode

Sets the bit at the specified index. The index should be less than the OpenBitSet size.
public FastSet ( int index ) : void
index int
Résultat void

FastSet() public méthode

Sets the bit at the specified index. The index should be less than the OpenBitSet size.
public FastSet ( long index ) : void
index long
Résultat void

Flip() public méthode

flips a bit, expanding the set size if necessary
public Flip ( long index ) : void
index long
Résultat void

Flip() public méthode

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 ///
Résultat void

FlipAndGet() public méthode

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
Résultat bool

FlipAndGet() public méthode

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
Résultat bool

Get() public méthode

Returns true or false for the specified bit index.
public Get ( int index ) : bool
index int
Résultat bool

Get() public méthode

Returns true or false for the specified bit index
public Get ( long index ) : bool
index long
Résultat bool

GetAndSet() public méthode

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
public GetAndSet ( int index ) : bool
index int
Résultat bool

GetAndSet() public méthode

Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
public GetAndSet ( long index ) : bool
index long
Résultat bool

GetBit() public méthode

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
Résultat int

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Intersect() public méthode

this = this AND other
public Intersect ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

IntersectionCount() public static méthode

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
Résultat long

Intersects() public méthode

returns true if the sets have any elements in common
public Intersects ( OpenBitSet other ) : bool
other OpenBitSet
Résultat bool

IsEmpty() public méthode

Returns true if there are no set bits
public IsEmpty ( ) : bool
Résultat bool

Iterator() public méthode

public Iterator ( ) : Lucene.Net.Search.DocIdSetIterator
Résultat Lucene.Net.Search.DocIdSetIterator

NextSetBit() public méthode

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
Résultat int

NextSetBit() public méthode

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
Résultat long

OpenBitSet() public méthode

public OpenBitSet ( ) : System
Résultat System

OpenBitSet() public méthode

Constructs an OpenBitSet large enough to hold numBits.
public OpenBitSet ( long numBits ) : System
numBits long ///
Résultat System

OpenBitSet() public méthode

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
Résultat System

Or() public méthode

public Or ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

Remove() public méthode

Remove all elements set in other. this = this AND_NOT other
public Remove ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

Set() public méthode

sets a bit, expanding the set size if necessary
public Set ( long index ) : void
index long
Résultat void

Set() public méthode

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 ///
Résultat void

Size() public méthode

Returns the current capacity of this set. Included for compatibility. This is *not* equal to Cardinality
public Size ( ) : long
Résultat long

TrimTrailingZeros() public méthode

Lowers numWords, the number of words in use, by checking for trailing zero words.
public TrimTrailingZeros ( ) : void
Résultat void

Union() public méthode

this = this OR other
public Union ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

UnionCount() public static méthode

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
Résultat long

Xor() public méthode

this = this XOR other
public Xor ( OpenBitSet other ) : void
other OpenBitSet
Résultat void

XorCount() public static méthode

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
Résultat long

Property Details

internalbits protected_oe property

protected long[] internalbits
Résultat long[]

wlen protected_oe property

protected int wlen
Résultat int