Interface DoubleArray

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

public interface DoubleArray extends BigArray, Writeable
Abstraction of an array of double values.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

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

    NULL_ACCOUNTABLE
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fill(long fromIndex, long toIndex, double value)
    Fill slots between fromIndex inclusive to toIndex exclusive with value.
    void
    Alternative of readFrom(StreamInput) where the written bytes are loaded into an existing DoubleArray
    double
    get(long index)
    Get an element given its index.
    double
    increment(long index, double inc)
    Increment value at the given index by inc and return the value.
     
    void
    set(long index, byte[] buf, int offset, int len)
    Bulk set.
    void
    set(long index, double value)
    Set a value at the given index.

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

    getChildResources, ramBytesUsed

    Methods inherited from interface org.elasticsearch.common.util.BigArray

    size

    Methods inherited from interface org.elasticsearch.core.Releasable

    close

    Methods inherited from interface org.elasticsearch.common.io.stream.Writeable

    writeTo
  • Method Details

    • readFrom

      static DoubleArray readFrom(StreamInput in) throws IOException
      Throws:
      IOException
    • get

      double get(long index)
      Get an element given its index.
    • set

      void set(long index, double value)
      Set a value at the given index.
    • increment

      double increment(long index, double inc)
      Increment value at the given index by inc and return the value.
    • fill

      void fill(long fromIndex, long toIndex, double value)
      Fill slots between fromIndex inclusive to toIndex exclusive with value.
    • fillWith

      void fillWith(StreamInput in) throws IOException
      Alternative of readFrom(StreamInput) where the written bytes are loaded into an existing DoubleArray
      Throws:
      IOException
    • set

      void set(long index, byte[] buf, int offset, int len)
      Bulk set.