@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-03-09T09:18:17Z
3
+ - **Last updated**: 2024-03-13T14:04:31Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/knearest.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare class KNearest<D, T> implements INeighborhood<D, T>, IDeref<Neigh
43
43
  /**
44
44
  * Resets `k-nearest` limit and clears current results.
45
45
  *
46
- * @param r
46
+ * @param k
47
47
  */
48
48
  setK(k: number): void;
49
49
  /**
package/knearest.js CHANGED
@@ -41,7 +41,7 @@ class KNearest {
41
41
  /**
42
42
  * Resets `k-nearest` limit and clears current results.
43
43
  *
44
- * @param r
44
+ * @param k
45
45
  */
46
46
  setK(k) {
47
47
  assert(k > 0, `invalid k (must be > 0)`);
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.59",
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.29",
40
- "@thi.ng/checks": "^3.5.2",
41
- "@thi.ng/errors": "^2.4.20",
42
- "@thi.ng/heaps": "^2.1.66",
43
- "@thi.ng/math": "^5.10.6",
44
- "@thi.ng/vectors": "^7.10.17"
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.40.1",
48
- "esbuild": "^0.20.0",
47
+ "@microsoft/api-extractor": "^7.42.3",
48
+ "esbuild": "^0.20.1",
49
49
  "rimraf": "^5.0.5",
50
- "typedoc": "^0.25.7",
51
- "typescript": "^5.3.3"
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": "69100942474942f7446ac645d59d91e7dfc352f9\n"
116
+ "gitHead": "7f3fcbd6c0462b0ce45afa141fe163d1f297fd51\n"
117
117
  }