l1_distance()¶
当前 MatrixOne 运行时不支持
l1_distance()SQL 函数。
曼哈顿(L1)距离是两个向量对应元素之差的绝对值之和:
L1(a, b) = sum(abs(a[i] - b[i]))
不要在应用查询中使用 SELECT l1_distance(...);当前运行时会返回 not supported: function or operator 'l1_distance'。l1_norm() 计算单个向量的范数,并非两个向量的距离。可执行的最近邻示例请使用 l2_distance()。