Class HeapDoubleVector

All Implemented Interfaces:
Serializable, ColumnVector, DoubleColumnVector, WritableColumnVector, WritableDoubleVector

@Internal public class HeapDoubleVector extends AbstractHeapVector implements WritableDoubleVector
This class represents a nullable double precision floating point column vector. This class will be used for operations on all floating point double types and as such will use a 64-bit double value to hold the biggest possible value.
See Also:
  • Field Details

    • vector

      public double[] vector
  • Constructor Details

    • HeapDoubleVector

      public HeapDoubleVector(int len)
      Don't use this except for testing purposes.
      Parameters:
      len - the number of rows
  • Method Details

    • getDouble

      public double getDouble(int i)
      Specified by:
      getDouble in interface DoubleColumnVector
    • setDouble

      public void setDouble(int i, double value)
      Description copied from interface: WritableDoubleVector
      Set double at rowId with the provided value.
      Specified by:
      setDouble in interface WritableDoubleVector
    • setDoublesFromBinary

      public void setDoublesFromBinary(int rowId, int count, byte[] src, int srcIndex)
      Description copied from interface: WritableDoubleVector
      Set doubles from binary, need use UNSAFE to copy.
      Specified by:
      setDoublesFromBinary in interface WritableDoubleVector
      Parameters:
      rowId - set start rowId.
      count - count for double, so the bytes size is count * 8.
      src - source binary.
      srcIndex - source binary index, it is the index for byte index.
    • fill

      public void fill(double value)
      Description copied from interface: WritableDoubleVector
      Fill the column vector with the provided value.
      Specified by:
      fill in interface WritableDoubleVector