Class PrimitiveVector

java.lang.Object
smile.data.vector.AbstractVector
smile.data.vector.PrimitiveVector
All Implemented Interfaces:
Serializable, ValueVector
Direct Known Subclasses:
BooleanVector, ByteVector, CharVector, DoubleVector, FloatVector, IntVector, LongVector, ShortVector

public abstract class PrimitiveVector extends AbstractVector
Abstract base class implementation of ValueVector interface.
See Also:
  • Constructor Details

    • PrimitiveVector

      public PrimitiveVector(StructField field)
      Constructor.
      Parameters:
      field - The struct field of the vector.
  • Method Details

    • mean

      public double mean()
      Returns the mean.
    • stdev

      public double stdev()
      Returns the standard deviation.
    • min

      public double min()
      Returns the minimal value.
    • max

      public double max()
      Returns the maximal value.
    • median

      public double median()
      Returns the median.
    • q1

      public double q1()
      Returns the 25% quantile.
    • q3

      public double q3()
      Returns the 75% quantile.
    • isNullable

      public boolean isNullable()
      Description copied from interface: ValueVector
      Returns true if the values of vector may be null.
      Returns:
      true if the values of vector may be null.
    • isNullAt

      public boolean isNullAt(int i)
      Description copied from interface: ValueVector
      Returns true if the value at the given index is null/missing.
      Parameters:
      i - the index.
      Returns:
      true if the value at the given index is null/missing.
    • getNullCount

      public int getNullCount()
      Description copied from interface: ValueVector
      Returns the number of null/missing values in this vector.
      Returns:
      the number of null/missing values in this vector.