@thi.ng/distance 2.4.105 → 2.4.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/argmin.d.ts +2 -2
- package/haversine.d.ts +2 -2
- package/manhattan.d.ts +6 -6
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
package/argmin.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { IDistance, Metric } from "./api.js";
|
|
|
6
6
|
* and returns index of the sample closest to `p` (according to `dist`, default:
|
|
7
7
|
* {@link DIST_SQ}).
|
|
8
8
|
*
|
|
9
|
-
* @
|
|
9
|
+
* @remarks
|
|
10
10
|
* Use {@link argminT} for non-vector inputs.
|
|
11
11
|
*
|
|
12
12
|
* https://en.wikipedia.org/wiki/Arg_max#Arg_min
|
|
@@ -23,7 +23,7 @@ export declare const argminN: (p: number, samples: NumericArray, dist?: Metric<n
|
|
|
23
23
|
* representation, then computes and returns index of the sample closest to `p`
|
|
24
24
|
* (according to `dist`).
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @remarks
|
|
27
27
|
* Use {@link argmin} if all items are vectors already.
|
|
28
28
|
*
|
|
29
29
|
* @param p -
|
package/haversine.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
2
|
import { Eucledian } from "./eucledian.js";
|
|
3
3
|
/**
|
|
4
|
-
* Distance metric for geo locations given as [lat,lon] vectors.
|
|
4
|
+
* Distance metric for geo locations given as `[lat,lon]` vectors.
|
|
5
5
|
*/
|
|
6
6
|
export declare const HAVERSINE_LATLON: Eucledian<ReadonlyVec>;
|
|
7
7
|
/**
|
|
8
|
-
* Distance metric for geo locations given as [lon,lat] vectors.
|
|
8
|
+
* Distance metric for geo locations given as `[lon,lat]` vectors.
|
|
9
9
|
*/
|
|
10
10
|
export declare const HAVERSINE_LONLAT: Eucledian<ReadonlyVec>;
|
|
11
11
|
//# sourceMappingURL=haversine.d.ts.map
|
package/manhattan.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ import type { IDistance, Metric } from "./api.js";
|
|
|
7
7
|
* The conversion are always based on n-D squares, i.e. the assumption that the
|
|
8
8
|
* distance is equally shared in each dimension.
|
|
9
9
|
*
|
|
10
|
-
* E.g. a Manhattan distance of 30 could be obtained from [0,0] -> [10,20]
|
|
11
|
-
* would be interpreted here as distance from [0,0] -> [15,15]
|
|
12
|
-
* the same Manhattan value, but yields a different Eucledian result.
|
|
13
|
-
* of any other information about the distance values, this is however
|
|
14
|
-
* way to approach conversion and is sufficient for the purposes of
|
|
15
|
-
* package...
|
|
10
|
+
* E.g. a Manhattan distance of 30 could be obtained from `[0,0]` -> `[10,20]`,
|
|
11
|
+
* but would be interpreted here as distance from `[0,0]` -> `[15,15]`, which
|
|
12
|
+
* produces the same Manhattan value, but yields a different Eucledian result.
|
|
13
|
+
* For lack of any other information about the distance values, this is however
|
|
14
|
+
* the only way to approach conversion and is sufficient for the purposes of
|
|
15
|
+
* this package...
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts tangle:../export/manhattan.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/distance",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.106",
|
|
4
4
|
"description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/checks": "^3.6.
|
|
44
|
-
"@thi.ng/errors": "^2.5.
|
|
45
|
-
"@thi.ng/heaps": "^2.1.
|
|
46
|
-
"@thi.ng/math": "^5.11.
|
|
47
|
-
"@thi.ng/vectors": "^7.12.
|
|
42
|
+
"@thi.ng/api": "^8.11.20",
|
|
43
|
+
"@thi.ng/checks": "^3.6.23",
|
|
44
|
+
"@thi.ng/errors": "^2.5.26",
|
|
45
|
+
"@thi.ng/heaps": "^2.1.92",
|
|
46
|
+
"@thi.ng/math": "^5.11.20",
|
|
47
|
+
"@thi.ng/vectors": "^7.12.20"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"esbuild": "^0.
|
|
51
|
-
"typedoc": "^0.27.
|
|
50
|
+
"esbuild": "^0.25.0",
|
|
51
|
+
"typedoc": "^0.27.7",
|
|
52
52
|
"typescript": "^5.7.3"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
],
|
|
116
116
|
"year": 2021
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
119
119
|
}
|