Interface TDigestIntArray

All Superinterfaces:
org.apache.lucene.util.Accountable, AutoCloseable, Closeable, Releasable

public interface TDigestIntArray extends Releasable, org.apache.lucene.util.Accountable
Minimal interface for IntArray-like classes used within TDigest.
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    get(int index)
     
    void
    resize(int newSize)
    Resizes the array.
    void
    set(int index, int value)
     
    default void
    set(int index, TDigestIntArray buf, int offset, int len)
    Copies len elements from buf to this array.
    int
     

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources, ramBytesUsed

    Methods inherited from interface org.elasticsearch.core.Releasable

    close
  • Method Details

    • size

      int size()
    • get

      int get(int index)
    • set

      void set(int index, int value)
    • resize

      void resize(int newSize)
      Resizes the array. If the new size is bigger than the current size, the new elements are set to 0.
    • set

      default void set(int index, TDigestIntArray buf, int offset, int len)
      Copies len elements from buf to this array.

      As this method will be used to insert elements from itself in an insertion sort, the copy must be made in reverse order, from offset+len-1 to offset.