Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PackedInt32s.Reader

    A read-only random access array of positive integers.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    NumericDocValues
    PackedInt32s.Reader
    PackedInt32s.Mutable
    PackedInt32s.NullReader
    Inherited Members
    NumericDocValues.Get(int)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util.Packed
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class PackedInt32s.Reader : NumericDocValues

    Properties

    BitsPerValue

    A read-only random access array of positive integers.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public abstract int BitsPerValue { get; }
    Property Value
    Type Description
    int

    The number of bits used to store any given value. Note: this does not imply that memory usage is bitsPerValue * #values as implementations are free to use non-space-optimal packing of bits.

    Count

    The number of values.

    NOTE: This was size() in Lucene.
    Declaration
    public abstract int Count { get; }
    Property Value
    Type Description
    int

    HasArray

    Returns true if this implementation is backed by a native .NET array.

    Declaration
    public virtual bool HasArray { get; }
    Property Value
    Type Description
    bool
    See Also
    GetArray()

    Methods

    Get(int, long[], int, int)

    Bulk get: read at least one and at most len longs starting from index into arr[off:off+len] and return the actual number of values that have been read.

    Declaration
    public virtual int Get(int index, long[] arr, int off, int len)
    Parameters
    Type Name Description
    int index
    long[] arr
    int off
    int len
    Returns
    Type Description
    int

    GetArray()

    Expert: if the bit-width of this reader matches one of .NET's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null. Note that when accessing the array you must upgrade the type (bitwise AND with all ones), to interpret the full value as unsigned. Ie, bytes[idx]&0xFF, shorts[idx]&0xFFFF, etc.

    Declaration
    public virtual object GetArray()
    Returns
    Type Description
    object

    RamBytesUsed()

    Return the in-memory size in bytes.

    Declaration
    public abstract long RamBytesUsed()
    Returns
    Type Description
    long
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.