Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PackedInt32s.Format

    A format to write packed ints.

    Note

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

    Inheritance
    object
    PackedInt32s.Format
    Inherited Members
    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 class PackedInt32s.Format

    Fields

    PACKED

    Compact format, all bits are written contiguously.

    Declaration
    public static readonly PackedInt32s.Format PACKED
    Field Value
    Type Description
    PackedInt32s.Format

    PACKED_SINGLE_BLOCK

    A format that may insert padding bits to improve encoding and decoding speed. Since this format doesn't support all possible bits per value, you should never use it directly, but rather use FastestFormatAndBits(int, int, float) to find the format that best suits your needs.

    Declaration
    public static readonly PackedInt32s.Format PACKED_SINGLE_BLOCK
    Field Value
    Type Description
    PackedInt32s.Format

    Properties

    Id

    Returns the ID of the format.

    Declaration
    public int Id { get; }
    Property Value
    Type Description
    int

    Values

    A format to write packed ints.

    Note

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

    Declaration
    public static IEnumerable<PackedInt32s.Format> Values { get; }
    Property Value
    Type Description
    IEnumerable<PackedInt32s.Format>

    Methods

    ById(int)

    Get a format according to its ID.

    Declaration
    public static PackedInt32s.Format ById(int id)
    Parameters
    Type Name Description
    int id
    Returns
    Type Description
    PackedInt32s.Format

    ByteCount(int, int, int)

    Computes how many byte blocks are needed to store valueCount values of size bitsPerValue.

    Declaration
    public virtual long ByteCount(int packedIntsVersion, int valueCount, int bitsPerValue)
    Parameters
    Type Name Description
    int packedIntsVersion
    int valueCount
    int bitsPerValue
    Returns
    Type Description
    long

    Int64Count(int, int, int)

    Computes how many long blocks are needed to store valueCount values of size bitsPerValue.

    NOTE: This was longCount() in Lucene.
    Declaration
    public virtual int Int64Count(int packedIntsVersion, int valueCount, int bitsPerValue)
    Parameters
    Type Name Description
    int packedIntsVersion
    int valueCount
    int bitsPerValue
    Returns
    Type Description
    int

    IsSupported(int)

    Tests whether the provided number of bits per value is supported by the format.

    Declaration
    public virtual bool IsSupported(int bitsPerValue)
    Parameters
    Type Name Description
    int bitsPerValue
    Returns
    Type Description
    bool

    OverheadPerValue(int)

    Returns the overhead per value, in bits.

    Declaration
    public virtual float OverheadPerValue(int bitsPerValue)
    Parameters
    Type Name Description
    int bitsPerValue
    Returns
    Type Description
    float

    OverheadRatio(int)

    Returns the overhead ratio (overhead per value / bits per value).

    Declaration
    public virtual float OverheadRatio(int bitsPerValue)
    Parameters
    Type Name Description
    int bitsPerValue
    Returns
    Type Description
    float
    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.