Class VectorFactory

java.lang.Object
io.qdrant.client.VectorFactory

public final class VectorFactory extends Object
Convenience methods for constructing Points.Vector
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.qdrant.client.grpc.Points.Vector
    multiVector(float[][] vectors)
    Creates a multi vector from a nested array of floats
    static io.qdrant.client.grpc.Points.Vector
    Creates a multi vector from a nested list of floats
    static io.qdrant.client.grpc.Points.Vector
    vector(float... values)
    Creates a vector from a list of floats
    static io.qdrant.client.grpc.Points.Vector
    vector(List<Float> values)
    Creates a vector from a list of floats
    static io.qdrant.client.grpc.Points.Vector
    vector(List<Float> vector, List<Integer> indices)
    Creates a sparse vector from a list of floats and integers as indices

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • vector

      public static io.qdrant.client.grpc.Points.Vector vector(List<Float> values)
      Creates a vector from a list of floats
      Parameters:
      values - A map of vector names to values
      Returns:
      A new instance of Points.Vector
    • vector

      public static io.qdrant.client.grpc.Points.Vector vector(float... values)
      Creates a vector from a list of floats
      Parameters:
      values - A list of values
      Returns:
      A new instance of Points.Vector
    • vector

      public static io.qdrant.client.grpc.Points.Vector vector(List<Float> vector, List<Integer> indices)
      Creates a sparse vector from a list of floats and integers as indices
      Parameters:
      vector - The list of floats representing the vector.
      indices - The list of integers representing the indices.
      Returns:
      A new instance of Points.Vector
    • multiVector

      public static io.qdrant.client.grpc.Points.Vector multiVector(List<List<Float>> vectors)
      Creates a multi vector from a nested list of floats
      Parameters:
      vectors - The nested list of floats representing the multi vector.
      Returns:
      A new instance of Points.Vector
    • multiVector

      public static io.qdrant.client.grpc.Points.Vector multiVector(float[][] vectors)
      Creates a multi vector from a nested array of floats
      Parameters:
      vectors - The nested array of floats representing the multi vector.
      Returns:
      A new instance of Points.Vector