C# Class 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
ファイルを表示 Open project: paulirwin/lucene.net Class Usage Examples

Public Methods

Method Description
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

Method Details

And() public method

this = this AND other
public And ( LongBitSet other ) : void
other LongBitSet
return void

AndNot() public method

this = this AND NOT other
public AndNot ( LongBitSet other ) : void
other LongBitSet
return void

Bits2words() public static method

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

Cardinality() public method

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
return long

Clear() public method

public Clear ( long index ) : void
index long
return void

Clear() public method

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
return void

Clone() public method

public Clone ( ) : LongBitSet
return LongBitSet

EnsureCapacity() public static method

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
return LongBitSet

Equals() public method

returns true if both sets have the same bits set
public Equals ( object o ) : bool
o object
return bool

Flip() public method

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
return void

Get() public method

public Get ( long index ) : bool
index long
return bool

GetAndClear() public method

public GetAndClear ( long index ) : bool
index long
return bool

GetAndSet() public method

public GetAndSet ( long index ) : bool
index long
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

Intersects() public method

returns true if the sets have any elements in common
public Intersects ( LongBitSet other ) : bool
other LongBitSet
return bool

Length() public method

Returns the number of bits stored in this bitset.
public Length ( ) : long
return long

LongBitSet() public method

public LongBitSet ( long numBits ) : Lucene.Net.Support
numBits long
return Lucene.Net.Support

LongBitSet() public method

public LongBitSet ( long storedBits, long numBits ) : Lucene.Net.Support
storedBits long
numBits long
return Lucene.Net.Support

NextSetBit() public method

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
return long

Or() public method

this = this OR other
public Or ( LongBitSet other ) : void
other LongBitSet
return void

PrevSetBit() public method

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
return long

Set() public method

public Set ( long index ) : void
index long
return void

Set() public method

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
return void

Xor() public method

this = this XOR other
public Xor ( LongBitSet other ) : void
other LongBitSet
return void