2021-08-20 14:06:57 +00:00
|
|
|
SELECT tupleHammingDistance(tuple(1), tuple(1));
|
|
|
|
SELECT tupleHammingDistance(tuple(1, 3), tuple(1, 2));
|
|
|
|
|
|
|
|
SELECT tuple(1, 2) + tuple(3, 4) * tuple(5, 1) - tuple(6, 3);
|
|
|
|
SELECT vectorDifference(tuplePlus(tuple(1, 2), tuple(3, 4)), tuple(5, 6));
|
|
|
|
SELECT tupleMinus(vectorSum(tupleMultiply(tuple(1, 2), tuple(3, 4)), tuple(5, 6)), tuple(31, 41));
|
2021-08-23 13:41:20 +00:00
|
|
|
|
|
|
|
SELECT tupleDivide(tuple(5, 8, 11),tuple(-2, 2, 4));
|
|
|
|
SELECT tupleNegate(tuple(1, 0, 3.5));
|
2021-08-25 14:02:04 +00:00
|
|
|
|
|
|
|
SELECT dotProduct(tuple(1, 2, 3), tuple(2, 3, 4));
|
|
|
|
SELECT scalarProduct(tuple(-1, 2, 3.002), tuple(2, 3.4, 4));
|
2021-08-25 14:56:31 +00:00
|
|
|
|
2021-08-26 18:17:44 +00:00
|
|
|
SELECT L1Norm(tuple(-1, 2, -3));
|
|
|
|
SELECT L1Norm(tuple(-1, 2.5, -3.6));
|
2021-08-25 15:44:35 +00:00
|
|
|
SELECT L2Norm(tuple(1, 1));
|
|
|
|
SELECT L2Norm(tuple(3, 4));
|
2021-08-26 12:34:46 +00:00
|
|
|
|
|
|
|
SELECT max2(1, 1.5);
|
|
|
|
SELECT min2(-1, -3);
|
|
|
|
SELECT LinfNorm(tuple(1, -2.3, 1.7));
|
2021-08-26 18:17:44 +00:00
|
|
|
|
|
|
|
SELECT LpNorm(tuple(-1), 3);
|
|
|
|
SELECT LpNorm(tuple(-1.1), 3);
|
2021-08-27 13:14:32 +00:00
|
|
|
SELECT LpNorm(tuple(95800, 217519, 414560), 4);
|
2021-08-26 18:17:44 +00:00
|
|
|
SELECT LpNorm(tuple(13, -84.4, 91, 63.1), 2) = L2Norm(tuple(13, -84.4, 91, 63.1));
|
|
|
|
SELECT LpNorm(tuple(13, -84.4, 91, 63.1), 1) = L1Norm(tuple(13, -84.4, 91, 63.1));
|
|
|
|
SELECT LpNorm(tuple(-1, -2), 11);
|
2021-08-27 13:14:32 +00:00
|
|
|
|
|
|
|
SELECT L1Distance(tuple(1, 2, 3), tuple(2, 3, 1));
|
|
|
|
SELECT L2Distance(tuple(1, 1), tuple(3, -1));
|
|
|
|
SELECT LinfDistance(tuple(1, 1), tuple(1, 2));
|
|
|
|
SELECT L2Distance(tuple(5, 5), tuple(5, 5));
|
|
|
|
SELECT LpDistance(tuple(1800, 1900), tuple(18, 59), 12) - LpDistance(tuple(-22), tuple(1900), 12);
|