@thi.ng/adjacency 2.2.19 → 2.2.20

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**: 2022-12-16T12:52:25Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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/binary.d.ts CHANGED
@@ -30,10 +30,11 @@ export declare class AdjacencyBitMatrix implements IGraph<number> {
30
30
  toDot(ids?: string[]): string;
31
31
  }
32
32
  /**
33
- * Creates adjacency matrix backed by a {@link @thi.ng/bitfield#BitMatrix}
33
+ * Creates adjacency matrix backed by a
34
+ * [`BitMatrix`](https://docs.thi.ng/umbrella/bitfield/classes/BitMatrix.html)
34
35
  * with capacity `n` (max vertices), optionally initialized with given edge
35
- * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true
36
- * (default: false), creates symmetrical adjacencies.
36
+ * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true (default:
37
+ * false), creates symmetrical adjacencies.
37
38
  *
38
39
  * @param n - max vertices
39
40
  * @param edges - edge pairs
package/binary.js CHANGED
@@ -90,10 +90,11 @@ export class AdjacencyBitMatrix {
90
90
  }
91
91
  }
92
92
  /**
93
- * Creates adjacency matrix backed by a {@link @thi.ng/bitfield#BitMatrix}
93
+ * Creates adjacency matrix backed by a
94
+ * [`BitMatrix`](https://docs.thi.ng/umbrella/bitfield/classes/BitMatrix.html)
94
95
  * with capacity `n` (max vertices), optionally initialized with given edge
95
- * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true
96
- * (default: false), creates symmetrical adjacencies.
96
+ * pairs. Each edge is `[src-node dest-node]`. If `undirected` is true (default:
97
+ * false), creates symmetrical adjacencies.
97
98
  *
98
99
  * @param n - max vertices
99
100
  * @param edges - edge pairs
package/disjoint-set.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Typed array based Disjoint Set implementation with quick union and
3
- * path compression, after Sedgewick & Wayne.
2
+ * Typed array based Disjoint Set implementation with quick union and path
3
+ * compression, after Sedgewick & Wayne.
4
4
  *
5
5
  * @remarks
6
- * - {@link https://en.wikipedia.org/wiki/Disjoint-set_data_structure}
7
- * - {@link https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf}
6
+ * - https://en.wikipedia.org/wiki/Disjoint-set_data_structure
7
+ * - https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf
8
8
  */
