Package dev.frostlake.functions.scalar.vector
package dev.frostlake.functions.scalar.vector
-
ClassesClassDescription
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 distancesqrt(Σ(a−b)²), as a FLOAT (float64).VECTOR_NORMALIZE(v)— the unit vectorv / |v|, always aVECTOR(FLOAT, n).VECTOR_TRUNC(v, n)(aliasVECTOR_TRUNCATE) — the vector's FIRSTndimensions, keeping the element type.