@thi.ng/distance 2.1.34 → 2.1.35
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/README.md +7 -10
- package/api.d.ts +2 -2
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
|
|
3
|
-
# 
|
|
3
|
+
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/distance)
|
|
6
6
|

|
|
7
|
-
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
This project is part of the
|
|
10
10
|
[@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
|
|
@@ -25,7 +25,7 @@ This project is part of the
|
|
|
25
25
|
|
|
26
26
|
## About
|
|
27
27
|
|
|
28
|
-
N-dimensional distance metrics & K-nearest neighborhoods for point queries
|
|
28
|
+
N-dimensional distance metrics & K-nearest neighborhoods for point queries
|
|
29
29
|
|
|
30
30
|
### Distance metrics
|
|
31
31
|
|
|
@@ -117,11 +117,8 @@ ES module import:
|
|
|
117
117
|
|
|
118
118
|
For Node.js REPL:
|
|
119
119
|
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
node --experimental-repl-await
|
|
123
|
-
|
|
124
|
-
> const distance = await import("@thi.ng/distance");
|
|
120
|
+
```js
|
|
121
|
+
const distance = await import("@thi.ng/distance");
|
|
125
122
|
```
|
|
126
123
|
|
|
127
124
|
Package sizes (brotli'd, pre-treeshake): ESM: 1.11 KB
|
|
@@ -169,7 +166,7 @@ k2.deref()
|
|
|
169
166
|
|
|
170
167
|
## Authors
|
|
171
168
|
|
|
172
|
-
Karsten Schmidt
|
|
169
|
+
- [Karsten Schmidt](https://thi.ng)
|
|
173
170
|
|
|
174
171
|
If this project contributes to an academic publication, please cite it as:
|
|
175
172
|
|
|
@@ -184,4 +181,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
184
181
|
|
|
185
182
|
## License
|
|
186
183
|
|
|
187
|
-
© 2021 - 2022 Karsten Schmidt // Apache
|
|
184
|
+
© 2021 - 2022 Karsten Schmidt // Apache License 2.0
|
package/api.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import type { FnU2, IReset, Pair } from "@thi.ng/api";
|
|
|
2
2
|
/**
|
|
3
3
|
* Distance metric function
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type Metric<T> = FnU2<T, number>;
|
|
6
6
|
/**
|
|
7
7
|
* Tuple of `[distance, T]`
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type Neighbor<T> = Pair<number, T>;
|
|
10
10
|
/**
|
|
11
11
|
* Distance metric implementation & conversions from/to raw distances.
|
|
12
12
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/distance",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.35",
|
|
4
4
|
"description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://github.com/thi-ng/umbrella/tree/
|
|
13
|
+
"homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/distance#readme",
|
|
14
14
|
"funding": [
|
|
15
15
|
{
|
|
16
16
|
"type": "github",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
22
|
}
|
|
23
23
|
],
|
|
24
|
-
"author": "Karsten Schmidt
|
|
24
|
+
"author": "Karsten Schmidt (https://thi.ng)",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/checks": "^3.3.
|
|
39
|
-
"@thi.ng/errors": "^2.2.
|
|
40
|
-
"@thi.ng/heaps": "^2.1.
|
|
41
|
-
"@thi.ng/math": "^5.3.
|
|
42
|
-
"@thi.ng/vectors": "^7.5.
|
|
37
|
+
"@thi.ng/api": "^8.6.0",
|
|
38
|
+
"@thi.ng/checks": "^3.3.5",
|
|
39
|
+
"@thi.ng/errors": "^2.2.6",
|
|
40
|
+
"@thi.ng/heaps": "^2.1.19",
|
|
41
|
+
"@thi.ng/math": "^5.3.16",
|
|
42
|
+
"@thi.ng/vectors": "^7.5.27"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.33.
|
|
46
|
-
"@thi.ng/testament": "^0.3.
|
|
45
|
+
"@microsoft/api-extractor": "^7.33.7",
|
|
46
|
+
"@thi.ng/testament": "^0.3.7",
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.23.
|
|
50
|
-
"typescript": "^4.
|
|
49
|
+
"typedoc": "^0.23.22",
|
|
50
|
+
"typescript": "^4.9.4"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"distance",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
],
|
|
110
110
|
"year": 2021
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
|
|
113
113
|
}
|