Package com.sap.cds

Interface CdsVector


@Beta public interface CdsVector
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CdsVector.Factory
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the dimension of the vector space this vector is embedded in.
    float[]
    Returns the float[] representation of this vector.
    static CdsVector
    of(float[] vector)
    Returns a new CdsVector.
    static CdsVector
    of(String vector)
    Returns a new CdsVector.
    Returns the String representation of this vector.
  • Field Details

  • Method Details

    • of

      static CdsVector of(float[] vector)
      Returns a new CdsVector.
      Parameters:
      vector - the vector as float[]
      Returns:
      a new CdsVector
    • of

      static CdsVector of(String vector)
      Returns a new CdsVector.
      Parameters:
      vector - in String format "[0.42, -0.73, ...]"
      Returns:
      a new CdsVector
    • floats

      float[] floats()
      Returns the float[] representation of this vector.
      Returns:
      the float[] representation of this vector
    • dimension

      int dimension()
      Returns the dimension of the vector space this vector is embedded in.
      Returns:
      the dimension of the vector space
    • toString

      String toString()
      Returns the String representation of this vector.
      Overrides:
      toString in class Object
      Returns:
      the string representation of this vector