Package dev.frostlake.functions.scalar.vector


package dev.frostlake.functions.scalar.vector
  • Classes
    Class
    Description
    IS_VECTOR(x) — TRUE when the value is a VECTOR, FALSE for every other value VARIANT can hold.
    VECTOR_COSINE_SIMILARITY(v1, v2) — the cosine of the angle between two vectors, Σ(a·b) / (|a|·|b|), as a FLOAT (float64).
    Argument handling shared by the VECTOR functions.
    VECTOR_INNER_PRODUCT(v1, v2) — the dot product Σ(a·b), as a FLOAT (float64).
    VECTOR_L1_DISTANCE(v1, v2) — the Manhattan distance Σ|a−b|, as a FLOAT (float64).
    VECTOR_L2_DISTANCE(v1, v2) — the Euclidean distance sqrt(Σ(a−b)²), as a FLOAT (float64).
    VECTOR_NORMALIZE(v) — the unit vector v / |v|, always a VECTOR(FLOAT, n).
    VECTOR_TRUNC(v, n) (alias VECTOR_TRUNCATE) — the vector's FIRST n dimensions, keeping the element type.