Class Vector

java.lang.Object
io.r2dbc.postgresql.codec.Vector

public class Vector extends Object
Value object that maps to the vector datatype provided by Postgres pgvector.
Since:
1.0.3
  • Method Details

    • empty

      public static Vector empty()
      Create a new empty Vector.
      Returns:
      the empty Vector object
    • of

      public static Vector of(float... vec)
      Create a new Vector given vector points.
      Parameters:
      vec - the vector values
      Returns:
      the new Vector object
    • of

      public static Vector of(Collection<? extends Number> vec)
      Create a new Vector given vector points.
      Parameters:
      vec - the vector values
      Returns:
      the new Vector object
    • getVector

      public float[] getVector()
      Return the vector values.
      Returns:
      the vector values.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object