Show / Hide Table of Contents

    Class MonotonicBlockPackedWriter

    A writer for large monotonically increasing sequences of positive s.

    The sequence is divided into fixed-size blocks and for each block, values are modeled after a linear function f: x → A × x + B. The block encodes deltas from the expected values computed from this function using as few bits as possible. Each block has an overhead between 6 and 14 bytes.

    Format:

    • <BLock>BlockCount
    • BlockCount: ⌈ ValueCount / BlockSize ⌉
    • Block: <Header, (Ints)>
    • Header: <B, A, BitsPerValue>
    • B: the B from f: x → A × x + B using a variable-length (WriteVInt64(Int64))
    • A: the A from f: x → A × x + B encoded using on 4 bytes (WriteVInt32(Int32))
    • BitsPerValue: a variable-length (WriteVInt32(Int32))
    • Ints: if BitsPerValue is 0, then there is nothing to read and all values perfectly match the result of the function. Otherwise, these are the zigzag-encoded packed (PackedInt32s) deltas from the expected value (computed from the function) using exaclty BitsPerValue bits per value

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    AbstractBlockPackedWriter
    MonotonicBlockPackedWriter
    Inherited Members
    AbstractBlockPackedWriter.m_out
    AbstractBlockPackedWriter.m_values
    AbstractBlockPackedWriter.m_blocks
    AbstractBlockPackedWriter.m_off
    AbstractBlockPackedWriter.m_ord
    AbstractBlockPackedWriter.m_finished
    AbstractBlockPackedWriter.Reset(DataOutput)
    AbstractBlockPackedWriter.Finish()
    AbstractBlockPackedWriter.Ord
    AbstractBlockPackedWriter.WriteValues(Int32)
    Namespace: Lucene.Net.Util.Packed
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class MonotonicBlockPackedWriter : AbstractBlockPackedWriter

    Constructors

    | Improve this Doc View Source

    MonotonicBlockPackedWriter(DataOutput, Int32)

    Sole constructor.

    Declaration
    public MonotonicBlockPackedWriter(DataOutput out, int blockSize)
    Parameters
    Type Name Description
    DataOutput out
    System.Int32 blockSize

    The number of values of a single block, must be a power of 2.

    Methods

    | Improve this Doc View Source

    Add(Int64)

    Declaration
    public override void Add(long l)
    Parameters
    Type Name Description
    System.Int64 l
    Overrides
    AbstractBlockPackedWriter.Add(Int64)
    | Improve this Doc View Source

    Flush()

    Declaration
    protected override void Flush()
    Overrides
    AbstractBlockPackedWriter.Flush()

    See Also

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