Class VectorUtil

java.lang.Object
io.qdrant.client.utils.VectorUtil

public class VectorUtil extends Object
Utility class for working with vector data.
  • Constructor Details

    • VectorUtil

      public VectorUtil()
  • Method Details

    • toVector

      public static Points.Vector toVector(List<Float> vector)
      Creates a vector from a list of floats.
      Parameters:
      vector - The list of floats representing the vector.
      Returns:
      The created vector.
    • toVector

      public static Points.Vector toVector(float... vector)
      Creates a vector from an array of floats.
      Parameters:
      vector - The array of floats representing the vector.
      Returns:
      The created vector.
    • namedVector

      public static Points.NamedVectors namedVector(String name, List<Float> vector)
      Creates a named vector from a list of floats.
      Parameters:
      name - The name of the vector.
      vector - The list of floats representing the vector.
      Returns:
      The created named vector.
    • namedVector

      public static Points.NamedVectors namedVector(String name, float... vector)
      Creates a named vector from an array of floats.
      Parameters:
      name - The name of the vector.
      vector - The array of floats representing the vector.
      Returns:
      The created named vector.
    • namedVectors

      public static Points.NamedVectors namedVectors(Map<String,Points.Vector> vectors)
      Creates named vectors from a map of vector names to vectors.
      Parameters:
      vectors - The map of vector names to vectors.
      Returns:
      The created named vectors.
    • pointVectors

      public static Points.PointVectors pointVectors(String id, String name, float... vector)
      Creates point vectors from an ID, name, and an array of floats.
      Parameters:
      id - The ID of the point vectors.
      name - The name of the point vectors.
      vector - The array of floats representing the point vectors.
      Returns:
      The created point vectors.