9
9
  export declare class DisjointSet {
10
10
  roots: Uint32Array;
package/disjoint-set.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { fillRange } from "@thi.ng/arrays/fill-range";
2
2
  /**
3
- * Typed array based Disjoint Set implementation with quick union and
4
- * path compression, after Sedgewick & Wayne.
3
+ * Typed array based Disjoint Set implementation with quick union and path
4
+ * compression, after Sedgewick & Wayne.
5
5
  *
6
6
  * @remarks
7
- * - {@link https://en.wikipedia.org/wiki/Disjoint-set_data_structure}
8
- * - {@link https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf}
7
+ * - https://en.wikipedia.org/wiki/Disjoint-set_data_structure
8
+ * - https://algs4.cs.princeton.edu/lectures/15UnionFind-2x2.pdf
9
9
  */
10
10
  export class DisjointSet {
11
11
  /**
package/mst.d.ts CHANGED
@@ -15,9 +15,11 @@ import type { Fn } from "@thi.ng/api";
15
15
  * criteria. The result edges will be in ascending order, based on the supplied
16
16
  * cost function. The cost function is called once for each edge and return
17
17
  * values will be cached prior to sorting (see
18
- * {@link @thi.ng/arrays#sortByCachedKey} for details).
18
+ * [`sortByCachedKey()`](https://docs.thi.ng/umbrella/arrays/functions/sortByCachedKey.html)
19
+ * for details).
19
20
  *
20
- * Reference: {@link https://en.wikipedia.org/wiki/Kruskal%27s_algorithm}
21
+ * References:
22
+ * - https://en.wikipedia.org/wiki/Kruskal%27s_algorithm
21
23
  *
22
24
  * @example
23
25
  * ```ts
package/mst.js CHANGED
@@ -16,9 +16,11 @@ import { DisjointSet } from "./disjoint-set.js";
16
16
  * criteria. The result edges will be in ascending order, based on the supplied
17
17
  * cost function. The cost function is called once for each edge and return
18
18
  * values will be cached prior to sorting (see
19
- * {@link @thi.ng/arrays#sortByCachedKey} for details).
19
+ * [`sortByCachedKey()`](https://docs.thi.ng/umbrella/arrays/functions/sortByCachedKey.html)
20
+ * for details).
20
21
  *
21
- * Reference: {@link https://en.wikipedia.org/wiki/Kruskal%27s_algorithm}
22
+ * References:
23
+ * - https://en.wikipedia.org/wiki/Kruskal%27s_algorithm
22
24
  *
23
25
  * @example
24
26
  * ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/adjacency",
3
- "version": "2.2.19",
3
+ "version": "2.2.20",
4
4
  "description": "Sparse & bitwise adjacency matrices and related functions for directed & undirected graphs",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,17 +34,17 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.6.0",
38
- "@thi.ng/arrays": "^2.4.5",
39
- "@thi.ng/bitfield": "^2.2.15",
40
- "@thi.ng/dcons": "^3.2.26",
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/arrays": "^2.4.6",
39
+ "@thi.ng/bitfield": "^2.2.16",
40
+ "@thi.ng/dcons": "^3.2.27",
41
41
  "@thi.ng/errors": "^2.2.6",
42
- "@thi.ng/sparse": "^0.3.31"
42
+ "@thi.ng/sparse": "^0.3.32"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@microsoft/api-extractor": "^7.33.7",
46
46
  "@thi.ng/testament": "^0.3.7",
47
- "@thi.ng/vectors": "^7.5.27",
47
+ "@thi.ng/vectors": "^7.5.28",
48
48
  "rimraf": "^3.0.2",
49
49
  "tools": "^0.0.1",
50
50
  "typedoc": "^0.23.22",
@@ -119,5 +119,5 @@
119
119
  ],
120
120
  "year": 2018
121
121
  },
122
- "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
122
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
123
123
  }
package/sparse.d.ts CHANGED
@@ -13,7 +13,8 @@ export declare class AdjacencyMatrix extends CSR implements IGraph<number> {
13
13
  neighbors(id: number): number[];
14
14
  invert(): AdjacencyMatrix;
15
15
  /**
16
- * Returns a diagonal sparse matrix {@link @thi.ng/sparse#CSR} containing
16
+ * Returns a diagonal sparse matrix
17
+ * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) containing
17
18
  * information about the degree of each vertex, i.e. the number of edges
18
19
  * attached to each vertex.
19
20
  *
@@ -24,12 +25,13 @@ export declare class AdjacencyMatrix extends CSR implements IGraph<number> {
24
25
  */
25
26
  degreeMat(deg?: DegreeType): CSR;
26
27
  /**
27
- * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is
28
- * the degree matrix and `A` this adjacency matrix.
28
+ * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is the
29
+ * degree matrix and `A` this adjacency matrix.
29
30
  *
30
31
  * @remarks
31
- * - {@link https://en.wikipedia.org/wiki/Laplacian_matrix}
32
- * - {@link https://en.wikipedia.org/wiki/Discrete_Laplace_operator}
32
+ * References:
33
+ * - https://en.wikipedia.org/wiki/Laplacian_matrix
34
+ * - https://en.wikipedia.org/wiki/Discrete_Laplace_operator
33
35
  *
34
36
  * @param deg - degree type for {@link AdjacencyMatrix.degreeMat}
35
37
  */
@@ -50,10 +52,11 @@ export declare class AdjacencyMatrix extends CSR implements IGraph<number> {
50
52
  toDot(ids?: string[]): string;
51
53
  }
52
54
  /**
53
- * Creates an adjacency matrix backed by a sparse {@link @thi.ng/sparse#CSR}
54
- * matrix, optionally initialize with given edge pairs. Each edge is a `[src,
55
- * dest]` tuple. If `undirected` is true (default: false), creates symmetrical
56
- * edges (i.e. undirected graph).
55
+ * Creates an adjacency matrix backed by a sparse
56
+ * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) matrix,
57
+ * optionally initialize with given edge pairs. Each edge is a `[src, dest]`
58
+ * tuple. If `undirected` is true (default: false), creates symmetrical edges
59
+ * (i.e. undirected graph).
57
60
  *
58
61
  * @param n - max number of vertices
59
62
  * @param edges - edge pairs
package/sparse.js CHANGED
@@ -61,7 +61,8 @@ export class AdjacencyMatrix extends CSR {
61
61
  return __invert(defAdjMatrix(this.m, undefined, this.undirected), this.edges());
62
62
  }
63
63
  /**
64
- * Returns a diagonal sparse matrix {@link @thi.ng/sparse#CSR} containing
64
+ * Returns a diagonal sparse matrix
65
+ * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) containing
65
66
  * information about the degree of each vertex, i.e. the number of edges
66
67
  * attached to each vertex.
67
68
  *
@@ -93,12 +94,13 @@ export class AdjacencyMatrix extends CSR {
93
94
  return res;
94
95
  }
95
96
  /**
96
- * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is
97
- * the degree matrix and `A` this adjacency matrix.
97
+ * Returns this graph's Laplacian matrix: `L = D - A` Where `D` is the
98
+ * degree matrix and `A` this adjacency matrix.
98
99
  *
99
100
  * @remarks
100
- * - {@link https://en.wikipedia.org/wiki/Laplacian_matrix}
101
- * - {@link https://en.wikipedia.org/wiki/Discrete_Laplace_operator}
101
+ * References:
102
+ * - https://en.wikipedia.org/wiki/Laplacian_matrix
103
+ * - https://en.wikipedia.org/wiki/Discrete_Laplace_operator
102
104
  *
103
105
  * @param deg - degree type for {@link AdjacencyMatrix.degreeMat}
104
106
  */
@@ -144,10 +146,11 @@ export class AdjacencyMatrix extends CSR {
144
146
  }
145
147
  }
146
148
  /**
147
- * Creates an adjacency matrix backed by a sparse {@link @thi.ng/sparse#CSR}
148
- * matrix, optionally initialize with given edge pairs. Each edge is a `[src,
149
- * dest]` tuple. If `undirected` is true (default: false), creates symmetrical
150
- * edges (i.e. undirected graph).
149
+ * Creates an adjacency matrix backed by a sparse
150
+ * [`CSR`](https://docs.thi.ng/umbrella/sparse/classes/CSR.html) matrix,
151
+ * optionally initialize with given edge pairs. Each edge is a `[src, dest]`
152
+ * tuple. If `undirected` is true (default: false), creates symmetrical edges
153
+ * (i.e. undirected graph).
151
154
  *
152
155
  * @param n - max number of vertices
153
156
  * @param edges - edge pairs