Class Embedding


  • public class Embedding
    extends Object
    Represents a strongly typed vector of numeric data.
    • Constructor Detail

      • Embedding

        public Embedding()
        Initializes a new instance of the Embedding class.
      • Embedding

        public Embedding​(@Nonnull
                         List<Float> vector)
        Initializes a new instance of the Embedding class that contains numeric elements copied from the specified collection
        Parameters:
        vector - The collection whose elements are copied to the new Embedding
      • Embedding

        public Embedding​(@Nonnull
                         float[] vector)
        Initializes a new instance of the Embedding class that contains numeric elements copied from the specified array
        Parameters:
        vector - The array whose elements are copied to the new Embedding
    • Method Detail

      • empty

        public static Embedding empty()
        Returns an empty Embedding instance.
        Returns:
        An empty Embedding instance.
      • getVector

        public List<Float> getVector()
        Return the embedding vector as a read-only list.
        Returns:
        The embedding vector as a read-only list.