@thi.ng/distance 2.0.8 → 2.1.2
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 +81 -52
- package/README.md +1 -1
- package/package.json +104 -99
package/CHANGELOG.md
CHANGED
|
@@ -1,86 +1,115 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@2.0.7...@thi.ng/distance@2.0.8) (2021-11-04)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @thi.ng/distance
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/distance@2.0.6...@thi.ng/distance@2.0.7) (2021-11-03)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @thi.ng/distance
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
- **Last updated**: 2021-11-21T17:09:28Z
|
|
4
|
+
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
20
5
|
|
|
6
|
+
All notable changes to this project will be documented in this file.
|
|
7
|
+
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
21
8
|
|
|
22
|
-
|
|
9
|
+
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
|
+
and/or version bumps of transitive dependencies.
|
|
23
11
|
|
|
12
|
+
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.1.0) (2021-11-17)
|
|
24
13
|
|
|
25
|
-
|
|
14
|
+
#### 🚀 Features
|
|
26
15
|
|
|
27
|
-
|
|
16
|
+
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
|
|
17
|
+
Improving the overall build ergonomics
|
|
18
|
+
- introduced a tools workspaces
|
|
19
|
+
- imported it in all needed packages/examples
|
|
20
|
+
- inclusive project root
|
|
28
21
|
|
|
22
|
+
#### ♻️ Refactoring
|
|
29
23
|
|
|
30
|
-
|
|
24
|
+
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
|
|
25
|
+
this commit reverts (partly) changes made in:
|
|
26
|
+
ef346d7a8753590dc9094108a3d861a8dbd5dd2c
|
|
27
|
+
overall purpose is better testament ergonomics:
|
|
28
|
+
instead of having to pass NODE_OPTIONS with every invocation
|
|
29
|
+
having a binary to handle this for us.
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.0.1) (2021-10-13)
|
|
33
32
|
|
|
33
|
+
#### ♻️ Refactoring
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
36
|
+
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
37
|
+
- add .js suffix for all relative imports
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@2.0.0) (2021-10-12)
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
- CJS obsolete due to ESM support in recent versions of node:
|
|
41
|
-
- i.e. launch NodeJS via:
|
|
42
|
-
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
43
|
-
- in the node REPL use `await import(...)` instead of `require()`
|
|
44
|
-
- UMD obsolete due to widespread browser support for ESM
|
|
41
|
+
#### 🛑 Breaking changes
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
43
|
+
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
44
|
+
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
45
|
+
- only ESM modules will be published from now on
|
|
46
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
47
|
+
- i.e. launch NodeJS via:
|
|
48
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
49
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
50
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
51
|
+
Also:
|
|
52
|
+
- normalize/restructure/reorg all package.json files
|
|
53
|
+
- cleanup all build scripts, remove obsolete
|
|
54
|
+
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
50
55
|
|
|
56
|
+
#### 🚀 Features
|
|
51
57
|
|
|
58
|
+
- add/update argmin fns/params ([9c0f003](https://github.com/thi-ng/umbrella/commit/9c0f003))
|
|
59
|
+
- add argminN() for numeric inputs
|
|
60
|
+
- updata argmin fn to accept metric functions OR IDistance impls
|
|
61
|
+
- add [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/main/packages/checks) as direct dependency (already was transitive)
|
|
52
62
|
|
|
63
|
+
#### ♻️ Refactoring
|
|
53
64
|
|
|
65
|
+
- update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
|
|
66
|
+
- largely related to recent updates/restructuring of these packages:
|
|
67
|
+
- api
|
|
68
|
+
- defmulti
|
|
69
|
+
- errors
|
|
70
|
+
- logger
|
|
71
|
+
- update imports ([df599da](https://github.com/thi-ng/umbrella/commit/df599da))
|
|
72
|
+
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
73
|
+
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
54
74
|
|
|
75
|
+
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.3.0) (2021-04-19)
|
|
55
76
|
|
|
56
|
-
|
|
77
|
+
#### 🚀 Features
|
|
57
78
|
|
|
58
|
-
|
|
79
|
+
- replace HAVERSINE w/ alts ([3a9a77a](https://github.com/thi-ng/umbrella/commit/3a9a77a))
|
|
80
|
+
- add HAVERSINE_LATLON, HAVERSINE_LONLAT
|
|
81
|
+
- update readme
|
|
82
|
+
- add argmin*() fns ([72ed376](https://github.com/thi-ng/umbrella/commit/72ed376))
|
|
59
83
|
|
|
60
|
-
|
|
84
|
+
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.2.0) (2021-03-30)
|
|
61
85
|
|
|
62
|
-
|
|
86
|
+
#### 🚀 Features
|
|
63
87
|
|
|
64
|
-
-
|
|
65
|
-
- **distance:** replace HAVERSINE w/ alts ([3a9a77a](https://github.com/thi-ng/umbrella/commit/3a9a77ab0fd06484f2fda5d67c7b151645436a32))
|
|
88
|
+
- add HAVERSINE preset, update readme ([cfc771e](https://github.com/thi-ng/umbrella/commit/cfc771e))
|
|
66
89
|
|
|
67
|
-
|
|
90
|
+
### [0.1.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.9) (2021-03-17)
|
|
68
91
|
|
|
69
|
-
|
|
92
|
+
#### 🩹 Bug fixes
|
|
70
93
|
|
|
71
|
-
-
|
|
94
|
+
- update KNearest ctor & heap handling ([#283](https://github.com/thi-ng/umbrella/issues/283)) ([e7cd6f1](https://github.com/thi-ng/umbrella/commit/e7cd6f1))
|
|
95
|
+
- add k>0 assertion in ctor
|
|
72
96
|
|
|
73
|
-
|
|
97
|
+
### [0.1.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.2) (2021-02-20)
|
|
74
98
|
|
|
75
|
-
|
|
99
|
+
#### ♻️ Refactoring
|
|
76
100
|
|
|
77
|
-
-
|
|
101
|
+
- use clamp0() ([8987946](https://github.com/thi-ng/umbrella/commit/8987946))
|
|
78
102
|
|
|
79
|
-
|
|
103
|
+
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/distance@0.1.0) (2021-01-21)
|
|
80
104
|
|
|
81
|
-
|
|
105
|
+
#### 🚀 Features
|
|
82
106
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
107
|
+
- add Manhattan metric, rename types, add docs ([4f0b199](https://github.com/thi-ng/umbrella/commit/4f0b199))
|
|
108
|
+
- clamp search radius, minor other changes ([4a09a0f](https://github.com/thi-ng/umbrella/commit/4a09a0f))
|
|
109
|
+
- update INeighborhood, KNearest ([be3e43d](https://github.com/thi-ng/umbrella/commit/be3e43d))
|
|
110
|
+
- expose `dist` impl in INeighborhood
|
|
111
|
+
- disable sort-by-default in KNearest
|
|
112
|
+
- fix Knearest.reset dist metric
|
|
113
|
+
- add docs
|
|
114
|
+
- update tests
|
|
115
|
+
- add new package ([1b41aa4](https://github.com/thi-ng/umbrella/commit/1b41aa4))
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,108 +1,113 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@thi.ng/distance",
|
|
3
|
+
"version": "2.1.2",
|
|
4
|
+
"description": "N-dimensional distance metrics & K-nearest neighborhoods for point queries",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/distance#readme",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
12
18
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
{
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
|
+
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
+
"doc:readme": "yarn doc:stats && tools:readme",
|
|
32
|
+
"doc:stats": "tools:module-stats",
|
|
33
|
+
"pub": "yarn npm publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@thi.ng/api": "^8.3.2",
|
|
38
|
+
"@thi.ng/checks": "^3.1.2",
|
|
39
|
+
"@thi.ng/errors": "^2.1.2",
|
|
40
|
+
"@thi.ng/heaps": "^2.1.2",
|
|
41
|
+
"@thi.ng/math": "^5.1.2",
|
|
42
|
+
"@thi.ng/vectors": "^7.2.2"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@microsoft/api-extractor": "^7.18.19",
|
|
46
|
+
"@thi.ng/testament": "^0.2.2",
|
|
47
|
+
"rimraf": "^3.0.2",
|
|
48
|
+
"tools": "^0.0.1",
|
|
49
|
+
"typedoc": "^0.22.9",
|
|
50
|
+
"typescript": "^4.5.2"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"distance",
|
|
54
|
+
"metric",
|
|
55
|
+
"k-nearest",
|
|
56
|
+
"nd",
|
|
57
|
+
"neighborhood",
|
|
58
|
+
"points",
|
|
59
|
+
"query",
|
|
60
|
+
"region",
|
|
61
|
+
"spatial",
|
|
62
|
+
"typescript",
|
|
63
|
+
"vector"
|
|
64
|
+
],
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=12.7"
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"*.js",
|
|
73
|
+
"*.d.ts"
|
|
74
|
+
],
|
|
75
|
+
"exports": {
|
|
76
|
+
".": {
|
|
77
|
+
"import": "./index.js"
|
|
35
78
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"@thi.ng/checks": "^3.0.6",
|
|
39
|
-
"@thi.ng/errors": "^2.0.6",
|
|
40
|
-
"@thi.ng/heaps": "^2.0.7",
|
|
41
|
-
"@thi.ng/math": "^5.0.7",
|
|
42
|
-
"@thi.ng/vectors": "^7.1.0"
|
|
79
|
+
"./api": {
|
|
80
|
+
"import": "./api.js"
|
|
43
81
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
82
|
+
"./argmin": {
|
|
83
|
+
"import": "./argmin.js"
|
|
46
84
|
},
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"metric",
|
|
50
|
-
"k-nearest",
|
|
51
|
-
"nd",
|
|
52
|
-
"neighborhood",
|
|
53
|
-
"points",
|
|
54
|
-
"query",
|
|
55
|
-
"region",
|
|
56
|
-
"spatial",
|
|
57
|
-
"typescript",
|
|
58
|
-
"vector"
|
|
59
|
-
],
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
85
|
+
"./eucledian": {
|
|
86
|
+
"import": "./eucledian.js"
|
|
62
87
|
},
|
|
63
|
-
"
|
|
64
|
-
|
|
88
|
+
"./haversine": {
|
|
89
|
+
"import": "./haversine.js"
|
|
65
90
|
},
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
"*.d.ts"
|
|
69
|
-
],
|
|
70
|
-
"exports": {
|
|
71
|
-
".": {
|
|
72
|
-
"import": "./index.js"
|
|
73
|
-
},
|
|
74
|
-
"./api": {
|
|
75
|
-
"import": "./api.js"
|
|
76
|
-
},
|
|
77
|
-
"./argmin": {
|
|
78
|
-
"import": "./argmin.js"
|
|
79
|
-
},
|
|
80
|
-
"./eucledian": {
|
|
81
|
-
"import": "./eucledian.js"
|
|
82
|
-
},
|
|
83
|
-
"./haversine": {
|
|
84
|
-
"import": "./haversine.js"
|
|
85
|
-
},
|
|
86
|
-
"./knearest": {
|
|
87
|
-
"import": "./knearest.js"
|
|
88
|
-
},
|
|
89
|
-
"./manhattan": {
|
|
90
|
-
"import": "./manhattan.js"
|
|
91
|
-
},
|
|
92
|
-
"./nearest": {
|
|
93
|
-
"import": "./nearest.js"
|
|
94
|
-
},
|
|
95
|
-
"./squared": {
|
|
96
|
-
"import": "./squared.js"
|
|
97
|
-
}
|
|
91
|
+
"./knearest": {
|
|
92
|
+
"import": "./knearest.js"
|
|
98
93
|
},
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
"geom-accel",
|
|
102
|
-
"k-means",
|
|
103
|
-
"vectors"
|
|
104
|
-
],
|
|
105
|
-
"year": 2021
|
|
94
|
+
"./manhattan": {
|
|
95
|
+
"import": "./manhattan.js"
|
|
106
96
|
},
|
|
107
|
-
"
|
|
108
|
-
|
|
97
|
+
"./nearest": {
|
|
98
|
+
"import": "./nearest.js"
|
|
99
|
+
},
|
|
100
|
+
"./squared": {
|
|
101
|
+
"import": "./squared.js"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"thi.ng": {
|
|
105
|
+
"related": [
|
|
106
|
+
"geom-accel",
|
|
107
|
+
"k-means",
|
|
108
|
+
"vectors"
|
|
109
|
+
],
|
|
110
|
+
"year": 2021
|
|
111
|
+
},
|
|
112
|
+
"gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
|
|
113
|
+
}
|