@thi.ng/distance 2.4.59 → 2.4.60
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/knearest.d.ts +1 -1
- package/knearest.js +1 -1
- package/manhattan.d.ts +9 -9
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
package/knearest.d.ts
CHANGED
package/knearest.js
CHANGED
package/manhattan.d.ts
CHANGED
|
@@ -15,32 +15,32 @@ import type { IDistance, Metric } from "./api.js";
|
|
|
15
15
|
* package...
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* ```ts
|
|
18
|
+
* ```ts tangle:../export/manhattan.ts
|
|
19
19
|
* import { MANHATTAN2 } from "@thi.ng/distance";
|
|
20
20
|
*
|
|
21
|
-
* MANHATTAN2.metric([0,0], [10,20])
|
|
21
|
+
* console.log(MANHATTAN2.metric([0,0], [10,20]));
|
|
22
22
|
* // 30
|
|
23
23
|
*
|
|
24
|
-
* MANHATTAN2.from(30);
|
|
24
|
+
* console.log(MANHATTAN2.from(30));
|
|
25
25
|
* // 21.213203435596427
|
|
26
26
|
*
|
|
27
|
-
* Math.hypot(15, 15) // <-- diagonal of manhattan square
|
|
27
|
+
* console.log(Math.hypot(15, 15)); // <-- diagonal of manhattan square
|
|
28
28
|
* // 21.213203435596427
|
|
29
29
|
*
|
|
30
|
-
* Math.hypot(10, 20) // <-- actual eucledian dist
|
|
30
|
+
* console.log(Math.hypot(10, 20)); // <-- actual eucledian dist
|
|
31
31
|
* // 22.360679774997898
|
|
32
32
|
*
|
|
33
|
-
* MANHATTAN2.to(21.213203435596427)
|
|
33
|
+
* console.log(MANHATTAN2.to(21.213203435596427));
|
|
34
34
|
* // 30
|
|
35
35
|
*
|
|
36
36
|
* // however, starting w/ eucledian dist first
|
|
37
|
-
* e = Math.hypot(10, 20)
|
|
37
|
+
* const e = Math.hypot(10, 20)
|
|
38
38
|
* // 22.360679774997898
|
|
39
39
|
*
|
|
40
|
-
* m = MANHATTAN2.to(e)
|
|
40
|
+
* const m = MANHATTAN2.to(e)
|
|
41
41
|
* // 31.622776601683793
|
|
42
42
|
*
|
|
43
|
-
* MANHATTAN2.from(m) === e
|
|
43
|
+
* console.log(MANHATTAN2.from(m) === e);
|
|
44
44
|
* // true
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/distance",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.60",
|
|
4
4
|
"description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.9.
|
|
40
|
-
"@thi.ng/checks": "^3.5.
|
|
41
|
-
"@thi.ng/errors": "^2.
|
|
42
|
-
"@thi.ng/heaps": "^2.1.
|
|
43
|
-
"@thi.ng/math": "^5.10.
|
|
44
|
-
"@thi.ng/vectors": "^7.10.
|
|
39
|
+
"@thi.ng/api": "^8.9.30",
|
|
40
|
+
"@thi.ng/checks": "^3.5.3",
|
|
41
|
+
"@thi.ng/errors": "^2.5.0",
|
|
42
|
+
"@thi.ng/heaps": "^2.1.67",
|
|
43
|
+
"@thi.ng/math": "^5.10.7",
|
|
44
|
+
"@thi.ng/vectors": "^7.10.18"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@microsoft/api-extractor": "^7.
|
|
48
|
-
"esbuild": "^0.20.
|
|
47
|
+
"@microsoft/api-extractor": "^7.42.3",
|
|
48
|
+
"esbuild": "^0.20.1",
|
|
49
49
|
"rimraf": "^5.0.5",
|
|
50
|
-
"typedoc": "^0.25.
|
|
51
|
-
"typescript": "^5.
|
|
50
|
+
"typedoc": "^0.25.12",
|
|
51
|
+
"typescript": "^5.4.2"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
54
54
|
"distance",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
],
|
|
114
114
|
"year": 2021
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "7f3fcbd6c0462b0ce45afa141fe163d1f297fd51\n"
|
|
117
117
|
}
|