Class FloatVector

All Implemented Interfaces:
Serializable, ValueVector

public class FloatVector extends PrimitiveVector
A float vector.
See Also:
  • Constructor Details

    • FloatVector

      public FloatVector(String name, float[] vector)
      Constructor.
      Parameters:
      name - the name of vector.
      vector - the elements of vector.
    • FloatVector

      public FloatVector(StructField field, float[] vector)
      Constructor.
      Parameters:
      field - the struct field of vector.
      vector - the elements of vector.
  • Method Details

    • fillna

      public void fillna(float value)
      Fills NaN/Inf values with the specified value.
      Parameters:
      value - the value to replace NAs.
    • size

      public int size()
      Description copied from interface: ValueVector
      Returns the number of elements in the vector.
      Returns:
      the number of elements in the vector.
    • withName

      public FloatVector withName(String name)
      Description copied from interface: ValueVector
      Returns the vector with the new name.
      Parameters:
      name - the new name.
      Returns:
      the vector with the new name.
    • doubleStream

      public DoubleStream doubleStream()
      Description copied from interface: ValueVector
      Returns a DoubleStream consisting of the elements of this vector, converted to double.
      Returns:
      a DoubleStream consisting of the elements of this vector.
    • set

      public void set(int i, Object value)
      Description copied from interface: ValueVector
      Sets the value at position i.
      Parameters:
      i - the index.
      value - the new value.
    • get

      public FloatVector get(Index index)
      Description copied from interface: ValueVector
      Returns a new vector with selected entries.
      Parameters:
      index - the index of selected entries.
      Returns:
      the new vector of selected entries.
    • isNullAt

      public boolean isNullAt(int i)
      Description copied from interface: ValueVector
      Returns true if the value at the given index is null/missing.
      Specified by:
      isNullAt in interface ValueVector
      Overrides:
      isNullAt in class PrimitiveVector
      Parameters:
      i - the index.
      Returns:
      true if the value at the given index is null/missing.
    • get

      public Float get(int i)
      Description copied from interface: ValueVector
      Returns the value at position i, which may be null.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getFloat

      public float getFloat(int i)
      Description copied from interface: ValueVector
      Returns the float value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getBoolean

      public boolean getBoolean(int i)
      Description copied from interface: ValueVector
      Returns the boolean value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getChar

      public char getChar(int i)
      Description copied from interface: ValueVector
      Returns the character value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getByte

      public byte getByte(int i)
      Description copied from interface: ValueVector
      Returns the byte value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getShort

      public short getShort(int i)
      Description copied from interface: ValueVector
      Returns the short value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getInt

      public int getInt(int i)
      Description copied from interface: ValueVector
      Returns the integer value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getLong

      public long getLong(int i)
      Description copied from interface: ValueVector
      Returns the long value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.
    • getDouble

      public double getDouble(int i)
      Description copied from interface: ValueVector
      Returns the double value at position i.
      Parameters:
      i - the index.
      Returns:
      the value.