Show / Hide Table of Contents

    Class BitArrayExtensions

    This class provides supporting methods of java.util.BitSet that are not present in System.Collections.BitArray.

    Inheritance
    System.Object
    BitArrayExtensions
    Namespace: Lucene.Net.Support
    Assembly: Lucene.Net.dll
    Syntax
    public static class BitArrayExtensions : object

    Methods

    | Improve this Doc View Source

    And_UnequalLengths(BitArray, BitArray)

    Declaration
    public static BitArray And_UnequalLengths(this BitArray bitsA, BitArray bitsB)
    Parameters
    Type Name Description
    BitArray bitsA
    BitArray bitsB
    Returns
    Type Description
    BitArray
    | Improve this Doc View Source

    AndNot(BitArray, BitArray)

    Declaration
    public static void AndNot(this BitArray bitsA, BitArray bitsB)
    Parameters
    Type Name Description
    BitArray bitsA
    BitArray bitsB
    | Improve this Doc View Source

    BitWiseEquals(BitArray, BitArray)

    Declaration
    public static bool BitWiseEquals(this BitArray bitsA, BitArray bitsB)
    Parameters
    Type Name Description
    BitArray bitsA
    BitArray bitsB
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Cardinality(BitArray)

    Returns the number of bits set to true in this .

    Declaration
    public static int Cardinality(this BitArray bits)
    Parameters
    Type Name Description
    BitArray bits

    This .

    Returns
    Type Description
    System.Int32

    The number of bits set to true in this .

    | Improve this Doc View Source

    Clear(BitArray)

    Sets all bits to false

    Declaration
    public static void Clear(this BitArray bits)
    Parameters
    Type Name Description
    BitArray bits

    The BitArray object.

    | Improve this Doc View Source

    Clear(BitArray, Int32)

    Sets the bit at the given index to false.

    Declaration
    public static void Clear(this BitArray bits, int index)
    Parameters
    Type Name Description
    BitArray bits

    The BitArray object.

    System.Int32 index

    The position to set to false.

    | Improve this Doc View Source

    Clear(BitArray, Int32, Int32)

    Declaration
    public static void Clear(this BitArray bits, int startIdx, int endIdx)
    Parameters
    Type Name Description
    BitArray bits
    System.Int32 startIdx
    System.Int32 endIdx
    | Improve this Doc View Source

    Equal(BitArray, OpenBitSet)

    Declaration
    public static bool Equal(this BitArray a, OpenBitSet b)
    Parameters
    Type Name Description
    BitArray a
    OpenBitSet b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Flip(BitArray, Int32, Int32)

    Declaration
    public static void Flip(this BitArray bits, int startIdx, int endIdx)
    Parameters
    Type Name Description
    BitArray bits
    System.Int32 startIdx
    System.Int32 endIdx
    | Improve this Doc View Source

    NextClearBit(BitArray, Int32)

    Returns the next un-set bit at or after index, or -1 if no such bit exists.

    Declaration
    public static int NextClearBit(this BitArray bitArray, int index)
    Parameters
    Type Name Description
    BitArray bitArray
    System.Int32 index

    the index of bit array at which to start checking

    Returns
    Type Description
    System.Int32

    the next set bit or -1

    | Improve this Doc View Source

    NextSetBit(BitArray, Int32)

    Returns the next set bit at or after index, or -1 if no such bit exists.

    Declaration
    public static int NextSetBit(this BitArray bitArray, int index)
    Parameters
    Type Name Description
    BitArray bitArray
    System.Int32 index

    the index of bit array at which to start checking

    Returns
    Type Description
    System.Int32

    the next set bit or -1

    | Improve this Doc View Source

    Or_UnequalLengths(BitArray, BitArray)

    Declaration
    public static BitArray Or_UnequalLengths(this BitArray bitsA, BitArray bitsB)
    Parameters
    Type Name Description
    BitArray bitsA
    BitArray bitsB
    Returns
    Type Description
    BitArray
    | Improve this Doc View Source

    PrevSetBit(BitArray, Int32)

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

    SafeGet(BitArray, Int32)

    Declaration
    public static bool SafeGet(this BitArray a, int loc)
    Parameters
    Type Name Description
    BitArray a
    System.Int32 loc
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SafeSet(BitArray, Int32, Boolean)

    Declaration
    public static void SafeSet(this BitArray a, int loc, bool value)
    Parameters
    Type Name Description
    BitArray a
    System.Int32 loc
    System.Boolean value
    | Improve this Doc View Source

    Set(BitArray, Int32)

    Sets the bit at the given index to true.

    Declaration
    public static void Set(this BitArray bits, int index)
    Parameters
    Type Name Description
    BitArray bits

    The BitArray object.

    System.Int32 index

    The position to set to true.

    | Improve this Doc View Source

    Set(BitArray, Int32, Int32)

    Declaration
    public static void Set(this BitArray bits, int startIdx, int endIdx)
    Parameters
    Type Name Description
    BitArray bits
    System.Int32 startIdx
    System.Int32 endIdx
    | Improve this Doc View Source

    Set(BitArray, Int32, Int32, Boolean)

    Sets the bit at the given index range to true.

    Declaration
    public static void Set(this BitArray bits, int fromIndex, int toIndex, bool value)
    Parameters
    Type Name Description
    BitArray bits

    The BitArray object.

    System.Int32 fromIndex

    The start of the range to set(inclusive)

    System.Int32 toIndex

    The end of the range to set(exclusive)

    System.Boolean value

    the value to set to the range

    | Improve this Doc View Source

    Xor_UnequalLengths(BitArray, BitArray)

    Declaration
    public static BitArray Xor_UnequalLengths(this BitArray bitsA, BitArray bitsB)
    Parameters
    Type Name Description
    BitArray bitsA
    BitArray bitsB
    Returns
    Type Description
    BitArray
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)