@thi.ng/adjacency 2.5.47 → 2.5.48
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 +7 -1
- package/README.md +2 -2
- package/bfs.d.ts +3 -2
- package/dfs.d.ts +3 -2
- package/floyd-warshall.d.ts +2 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-04-
|
|
3
|
+
- **Last updated**: 2024-04-20T14:42:45Z
|
|
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
|
+
### [2.5.48](https://github.com/thi-ng/umbrella/tree/@thi.ng/adjacency@2.5.48) (2024-04-20)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update type usage ([c7376f3](https://github.com/thi-ng/umbrella/commit/c7376f3))
|
|
17
|
+
|
|
12
18
|
## [2.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/adjacency@2.5.0) (2023-10-19)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/README.md
CHANGED
|
@@ -73,10 +73,10 @@ import * as adj from "@thi.ng/adjacency";
|
|
|
73
73
|
Browser ESM import:
|
|
74
74
|
|
|
75
75
|
```html
|
|
76
|
-
<script type="module" src="https://
|
|
76
|
+
<script type="module" src="https://esm.run/@thi.ng/adjacency"></script>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
[
|
|
79
|
+
[JSDelivr documentation](https://www.jsdelivr.com/)
|
|
80
80
|
|
|
81
81
|
For Node.js REPL:
|
|
82
82
|
|
package/bfs.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from "@thi.ng/api";
|
|
1
2
|
import { BitField } from "@thi.ng/bitfield/bitfield";
|
|
2
3
|
import type { CostFn, IGraph } from "./api.js";
|
|
3
4
|
/**
|
|
@@ -20,7 +21,7 @@ export declare class BFS {
|
|
|
20
21
|
constructor(graph: IGraph, src: number, cost?: CostFn);
|
|
21
22
|
protected search(id: number, cost: CostFn): void;
|
|
22
23
|
hasPathTo(id: number): boolean;
|
|
23
|
-
pathTo(id: number): Iterable<number
|
|
24
|
+
pathTo(id: number): Maybe<Iterable<number>>;
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* One-off Breadth-First / shortest path search between `src` and `dest` in
|
|
@@ -44,5 +45,5 @@ export declare class BFS {
|
|
|
44
45
|
* @param dest -
|
|
45
46
|
* @param cost -
|
|
46
47
|
*/
|
|
47
|
-
export declare const bfs: (graph: IGraph, src: number, dest: number, cost?: CostFn) => Iterable<number
|
|
48
|
+
export declare const bfs: (graph: IGraph, src: number, dest: number, cost?: CostFn) => Maybe<Iterable<number>>;
|
|
48
49
|
//# sourceMappingURL=bfs.d.ts.map
|
package/dfs.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from "@thi.ng/api";
|
|
1
2
|
import { BitField } from "@thi.ng/bitfield/bitfield";
|
|
2
3
|
import type { IGraph } from "./api.js";
|
|
3
4
|
export declare class DFS {
|
|
@@ -8,7 +9,7 @@ export declare class DFS {
|
|
|
8
9
|
constructor(graph: IGraph, src: number);
|
|
9
10
|
search(id: number): void;
|
|
10
11
|
hasPathTo(id: number): boolean;
|
|
11
|
-
pathTo(id: number): Iterable<number
|
|
12
|
+
pathTo(id: number): Maybe<Iterable<number>>;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* One-off Depth-First path search from vertex `src` to `dest` in given `graph`.
|
|
@@ -19,5 +20,5 @@ export declare class DFS {
|
|
|
19
20
|
* @param src -
|
|
20
21
|
* @param dest -
|
|
21
22
|
*/
|
|
22
|
-
export declare const dfs: (graph: IGraph, src: number, dest: number) => Iterable<number
|
|
23
|
+
export declare const dfs: (graph: IGraph, src: number, dest: number) => Maybe<Iterable<number>>;
|
|
23
24
|
//# sourceMappingURL=dfs.d.ts.map
|
package/floyd-warshall.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Maybe } from "@thi.ng/api";
|
|
1
2
|
import type { CostFn, IGraph } from "./api.js";
|
|
2
3
|
/**
|
|
3
4
|
* Implementation of the Floyd-Warshall algorithm for finding _all_ shortest
|
|
@@ -39,7 +40,7 @@ export declare class FloydWarshall {
|
|
|
39
40
|
* @param a
|
|
40
41
|
* @param b
|
|
41
42
|
*/
|
|
42
|
-
distance(a: number, b: number): number
|
|
43
|
+
distance(a: number, b: number): Maybe<number>;
|
|
43
44
|
/**
|
|
44
45
|
* Returns iterator of vertex IDs of path between `a` and `b` (if any).
|
|
45
46
|
* Throws an error if either `a` or `b` are out of bounds.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/adjacency",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.48",
|
|
4
4
|
"description": "Sparse & bitwise adjacency matrices, lists and selected traversal algorithms for directed & undirected graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.
|
|
43
|
-
"@thi.ng/arrays": "^2.9.
|
|
44
|
-
"@thi.ng/bitfield": "^2.3.
|
|
45
|
-
"@thi.ng/dcons": "^3.2.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/sparse": "^0.3.
|
|
42
|
+
"@thi.ng/api": "^8.11.0",
|
|
43
|
+
"@thi.ng/arrays": "^2.9.4",
|
|
44
|
+
"@thi.ng/bitfield": "^2.3.39",
|
|
45
|
+
"@thi.ng/dcons": "^3.2.110",
|
|
46
|
+
"@thi.ng/errors": "^2.5.5",
|
|
47
|
+
"@thi.ng/sparse": "^0.3.115"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@microsoft/api-extractor": "^7.43.0",
|
|
51
|
-
"@thi.ng/vectors": "^7.10.
|
|
51
|
+
"@thi.ng/vectors": "^7.10.28",
|
|
52
52
|
"esbuild": "^0.20.2",
|
|
53
53
|
"rimraf": "^5.0.5",
|
|
54
54
|
"typedoc": "^0.25.12",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
],
|
|
127
127
|
"year": 2018
|
|
128
128
|
},
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "8339d05ecc857e529c7325a9839c0063b89e728d\n"
|
|
130
130
|
}
|