Show / Hide Table of Contents

    Class 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 Int64BitSet.

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    DocIdSet
    FixedBitSet
    Implements
    IBits
    Inherited Members
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<Boolean>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>, Func<Boolean>)
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class FixedBitSet : DocIdSet, IBits

    Constructors

    | Improve this Doc View Source

    FixedBitSet(Int32)

    Declaration
    public FixedBitSet(int numBits)
    Parameters
    Type Name Description
    System.Int32 numBits
    | Improve this Doc View Source

    FixedBitSet(Int64[], Int32)

    Declaration
    public FixedBitSet(long[] storedBits, int numBits)
    Parameters
    Type Name Description
    System.Int64[] storedBits
    System.Int32 numBits

    Properties

    | Improve this Doc View Source

    Bits

    Declaration
    public override IBits Bits { get; }
    Property Value
    Type Description
    IBits
    Overrides
    DocIdSet.Bits
    | Improve this Doc View Source

    IsCacheable

    This DocIdSet implementation is cacheable.

    Declaration
    public override bool IsCacheable { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    DocIdSet.IsCacheable
    | Improve this Doc View Source

    Length

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    And(DocIdSetIterator)

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

    Declaration
    public void And(DocIdSetIterator iter)
    Parameters
    Type Name Description
    DocIdSetIterator iter
    | Improve this Doc View Source

    And(FixedBitSet)

    this = this AND other

    Declaration
    public void And(FixedBitSet other)
    Parameters
    Type Name Description
    FixedBitSet other
    | Improve this Doc View Source

    AndNot(DocIdSetIterator)

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

    Declaration
    public void AndNot(DocIdSetIterator iter)
    Parameters
    Type Name Description
    DocIdSetIterator iter
    | Improve this Doc View Source

    AndNot(FixedBitSet)

    this = this AND NOT other

    Declaration
    public void AndNot(FixedBitSet other)
    Parameters
    Type Name Description
    FixedBitSet other
    | Improve this Doc View Source

    AndNotCount(FixedBitSet, FixedBitSet)

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

    Declaration
    public static long AndNotCount(FixedBitSet a, FixedBitSet b)
    Parameters
    Type Name Description
    FixedBitSet a
    FixedBitSet b
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    Bits2words(Int32)

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

    Declaration
    public static int Bits2words(int numBits)
    Parameters
    Type Name Description
    System.Int32 numBits
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Cardinality()

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

    Declaration
    public int Cardinality()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Clear(Int32)

    Declaration
    public void Clear(int index)
    Parameters
    Type Name Description
    System.Int32 index
    | Improve this Doc View Source

    Clear(Int32, Int32)

    Clears a range of bits.

    Declaration
    public void Clear(int startIndex, int endIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    Lower index

    System.Int32 endIndex

    One-past the last bit to clear

    | Improve this Doc View Source

    Clone()

    Declaration
    public FixedBitSet Clone()
    Returns
    Type Description
    FixedBitSet
    | Improve this Doc View Source

    EnsureCapacity(FixedBitSet, Int32)

    If the given FixedBitSet is large enough to hold 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 long[] of the given bits if possible. Also, calling Length on the returned bits may return a value greater than numBits.

    Declaration
    public static FixedBitSet EnsureCapacity(FixedBitSet bits, int numBits)
    Parameters
    Type Name Description
    FixedBitSet bits
    System.Int32 numBits
    Returns
    Type Description
    FixedBitSet
    | Improve this Doc View Source

    Equals(Object)

    Returns true if both sets have the same bits set

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Flip(Int32, Int32)

    Flips a range of bits

    Declaration
    public void Flip(int startIndex, int endIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    Lower index

    System.Int32 endIndex

    One-past the last bit to flip

    | Improve this Doc View Source

    Get(Int32)

    Declaration
    public bool Get(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetAndClear(Int32)

    Declaration
    public bool GetAndClear(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetAndSet(Int32)

    Declaration
    public bool GetAndSet(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetBits()

    Expert.

    Declaration
    public long[] GetBits()
    Returns
    Type Description
    System.Int64[]
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetIterator()

    Declaration
    public override DocIdSetIterator GetIterator()
    Returns
    Type Description
    DocIdSetIterator
    Overrides
    DocIdSet.GetIterator()
    | Improve this Doc View Source

    IntersectionCount(FixedBitSet, FixedBitSet)

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

    Declaration
    public static long IntersectionCount(FixedBitSet a, FixedBitSet b)
    Parameters
    Type Name Description
    FixedBitSet a
    FixedBitSet b
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    Intersects(FixedBitSet)

    Returns true if the sets have any elements in common

    Declaration
    public bool Intersects(FixedBitSet other)
    Parameters
    Type Name Description
    FixedBitSet other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    NextSetBit(Int32)

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

    Declaration
    public int NextSetBit(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Or(DocIdSetIterator)

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

    Declaration
    public void Or(DocIdSetIterator iter)
    Parameters
    Type Name Description
    DocIdSetIterator iter
    | Improve this Doc View Source

    Or(FixedBitSet)

    this = this OR other

    Declaration
    public void Or(FixedBitSet other)
    Parameters
    Type Name Description
    FixedBitSet other
    | Improve this Doc View Source

    PrevSetBit(Int32)

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

    Declaration
    public int PrevSetBit(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    Set(Int32)

    Declaration
    public void Set(int index)
    Parameters
    Type Name Description
    System.Int32 index
    | Improve this Doc View Source

    Set(Int32, Int32)

    Sets a range of bits

    Declaration
    public void Set(int startIndex, int endIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    Lower index

    System.Int32 endIndex

    One-past the last bit to set

    | Improve this Doc View Source

    UnionCount(FixedBitSet, FixedBitSet)

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

    Declaration
    public static long UnionCount(FixedBitSet a, FixedBitSet b)
    Parameters
    Type Name Description
    FixedBitSet a
    FixedBitSet b
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    Xor(DocIdSetIterator)

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

    Declaration
    public void Xor(DocIdSetIterator iter)
    Parameters
    Type Name Description
    DocIdSetIterator iter
    | Improve this Doc View Source

    Xor(FixedBitSet)

    this = this XOR other

    Declaration
    public void Xor(FixedBitSet other)
    Parameters
    Type Name Description
    FixedBitSet other

    Implements

    IBits
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)