Class HeapFloatVector

All Implemented Interfaces:
Serializable, ColumnVector, FloatColumnVector, WritableColumnVector, WritableFloatVector

@Internal public class HeapFloatVector extends AbstractHeapVector implements WritableFloatVector
This class represents a nullable double precision floating point column vector. This class will be used for operations on all floating point float types.
See Also:
  • Field Details

    • vector

      public float[] vector
  • Constructor Details

    • HeapFloatVector

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

    • getFloat

      public float getFloat(int i)
      Specified by:
      getFloat in interface FloatColumnVector
    • setFloat

      public void setFloat(int i, float value)
      Description copied from interface: WritableFloatVector
      Set float at rowId with the provided value.
      Specified by:
      setFloat in interface WritableFloatVector
    • setFloatsFromBinary

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

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