@thi.ng/k-means 0.7.9 → 0.7.11

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-10-05T12:12:32Z
3
+ - **Last updated**: 2024-10-05T13:06:12Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [0.7.10](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.7.10) (2024-10-05)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - add explicit type casts (TS5.6.2) ([dcbdd60](https://github.com/thi-ng/umbrella/commit/dcbdd60))
17
+
12
18
  ## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.7.0) (2024-07-25)
13
19
 
14
20
  #### 🚀 Features
package/kmeans.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { IDistance } from "@thi.ng/distance";
2
+ import type { IRandom } from "@thi.ng/random";
2
3
  import type { ReadonlyVec } from "@thi.ng/vectors";
3
4
  import type { CentroidStrategy, Cluster, KMeansOpts } from "./api.js";
4
5
  /**
@@ -33,7 +34,7 @@ export declare const kmeans: <T extends ReadonlyVec>(k: number, samples: T[], op
33
34
  * @param dist -
34
35
  * @param rnd -
35
36
  */
36
- export declare const initKmeanspp: <T extends ReadonlyVec>(k: number, samples: T[], dist?: IDistance<ReadonlyVec>, rnd?: import("@thi.ng/random").SystemRandom) => number[];
37
+ export declare const initKmeanspp: <T extends ReadonlyVec>(k: number, samples: T[], dist?: IDistance<ReadonlyVec>, rnd?: IRandom) => number[];
37
38
  /**
38
39
  * Default centroid strategy forming new centroids by averaging the position of
39
40
  * participating samples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/k-means",
3
- "version": "0.7.9",
3
+ "version": "0.7.11",
4
4
  "description": "Configurable k-means & k-medians (with k-means++ initialization) for n-D vectors",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@thi.ng/api": "^8.11.11",
40
- "@thi.ng/distance": "^2.4.89",
40
+ "@thi.ng/distance": "^2.4.90",
41
41
  "@thi.ng/errors": "^2.5.17",
42
- "@thi.ng/random": "^4.1.0",
43
- "@thi.ng/vectors": "^7.12.3"
42
+ "@thi.ng/random": "^4.1.1",
43
+ "@thi.ng/vectors": "^7.12.4"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@microsoft/api-extractor": "^7.47.9",
@@ -85,5 +85,5 @@
85
85
  "year": 2021,
86
86
  "screenshot": "examples/kmeans-viz.jpg"
87
87
  },
88
- "gitHead": "11ae480076e61a2263f5730ffb37dfddbf01c7d1\n"
88
+ "gitHead": "241df2019d93359c34da1a11a94e416b6ea73f32\n"
89
89
  }