Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save juarezjuniorgithub/38f3cfbab0f8646f33b807c6809bf345 to your computer and use it in GitHub Desktop.
Save juarezjuniorgithub/38f3cfbab0f8646f33b807c6809bf345 to your computer and use it in GitHub Desktop.
Functions - Hibernate Vector module and Oracle AI Vector Search
Function Specification
cosine_distance() Computes the cosine distance between two vectors. It maps to vector_distance(v1, v2, COSINE) function of Oracle AI Vector Search.
l1_distance() Alias for the taxicab_distance() function below.
taxicab_distance() Computes the taxicab distance between two vectors. It maps aps to vector_distance(v1, v2, MANHATTAN) function for Oracle AI Vector Search.
l2_distance() Alias for the euclidean_distance() function below.
euclidean_distance() Computes the euclidean distance between two vectors. It maps to vector_distance(v1, v2, EUCLIDEAN) function of Oracle AI Vector Search.
inner_product() Computes the inner product between two vectors. It maps to the vector_distance(v1, v2, DOT) function for Oracle AI Vector Search.
negative_inner_product() Computes the negative inner product. It maps to the -1 * vector_distance(v1, v2, DOT) function for Oracle AI Vector Search.
hamming_distance() Computes the hamming distance between two vectors. It maps to vector_distance(v1, v2, HAMMING) function for Oracle AI Vector Search.
vector_dims() Determines the dimensions of a vector.
vector_norm() Computes the Euclidean norm of a vector.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment