@knowvah/dot-engine 2.9.0 → 2.10.0
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/dist/common/graph-init.d.ts.map +1 -1
- package/dist/common/htmltable.d.ts +1 -1
- package/dist/common/htmltable.d.ts.map +1 -1
- package/dist/common/poly-init.d.ts +8 -8
- package/dist/common/poly-init.d.ts.map +1 -1
- package/dist/common/safefile.d.ts +15 -0
- package/dist/common/safefile.d.ts.map +1 -1
- package/dist/gvc/image-resolver.d.ts +5 -0
- package/dist/gvc/image-resolver.d.ts.map +1 -1
- package/dist/gvc/usershape.d.ts +2 -0
- package/dist/gvc/usershape.d.ts.map +1 -1
- package/dist/index.js +914 -813
- package/dist/index.js.map +4 -4
- package/dist/layout/neato/__fixtures__/kk-models.d.ts +59 -0
- package/dist/layout/neato/__fixtures__/kk-models.d.ts.map +1 -0
- package/dist/layout/neato/__fixtures__/quad-prog-vpsc.d.ts +6 -0
- package/dist/layout/neato/__fixtures__/quad-prog-vpsc.d.ts.map +1 -1
- package/dist/layout/neato/circuit.d.ts +38 -0
- package/dist/layout/neato/circuit.d.ts.map +1 -1
- package/dist/layout/neato/constrained-majorization.d.ts.map +1 -1
- package/dist/layout/neato/index.d.ts +6 -3
- package/dist/layout/neato/index.d.ts.map +1 -1
- package/dist/layout/neato/init.d.ts.map +1 -1
- package/dist/layout/neato/kk-paths.d.ts +11 -1
- package/dist/layout/neato/kk-paths.d.ts.map +1 -1
- package/dist/layout/neato/kk-solve.d.ts.map +1 -1
- package/dist/layout/neato/kk.d.ts +5 -3
- package/dist/layout/neato/kk.d.ts.map +1 -1
- package/dist/layout/neato/kkutils.d.ts +45 -0
- package/dist/layout/neato/kkutils.d.ts.map +1 -1
- package/dist/layout/neato/start.d.ts +11 -10
- package/dist/layout/neato/start.d.ts.map +1 -1
- package/dist/layout/neato/stress-models.d.ts +25 -19
- package/dist/layout/neato/stress-models.d.ts.map +1 -1
- package/dist/render.js +914 -813
- package/dist/render.js.map +4 -4
- package/dist/vpsc/SweepLine.d.ts +21 -8
- package/dist/vpsc/SweepLine.d.ts.map +1 -1
- package/dist/vpsc/sweepTypes.d.ts +12 -2
- package/dist/vpsc/sweepTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/graph-init.ts +5 -1
- package/src/common/htmltable.ts +6 -4
- package/src/common/poly-init.ts +35 -15
- package/src/common/safefile.ts +20 -2
- package/src/gvc/__fixtures__/p8/bad.png +1 -0
- package/src/gvc/__fixtures__/p8/d/r.png +0 -0
- package/src/gvc/__fixtures__/p8/html-img-bad.gv +1 -0
- package/src/gvc/__fixtures__/p8/html-img-bad.svg +19 -0
- package/src/gvc/__fixtures__/p8/html-img-bad.svg.stderr +3 -0
- package/src/gvc/__fixtures__/p8/html-img-bad.xdot +13 -0
- package/src/gvc/__fixtures__/p8/html-img-bad.xdot.stderr +3 -0
- package/src/gvc/__fixtures__/p8/ip-shapefile.gv +1 -0
- package/src/gvc/__fixtures__/p8/ip-shapefile.svg +19 -0
- package/src/gvc/__fixtures__/p8/ip-shapefile.svg.stderr +0 -0
- package/src/gvc/__fixtures__/p8/ip-shapefile.xdot +15 -0
- package/src/gvc/__fixtures__/p8/ip-shapefile.xdot.stderr +0 -0
- package/src/gvc/__fixtures__/p8/regen.sh +13 -0
- package/src/gvc/image-resolver.ts +8 -0
- package/src/gvc/usershape.ts +5 -0
- package/src/layout/neato/__fixtures__/kk-models.ts +82 -0
- package/src/layout/neato/__fixtures__/models/hier-circuit.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-circuit.xdot +92 -0
- package/src/layout/neato/__fixtures__/models/hier-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-default.gv +14 -0
- package/src/layout/neato/__fixtures__/models/hier-default.xdot +91 -0
- package/src/layout/neato/__fixtures__/models/hier-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-disc-circuit.gv +9 -0
- package/src/layout/neato/__fixtures__/models/hier-disc-circuit.xdot +54 -0
- package/src/layout/neato/__fixtures__/models/hier-disc-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-len-circuit.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-len-circuit.xdot +97 -0
- package/src/layout/neato/__fixtures__/models/hier-len-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-len-mds.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-len-mds.xdot +97 -0
- package/src/layout/neato/__fixtures__/models/hier-len-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-len-subset.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-len-subset.xdot +97 -0
- package/src/layout/neato/__fixtures__/models/hier-len-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-long-mds.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-long-mds.xdot +95 -0
- package/src/layout/neato/__fixtures__/models/hier-long-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-mds-nolen.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-mds-nolen.xdot +92 -0
- package/src/layout/neato/__fixtures__/models/hier-mds-nolen.xdot.stderr +2 -0
- package/src/layout/neato/__fixtures__/models/hier-pin-disc-circuit.gv +10 -0
- package/src/layout/neato/__fixtures__/models/hier-pin-disc-circuit.xdot +54 -0
- package/src/layout/neato/__fixtures__/models/hier-pin-disc-circuit.xdot.stderr +3 -0
- package/src/layout/neato/__fixtures__/models/hier-shortpath.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-shortpath.xdot +92 -0
- package/src/layout/neato/__fixtures__/models/hier-shortpath.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/hier-subset.gv +15 -0
- package/src/layout/neato/__fixtures__/models/hier-subset.xdot +92 -0
- package/src/layout/neato/__fixtures__/models/hier-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-circuit.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-circuit.xdot +81 -0
- package/src/layout/neato/__fixtures__/models/kk-circuit.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-default.gv +14 -0
- package/src/layout/neato/__fixtures__/models/kk-default.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/kk-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit-pack.gv +10 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit-pack.native-crash +1 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit-pack.xdot +0 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit-pack.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit.gv +9 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit.xdot +49 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-circuit.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-shortpath-pack.gv +10 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-shortpath-pack.xdot +50 -0
- package/src/layout/neato/__fixtures__/models/kk-disc-shortpath-pack.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-circuit-pack.gv +13 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-circuit-pack.native-crash +1 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-circuit-pack.xdot +0 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-circuit-pack.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-shortpath-pack.gv +13 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-shortpath-pack.xdot +66 -0
- package/src/layout/neato/__fixtures__/models/kk-disc4-shortpath-pack.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-circuit.gv +11 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-circuit.xdot +51 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-circuit.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-circuit.gv +11 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-circuit.xdot +57 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-circuit.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-mds.gv +11 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-mds.xdot +57 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-len-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-long-mds.gv +11 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-long-mds.xdot +57 -0
- package/src/layout/neato/__fixtures__/models/kk-iso-long-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-large.gv +203 -0
- package/src/layout/neato/__fixtures__/models/kk-large.pow.json +1088 -0
- package/src/layout/neato/__fixtures__/models/kk-large.xdot +1208 -0
- package/src/layout/neato/__fixtures__/models/kk-large.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-len-circuit.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-len-circuit.xdot +86 -0
- package/src/layout/neato/__fixtures__/models/kk-len-circuit.xdot.stderr +4 -0
- package/src/layout/neato/__fixtures__/models/kk-len-mds.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-len-mds.xdot +86 -0
- package/src/layout/neato/__fixtures__/models/kk-len-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-len-subset.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-len-subset.xdot +86 -0
- package/src/layout/neato/__fixtures__/models/kk-len-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-mds-nolen.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-mds-nolen.xdot +81 -0
- package/src/layout/neato/__fixtures__/models/kk-mds-nolen.xdot.stderr +2 -0
- package/src/layout/neato/__fixtures__/models/kk-shortpath.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-shortpath.xdot +81 -0
- package/src/layout/neato/__fixtures__/models/kk-shortpath.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/kk-subset.gv +15 -0
- package/src/layout/neato/__fixtures__/models/kk-subset.xdot +81 -0
- package/src/layout/neato/__fixtures__/models/kk-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/large-circuit.gv +203 -0
- package/src/layout/neato/__fixtures__/models/large-circuit.xdot +1208 -0
- package/src/layout/neato/__fixtures__/models/large-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-circuit.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-circuit.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-default.gv +13 -0
- package/src/layout/neato/__fixtures__/models/major-default.xdot +79 -0
- package/src/layout/neato/__fixtures__/models/major-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-disc-circuit.gv +8 -0
- package/src/layout/neato/__fixtures__/models/major-disc-circuit.xdot +48 -0
- package/src/layout/neato/__fixtures__/models/major-disc-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-len-circuit.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-len-circuit.xdot +85 -0
- package/src/layout/neato/__fixtures__/models/major-len-circuit.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-len-mds.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-len-mds.xdot +85 -0
- package/src/layout/neato/__fixtures__/models/major-len-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-len-subset.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-len-subset.xdot +85 -0
- package/src/layout/neato/__fixtures__/models/major-len-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-long-mds.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-long-mds.xdot +83 -0
- package/src/layout/neato/__fixtures__/models/major-long-mds.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-long-shortpath.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-long-shortpath.xdot +83 -0
- package/src/layout/neato/__fixtures__/models/major-long-shortpath.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-mds-edge-default.gv +15 -0
- package/src/layout/neato/__fixtures__/models/major-mds-edge-default.xdot +81 -0
- package/src/layout/neato/__fixtures__/models/major-mds-edge-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen-anon.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen-anon.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen-anon.xdot.stderr +2 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-mds-nolen.xdot.stderr +2 -0
- package/src/layout/neato/__fixtures__/models/major-model-Subset.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-model-Subset.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-model-Subset.xdot.stderr +1 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo-anon.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo-anon.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo-anon.xdot.stderr +1 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-model-foo.xdot.stderr +1 -0
- package/src/layout/neato/__fixtures__/models/major-pin-disc-circuit.gv +9 -0
- package/src/layout/neato/__fixtures__/models/major-pin-disc-circuit.xdot +48 -0
- package/src/layout/neato/__fixtures__/models/major-pin-disc-circuit.xdot.stderr +2 -0
- package/src/layout/neato/__fixtures__/models/major-shortpath.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-shortpath.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-shortpath.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/major-subset.gv +14 -0
- package/src/layout/neato/__fixtures__/models/major-subset.xdot +80 -0
- package/src/layout/neato/__fixtures__/models/major-subset.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/models/regen.sh +46 -0
- package/src/layout/neato/__fixtures__/quad-prog-vpsc.ts +7 -1
- package/src/layout/neato/circuit.ts +67 -2
- package/src/layout/neato/constrained-majorization.ts +5 -22
- package/src/layout/neato/index.ts +41 -14
- package/src/layout/neato/init.ts +9 -13
- package/src/layout/neato/kk-paths.ts +23 -1
- package/src/layout/neato/kk-solve.ts +5 -3
- package/src/layout/neato/kk.ts +53 -21
- package/src/layout/neato/kkutils.ts +108 -3
- package/src/layout/neato/start.ts +20 -65
- package/src/layout/neato/stress-models.ts +55 -59
- package/src/layout/pack/index.ts +2 -2
- package/src/vpsc/SweepLine.ts +39 -26
- package/src/vpsc/sweepTypes.ts +13 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expected results for the KK distance primitives, captured from a native
|
|
3
|
+
* clang -O3 -flto=thin -arch arm64 harness that links the oracle's own
|
|
4
|
+
* lib/neatogen/libneatogen.a (graphviz 16.1.0):
|
|
5
|
+
* plans/post-16-1-followups-8/harness/T2/. Generated by its gen.py: do not hand-edit.
|
|
6
|
+
*
|
|
7
|
+
* `SUBSET_CASES` call `makeGraphData(MODE_KK, MODEL_SUBSET)`, `compute_new_weights`
|
|
8
|
+
* and `compute_apsp_artificial_weights`; `RAW_CASES` start from hand-built rows.
|
|
9
|
+
* `CIRCUIT_CASES` call `circuit_model`. It indexes Gm by the 1-based AGSEQ, so
|
|
10
|
+
* `rv` is 0 on every graph and GD_dist stays at `before`. `gm` is the matrix
|
|
11
|
+
* solveCircuit hands to matinv, from a copy of circuit.c with `matinv` redirected.
|
|
12
|
+
* Graphs whose last-created node has an edge usually exit 139 (Gm[nG]);
|
|
13
|
+
* `circuitTries` and `gmTries` are the runs it took to get one that survived.
|
|
14
|
+
* `kk-last-edge` ends in a node joined to seq 1: Gm[1][n] lands in row 2 column 0.
|
|
15
|
+
* `kk-disc-iso` is the disconnected graph with an isolated last node, because
|
|
16
|
+
* `models/kk-disc-circuit.gv` exits 139 in every harness run.
|
|
17
|
+
*/
|
|
18
|
+
/** One `vtx_data` row; `ewgts: null` is C `NULL`. */
|
|
19
|
+
export interface KkRow {
|
|
20
|
+
readonly edges: readonly number[];
|
|
21
|
+
readonly ewgts: readonly number[] | null;
|
|
22
|
+
}
|
|
23
|
+
/** The native kkutils.c results for one set of rows. */
|
|
24
|
+
export interface KkWeightsCase {
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly n: number;
|
|
27
|
+
readonly rows: readonly KkRow[];
|
|
28
|
+
/** Rows after `compute_new_weights`. */
|
|
29
|
+
readonly weights: readonly KkRow[];
|
|
30
|
+
/** `compute_apsp_artificial_weights`, row-major. */
|
|
31
|
+
readonly dij: readonly number[];
|
|
32
|
+
/** `graph[0].ewgts == NULL` after the call. */
|
|
33
|
+
readonly ewgts0Null: 0 | 1;
|
|
34
|
+
/** Rows after the call when the caller had ewgts, else `null`. */
|
|
35
|
+
readonly after: readonly KkRow[] | null;
|
|
36
|
+
}
|
|
37
|
+
/** A `KkWeightsCase` whose rows come from `makeGraphData` on a DOT source. */
|
|
38
|
+
export interface KkSubsetCase extends KkWeightsCase {
|
|
39
|
+
readonly source: string;
|
|
40
|
+
}
|
|
41
|
+
/** One native `circuit_model` call. All matrices are row-major. */
|
|
42
|
+
export interface KkCircuitCase {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly source: string;
|
|
45
|
+
readonly n: number;
|
|
46
|
+
readonly rv: 0 | 1;
|
|
47
|
+
/** `GD_dist` before the call (`Initial_dist`). */
|
|
48
|
+
readonly before: readonly number[];
|
|
49
|
+
/** `GD_dist` after the call. */
|
|
50
|
+
readonly after: readonly number[];
|
|
51
|
+
/** `Gm` after solveCircuit set its diagonal. */
|
|
52
|
+
readonly gm: readonly number[];
|
|
53
|
+
readonly circuitTries: number;
|
|
54
|
+
readonly gmTries: number;
|
|
55
|
+
}
|
|
56
|
+
export declare const SUBSET_CASES: readonly KkSubsetCase[];
|
|
57
|
+
export declare const RAW_CASES: readonly KkWeightsCase[];
|
|
58
|
+
export declare const CIRCUIT_CASES: readonly KkCircuitCase[];
|
|
59
|
+
//# sourceMappingURL=kk-models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kk-models.d.ts","sourceRoot":"","sources":["../../../../src/layout/neato/__fixtures__/kk-models.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,qDAAqD;AACrD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;CAC1C;AAED,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC;IAChC,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,oDAAoD;IACpD,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,SAAS,KAAK,EAAE,GAAG,IAAI,CAAC;CACzC;AAED,8EAA8E;AAC9E,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,gCAAgC;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,YAAY,EAK/C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAAS,aAAa,EAG7C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,aAAa,EAQjD,CAAC"}
|
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
* Floats are printed as %.17g of the float value; constraint gaps are doubles.
|
|
24
24
|
* Inputs are seeded pseudo-random (mulberry32). Generated data: do not
|
|
25
25
|
* hand-edit (generator and harness are archived under plans/).
|
|
26
|
+
*
|
|
27
|
+
* Native output on a tie varies run to run with heap addresses. "cluster dir0"
|
|
28
|
+
* holds the native variant e665a3280a1a (about 1 run in 10: a pass of
|
|
29
|
+
* `IncVPSC::splitBlocks` goes on to visit a split's new blocks, as the port's
|
|
30
|
+
* Set does); only its fourth step differs from the commoner f3685bd04945
|
|
31
|
+
* (part-8 AD-8).
|
|
26
32
|
*/
|
|
27
33
|
import type { IpsepOptions } from '../quad-prog-vpsc.js';
|
|
28
34
|
import type { DirectedVtxData } from '../opt-arrangement.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quad-prog-vpsc.d.ts","sourceRoot":"","sources":["../../../../src/layout/neato/__fixtures__/quad-prog-vpsc.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"quad-prog-vpsc.d.ts","sourceRoot":"","sources":["../../../../src/layout/neato/__fixtures__/quad-prog-vpsc.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,8CAA8C;AAC9C,MAAM,MAAM,MAAM,GACd;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAC5F;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7G,QAAQ,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,GAC9D;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,CAAC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B,SAAS,CAAC,CAAC,EAAE,QAAQ,GAAG,YAAY,CAiBnD;AAED,sFAAsF;AACtF,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,GAAG,eAAe,EAAE,GAAG,IAAI,CAI7D"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resistor-circuit current model for node distances, an alternative to
|
|
3
|
+
* shortest paths. `circuitModel` here is circuit.c's `circuit_model` (`GD_dist`
|
|
4
|
+
* from a graph, KK path); `stress-models.ts`'s `circuitModel` is stress.c's
|
|
5
|
+
* (float `Dij` from `vtx_data`, stress path). Both use `solveCircuit`.
|
|
6
|
+
* @see lib/neatogen/circuit.c
|
|
7
|
+
*/
|
|
8
|
+
import type { Graph } from '../../model/graph.js';
|
|
9
|
+
import type { Edge } from '../../model/edge.js';
|
|
1
10
|
/**
|
|
2
11
|
* Set each diagonal entry of the conductance matrix `Gm` to minus the sum of
|
|
3
12
|
* its row, then invert the leading (nG-1) minor into `GmInv` ("ignore nth
|
|
@@ -7,4 +16,33 @@
|
|
|
7
16
|
* @see lib/neatogen/circuit.c:solveCircuit
|
|
8
17
|
*/
|
|
9
18
|
export declare function solveCircuit(nG: number, Gm: Float64Array[], GmInv: Float64Array[]): 0 | 1;
|
|
19
|
+
/**
|
|
20
|
+
* The conductances `circuit_model` gives `solveCircuit`. C indexes `Gm` by the
|
|
21
|
+
* 1-based `AGSEQ` (`node.id + 1`). `new_array` is one contiguous block behind row
|
|
22
|
+
* pointers, so `Gm[i][j]` is flat cell `i*nG+j`: j == nG lands in row i+1 column
|
|
23
|
+
* 0, and a seq past nG (a pack=true component) can land anywhere in the block.
|
|
24
|
+
* A cell past the block is dropped, the model `kk-paths.ts:mdsModel` uses for
|
|
25
|
+
* the same overflow: i >= nG reads past C's row pointers and usually crashes
|
|
26
|
+
* (exit 139), and a run that survives writes outside the block. Row 0 is never
|
|
27
|
+
* written, which is why `solveCircuit` fails on every graph.
|
|
28
|
+
* @see lib/neatogen/circuit.c:circuit_model (circuit.c:40, 43-53)
|
|
29
|
+
*/
|
|
30
|
+
export declare function circuitConductances(g: Graph, nG: number, lens: ReadonlyMap<Edge, number>): Float64Array[];
|
|
31
|
+
/**
|
|
32
|
+
* Fill `GD_dist` (flat, nG*nG) from the inverted conductance matrix.
|
|
33
|
+
* @see lib/neatogen/circuit.c:circuit_model (circuit.c:57-63)
|
|
34
|
+
*/
|
|
35
|
+
export declare function circuitDistances(GmInv: readonly Float64Array[], nG: number, dist: Float64Array): void;
|
|
36
|
+
/**
|
|
37
|
+
* Overwrite `GD_dist` with resistance distances; true on success, false with
|
|
38
|
+
* `dist` untouched when `solveCircuit` fails. It always fails for nG >= 2 because
|
|
39
|
+
* row 0 of `Gm` is never written (see {@link circuitConductances}), so native KK
|
|
40
|
+
* `model=circuit` always falls back to shortest paths. kkNeato's guard keeps
|
|
41
|
+
* nG = 1 out (`lu_decompose` with n = 0 is undefined behaviour in C).
|
|
42
|
+
*
|
|
43
|
+
* `dist` and `lens` are parameters, not C's `GD_dist(g)` and `ED_dist(e)`:
|
|
44
|
+
* `kk.ts` holds both per run (`KkState.dist`, `setEdgeLens`), not on the graph.
|
|
45
|
+
* @see lib/neatogen/circuit.c:circuit_model
|
|
46
|
+
*/
|
|
47
|
+
export declare function circuitModel(g: Graph, nG: number, dist: Float64Array, lens: ReadonlyMap<Edge, number>): boolean;
|
|
10
48
|
//# sourceMappingURL=circuit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circuit.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/circuit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"circuit.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/circuit.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAIhD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,GAAG,CAAC,CAWzF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,YAAY,EAAE,CAezG;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAMrG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAQ/G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constrained-majorization.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/constrained-majorization.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"constrained-majorization.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/constrained-majorization.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAOhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA6B5D,qEAAqE;AACrE,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAwWD;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,eAAe,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,aAAa,GAC5F,MAAM,CAyBR"}
|
|
@@ -21,10 +21,13 @@ export { MODE_KK, MODE_MAJOR, MODE_HIER, MODE_IPSEP, MODE_SGD, MODEL_SHORTPATH,
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function parseMode(g: Graph): number;
|
|
23
23
|
/**
|
|
24
|
-
* Parse `
|
|
25
|
-
*
|
|
24
|
+
* Parse the root `model` attribute into a numeric model constant (init.ts
|
|
25
|
+
* numbering). Unset or empty is MODEL_SHORTPATH; `circuit`, `subset` and
|
|
26
|
+
* `shortpath` match case-sensitively. `mds` stands only when the edge attribute
|
|
27
|
+
* `len` is declared, else it warns and reverts to MODEL_SHORTPATH; any other
|
|
28
|
+
* value warns and is ignored. Call once, where neato_layout does.
|
|
26
29
|
*
|
|
27
|
-
* @see lib/neatogen/
|
|
30
|
+
* @see lib/neatogen/neatoinit.c:neatoModel (605-627)
|
|
28
31
|
*/
|
|
29
32
|
export declare function parseModel(g: Graph): number;
|
|
30
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/index.ts"],"names":[],"mappings":"AACA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Y,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAW3C"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Kamada-Kawai ideal-distance setup: Dijkstra over edge lengths with C's
|
|
3
3
|
* binary heap (`neato_enqueue`/`neato_dequeue`, `shortest_path`, `s1`,
|
|
4
|
-
* `make_spring`) and `mds_model`.
|
|
4
|
+
* `make_spring`), `subset_model` and `mds_model`.
|
|
5
5
|
*
|
|
6
6
|
* The C keeps the heap, its size and the source node in file-statics and the
|
|
7
7
|
* per-node `ND_dist`/`ND_hops`/`ND_heapindex` in node records; here they live
|
|
8
8
|
* in one {@link PathState} per run (no module state), indexed by `ND_id`.
|
|
9
9
|
*
|
|
10
10
|
* @see lib/neatogen/stuff.c
|
|
11
|
+
* @see lib/neatogen/neatoinit.c
|
|
11
12
|
*/
|
|
13
|
+
import type { Graph } from '../../model/graph.js';
|
|
12
14
|
/** One neighbour of a node: its id and the edge's `ED_dist`. */
|
|
13
15
|
export interface Neighbour {
|
|
14
16
|
readonly id: number;
|
|
@@ -36,6 +38,14 @@ export interface PathState {
|
|
|
36
38
|
export declare function newPathState(n: number, dist: Float64Array, adj: readonly (readonly Neighbour[])[], initialDist: number): PathState;
|
|
37
39
|
/** All-pairs shortest paths into `GD_dist`. @see lib/neatogen/stuff.c:shortest_path */
|
|
38
40
|
export declare function shortestPath(s: PathState): void;
|
|
41
|
+
/**
|
|
42
|
+
* Overwrite `GD_dist` (flat, nG*nG) with the artificial-weight distances.
|
|
43
|
+
* `makeGraphDataC` with neither `len` nor direction builds the rows of C's
|
|
44
|
+
* `makeGraphData(MODE_KK, MODEL_SUBSET)`; it reads `ND_id`, which
|
|
45
|
+
* `scan_graph_mode` has set.
|
|
46
|
+
* @see lib/neatogen/neatoinit.c:subset_model
|
|
47
|
+
*/
|
|
48
|
+
export declare function subsetModel(g: Graph, nG: number, dist: Float64Array): void;
|
|
39
49
|
/**
|
|
40
50
|
* Overwrite `GD_dist` with edge lengths. C indexes the matrix with `AGSEQ`
|
|
41
51
|
* (1-based), so the last node's row falls outside the n*n allocation (heap
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kk-paths.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk-paths.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"kk-paths.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk-paths.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAIlD,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,CAAC;IAChD,sBAAsB;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,iBAAiB;IACjB,QAAQ,CAAC,EAAE,EAAE,YAAY,CAAC;IAC1B,iBAAiB;IACjB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAC1B,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,GACzF,SAAS,CAOX;AA+ED,uFAAuF;AACvF,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,GAAG,IAAI,CAE/C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAQ1E;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GACjG,IAAI,CAKN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kk-solve.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk-solve.ts"],"names":[],"mappings":"AACA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"kk-solve.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk-solve.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAmCH;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAkBxF"}
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* typed arrays here; the file-statics (`Epsilon`, `Damping`, `MaxIter`,
|
|
9
9
|
* `Initial_dist`) are fields of one {@link KkState} per run.
|
|
10
10
|
*
|
|
11
|
+
* The oracle's clang contracts `a + b*c` within one statement
|
|
12
|
+
* (`-ffp-contract=on`), so those sites go through `fma`/`fms`. The Newton step's
|
|
13
|
+
* iteration count depends on these last bits.
|
|
14
|
+
*
|
|
11
15
|
* Not ported: `Verbose` output (`total_e`, timers), `test_toggle` tracing,
|
|
12
16
|
* and `Reduce` (`-x`, a command-line flag this library has no counterpart for).
|
|
13
17
|
*
|
|
@@ -35,9 +39,7 @@ export interface KkState {
|
|
|
35
39
|
move: number;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
|
-
* Solve the layout with Kamada-Kawai gradient descent.
|
|
39
|
-
* circuit distance models stay loud in `start.ts:assertSupported`; a
|
|
40
|
-
* disconnected circuit falls back to shortest paths there too.
|
|
42
|
+
* Solve the layout with Kamada-Kawai gradient descent.
|
|
41
43
|
* @see lib/neatogen/neatoinit.c:kkNeato
|
|
42
44
|
*/
|
|
43
45
|
export declare function kkNeato(g: Graph, nG: number, model: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kk.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"kk.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kk.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAyBhD,gFAAgF;AAChF,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IAChC,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,wBAAwB;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,0BAA0B;IAC1B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,wBAAwB;IACxB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAoRD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CASjE"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import type { VtxData } from './dijkstra.js';
|
|
2
|
+
/**
|
|
3
|
+
* Count the neighbours of `u` marked in `vVector`.
|
|
4
|
+
* @see lib/neatogen/kkutils.c:common_neighbors
|
|
5
|
+
*/
|
|
6
|
+
export declare function commonNeighbors(graph: readonly VtxData[], u: number, vVector: Int32Array): number;
|
|
7
|
+
/**
|
|
8
|
+
* Mark the neighbours of `vtx` (a node is NOT a neighbour of itself).
|
|
9
|
+
* @see lib/neatogen/kkutils.c:fill_neighbors_vec_unweighted
|
|
10
|
+
*/
|
|
11
|
+
export declare function fillNeighborsVecUnweighted(graph: readonly VtxData[], vtx: number, vtxVec: Int32Array): void;
|
|
12
|
+
/**
|
|
13
|
+
* Clear the marks set by `fillNeighborsVecUnweighted`.
|
|
14
|
+
* @see lib/neatogen/kkutils.c:empty_neighbors_vec
|
|
15
|
+
*/
|
|
16
|
+
export declare function emptyNeighborsVec(graph: readonly VtxData[], vtx: number, vtxVec: Int32Array): void;
|
|
2
17
|
/**
|
|
3
18
|
* Sort `ordering[0..size)` by ascending `place[ordering[i]]`.
|
|
4
19
|
* @see lib/neatogen/kkutils.c:quicksort_place
|
|
@@ -17,4 +32,34 @@ export declare function quicksortPlacef(place: Float32Array, ordering: Int32Arra
|
|
|
17
32
|
* @see lib/neatogen/kkutils.c:compute_apsp
|
|
18
33
|
*/
|
|
19
34
|
export declare function computeApsp(graph: VtxData[], n: number): Int32Array[];
|
|
35
|
+
/**
|
|
36
|
+
* The artificial weight of edge (i, neighbor): `deg_i + deg_j - 2 * common`
|
|
37
|
+
* in C `size_t`, so a negative value (only possible with duplicate
|
|
38
|
+
* neighbours) wraps modulo 2^64 before the (float) cast.
|
|
39
|
+
* @see lib/neatogen/kkutils.c:compute_new_weights (kkutils.c:186-188)
|
|
40
|
+
* @see lib/neatogen/stress.c:compute_apsp_artificial_weights_packed (stress.c:735-736, 752-753)
|
|
41
|
+
*/
|
|
42
|
+
export declare function artificialWeight(graph: readonly VtxData[], degI: number, neighbor: number, vtxVec: Int32Array): number;
|
|
43
|
+
/**
|
|
44
|
+
* Reweight the graph so that high degree nodes will be separated. C walks a
|
|
45
|
+
* pointer through one buffer of sum(nedges) floats; the port allocates each
|
|
46
|
+
* vertex's slice.
|
|
47
|
+
* @see lib/neatogen/kkutils.c:compute_new_weights
|
|
48
|
+
*/
|
|
49
|
+
export declare function computeNewWeights(graph: VtxData[], n: number): void;
|
|
50
|
+
/**
|
|
51
|
+
* Drop the new weights and give the caller's back. C's `old_weights` is the one
|
|
52
|
+
* block it walks by `nedges`; the port's is one array per vertex, `null` for C
|
|
53
|
+
* `NULL`. With `null` only graph[0].ewgts is cleared, so graph[1..n-1].ewgts
|
|
54
|
+
* keep the new weights (C: dangling pointers into the freed buffer).
|
|
55
|
+
* @see lib/neatogen/kkutils.c:restore_old_weights
|
|
56
|
+
*/
|
|
57
|
+
export declare function restoreOldWeights(graph: VtxData[], n: number, oldWeights: readonly number[][] | null): void;
|
|
58
|
+
/**
|
|
59
|
+
* All-pairs shortest-path lengths as `DistType` (int) rows while weighting the
|
|
60
|
+
* graph so high-degree nodes are distantly located: always Dijkstra, over the
|
|
61
|
+
* int-truncated new weights.
|
|
62
|
+
* @see lib/neatogen/kkutils.c:compute_apsp_artificial_weights
|
|
63
|
+
*/
|
|
64
|
+
export declare function computeApspArtificialWeights(graph: VtxData[], n: number): Int32Array[];
|
|
20
65
|
//# sourceMappingURL=kkutils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kkutils.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/kkutils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kkutils.d.ts","sourceRoot":"","sources":["../../../src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EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,CAO3G;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,EAAE,CAMtF"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Neato `start` handling (setSeed / initRegular / checkStart) and the
|
|
3
|
-
* fail-loud
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `stress_majorization_cola`, which ports both models and takes no smart init.
|
|
3
|
+
* fail-loud check for the neato init feature this port does not have (smart
|
|
4
|
+
* init for the stress path). mode=hier runs `stress_majorization_with_hierarchy`;
|
|
5
|
+
* its own unported smart-init fallback without a hierarchy is loud in
|
|
6
|
+
* constrained-majorization.ts. mode=ipsep runs `stress_majorization_cola`, which
|
|
7
|
+
* takes no smart init.
|
|
9
8
|
*
|
|
10
|
-
*
|
|
11
|
-
* fires only for the
|
|
9
|
+
* The loud check sits where neato's C branches into the unported code and
|
|
10
|
+
* fires only for the mode whose C path reaches it (ADR-3).
|
|
12
11
|
*
|
|
13
12
|
* @see lib/neatogen/neatoinit.c
|
|
14
13
|
*/
|
|
@@ -19,6 +18,8 @@ export declare const INIT_SELF = 0;
|
|
|
19
18
|
export declare const INIT_REGULAR = 1;
|
|
20
19
|
/** @see lib/neatogen/neato.h:INIT_RANDOM */
|
|
21
20
|
export declare const INIT_RANDOM = 2;
|
|
21
|
+
/** KK and SGD warn once and ignore start=self. @see lib/neatogen/stuff.c:330 */
|
|
22
|
+
export declare function warnStartSelfOnce(): void;
|
|
22
23
|
/**
|
|
23
24
|
* Classify the `start` attribute: keyword prefix, digit-led (random), else the
|
|
24
25
|
* default. A random seed comes from the digits following the keyword; with
|
|
@@ -48,8 +49,8 @@ export declare function checkStart(g: Graph, nG?: number, dflt?: number): number
|
|
|
48
49
|
export declare function neatoMode(g: Graph): number;
|
|
49
50
|
/**
|
|
50
51
|
* Throw UNSUPPORTED_FEATURE where neato's C would run unported init code for
|
|
51
|
-
* this mode/
|
|
52
|
+
* this mode/start. Call after the nG < 2 guard.
|
|
52
53
|
* @see lib/neatogen/neatoinit.c:neatoLayout
|
|
53
54
|
*/
|
|
54
|
-
export declare function assertSupported(g: Graph, mode: number
|
|
55
|
+
export declare function assertSupported(g: Graph, mode: number): void;
|
|
55
56
|
//# sourceMappingURL=start.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/start.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/start.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAQlD,0CAA0C;AAC1C,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,6CAA6C;AAC7C,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,4CAA4C;AAC5C,eAAO,MAAM,WAAW,IAAI,CAAC;AAuB7B,gFAAgF;AAChF,wBAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAYhC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAStD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,CAAC,EAAE,KAAK,EAAE,EAAE,GAAE,MAAqB,EAAE,IAAI,GAAE,MAAoB,GAC9D,MAAM,CAQR;AAsBD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAO1C;AAaD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAG5D"}
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The subset and circuit distance models of stress majorization,
|
|
3
|
-
*
|
|
4
|
-
* kkutils.ts
|
|
2
|
+
* The subset and circuit distance models of stress majorization, and the choice
|
|
3
|
+
* of `Dij` among them. The kkutils.c neighbour-vector helpers they use live in
|
|
4
|
+
* kkutils.ts, re-exported here.
|
|
5
|
+
* `circuitModel` here is stress.c's (float `Dij` from `vtx_data`); `circuit.ts`'s
|
|
6
|
+
* `circuitModel` is circuit.c's `circuit_model` (`GD_dist` from a graph, KK path).
|
|
5
7
|
*
|
|
6
8
|
* `Dij` is C `float` (Float32Array); the circuit matrices are C `double`.
|
|
7
9
|
* C `NULL` ewgts is the port's empty array.
|
|
8
10
|
*
|
|
9
11
|
* @see lib/neatogen/stress.c
|
|
10
|
-
* @see lib/neatogen/kkutils.c
|
|
11
12
|
*/
|
|
12
13
|
import type { VtxData } from './dijkstra.js';
|
|
13
|
-
|
|
14
|
-
* Count the neighbours of `u` marked in `vVector`.
|
|
15
|
-
* @see lib/neatogen/kkutils.c:common_neighbors
|
|
16
|
-
*/
|
|
17
|
-
export declare function commonNeighbors(graph: readonly VtxData[], u: number, vVector: Int32Array): number;
|
|
18
|
-
/**
|
|
19
|
-
* Mark the neighbours of `vtx` (a node is NOT a neighbour of itself).
|
|
20
|
-
* @see lib/neatogen/kkutils.c:fill_neighbors_vec_unweighted
|
|
21
|
-
*/
|
|
22
|
-
export declare function fillNeighborsVecUnweighted(graph: readonly VtxData[], vtx: number, vtxVec: Int32Array): void;
|
|
23
|
-
/**
|
|
24
|
-
* Clear the marks set by `fillNeighborsVecUnweighted`.
|
|
25
|
-
* @see lib/neatogen/kkutils.c:empty_neighbors_vec
|
|
26
|
-
*/
|
|
27
|
-
export declare function emptyNeighborsVec(graph: readonly VtxData[], vtx: number, vtxVec: Int32Array): void;
|
|
14
|
+
export { commonNeighbors, emptyNeighborsVec, fillNeighborsVecUnweighted } from './kkutils.js';
|
|
28
15
|
/**
|
|
29
16
|
* Distances from the resistor circuit: Dij = Ginv[i][i] + Ginv[j][j] -
|
|
30
17
|
* 2 Ginv[i][j] over the inverted conductance matrix; `null` (C `NULL`) when
|
|
@@ -45,4 +32,23 @@ export declare function circuitModel(graph: readonly VtxData[], nG: number): Flo
|
|
|
45
32
|
* @see lib/neatogen/stress.c:compute_apsp_artificial_weights_packed
|
|
46
33
|
*/
|
|
47
34
|
export declare function computeApspArtificialWeightsPacked(graph: VtxData[], n: number): Float32Array;
|
|
35
|
+
/**
|
|
36
|
+
* The model branches C writes twice, with the same shape: subset, circuit
|
|
37
|
+
* (warning when it fails), mds. `null` is C's `Dij` still NULL, where each
|
|
38
|
+
* caller picks its own shortest paths. `model` is the defs.h numbering of
|
|
39
|
+
* init.ts, not stress.ts's.
|
|
40
|
+
* @see lib/neatogen/stress.c:stress_majorization_kD_mkernel (stress.c:837-852)
|
|
41
|
+
* @see lib/neatogen/constrained_majorization.c:stress_majorization_with_hierarchy (173-186)
|
|
42
|
+
*/
|
|
43
|
+
export declare function modelDistances(graph: VtxData[], n: number, model: number): Float32Array | null;
|
|
44
|
+
/**
|
|
45
|
+
* The all-pairs-shortest-distances block of `stress_majorization_kD_mkernel`:
|
|
46
|
+
* the model's matrix, else shortest paths, weighted iff `graph->ewgts`.
|
|
47
|
+
*
|
|
48
|
+
* Boundary deviation: C computes this inside the kernel, after its `maxi < 0`
|
|
49
|
+
* return. The port's fused kernel takes `Dij` as a parameter, so the caller runs
|
|
50
|
+
* this first and owns that check (part-8 AD-2).
|
|
51
|
+
* @see lib/neatogen/stress.c:stress_majorization_kD_mkernel (stress.c:833-859)
|
|
52
|
+
*/
|
|
53
|
+
export declare function stressModelDij(graph: VtxData[], n: number, model: number): Float32Array;
|
|
48
54
|
//# sourceMappingURL=stress-models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stress-models.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/stress-models.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"stress-models.d.ts","sourceRoot":"","sources":["../../../src/layout/neato/stress-models.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAU7C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAM9F;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAgCvF;AAyDD;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAwB5F;AAMD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAgB9F;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAIvF"}
|