@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
package/dist/vpsc/SweepLine.d.ts
CHANGED
|
@@ -7,17 +7,30 @@
|
|
|
7
7
|
import { Variable } from "./Variable.js";
|
|
8
8
|
import { Constraint } from "./Constraint.js";
|
|
9
9
|
import { Rectangle } from "./Solver.js";
|
|
10
|
-
import { SweepNode, SweepEvent } from "./sweepTypes.js";
|
|
11
|
-
|
|
10
|
+
import { NodeSet, SweepNode, SweepEvent } from "./sweepTypes.js";
|
|
11
|
+
/**
|
|
12
|
+
* `seq` is the `make_shared<Node>` order: the rectangle index of the pass.
|
|
13
|
+
* @see lib/vpsc/generate-constraints.cpp: Node::Node
|
|
14
|
+
*/
|
|
15
|
+
export declare function makeNode(v: Variable, r: Rectangle, pos: number, seq: number): SweepNode;
|
|
12
16
|
export declare function compareEventsSameRect(ea: SweepEvent, eb: SweepEvent): number;
|
|
13
17
|
export declare function compareEvents(ea: SweepEvent, eb: SweepEvent): number;
|
|
18
|
+
/**
|
|
19
|
+
* C++ ends with `u < v` on `Node*`. Addresses cannot be reproduced and vary run
|
|
20
|
+
* to run, so a position tie goes by creation order (part-8 AD-8).
|
|
21
|
+
* @see lib/vpsc/generate-constraints.cpp: CmpNodePos::operator()
|
|
22
|
+
*/
|
|
14
23
|
export declare function nodePosLt(a: SweepNode, b: SweepNode): boolean;
|
|
15
|
-
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
|
|
19
|
-
export declare function
|
|
20
|
-
|
|
24
|
+
/** @see lib/vpsc/generate-constraints.cpp: NodeSet::insert (std::set, so no duplicates) */
|
|
25
|
+
export declare function scanlineInsert(sl: NodeSet, node: SweepNode): void;
|
|
26
|
+
export declare function scanlineRemove(sl: NodeSet, node: SweepNode): void;
|
|
27
|
+
/** @see lib/vpsc/generate-constraints.cpp: getLeftNeighbours */
|
|
28
|
+
export declare function getLeftNeighbours(sl: NodeSet, v: SweepNode): NodeSet;
|
|
29
|
+
/** @see lib/vpsc/generate-constraints.cpp: getRightNeighbours */
|
|
30
|
+
export declare function getRightNeighbours(sl: NodeSet, v: SweepNode): NodeSet;
|
|
31
|
+
/** @see lib/vpsc/generate-constraints.cpp: Node::setNeighbours */
|
|
32
|
+
export declare function xOpenNeighbour(sl: NodeSet, v: SweepNode): void;
|
|
33
|
+
export declare function openLinkChain(sl: NodeSet, v: SweepNode): void;
|
|
21
34
|
export declare function xCloseLeft(v: SweepNode, cs: Constraint[]): void;
|
|
22
35
|
export declare function xCloseRight(v: SweepNode, cs: Constraint[]): void;
|
|
23
36
|
export declare function xCloseNeighbour(v: SweepNode, cs: Constraint[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SweepLine.d.ts","sourceRoot":"","sources":["../../src/vpsc/SweepLine.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAU,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"SweepLine.d.ts","sourceRoot":"","sources":["../../src/vpsc/SweepLine.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAU,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEzE;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAMvF;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAG5E;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,MAAM,CAKpE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAI7D;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CASjE;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAGjE;AAED,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CASpE;AAED,iEAAiE;AACjE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CASrE;AAED,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,CAO9D;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,IAAI,CAI7D;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAK/D;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAKhE;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAGpE;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAWjE;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAI,CAW3D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAU7E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAU7E;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,EAAE,EAClB,EAAE,EAAE,QAAQ,EAAE,EACd,iBAAiB,EAAE,OAAO,GACzB,UAAU,EAAE,CAkBd;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,EAAE,EAClB,EAAE,EAAE,QAAQ,EAAE,GACb,UAAU,EAAE,CAgBd"}
|
|
@@ -12,14 +12,24 @@ export declare const EvType: {
|
|
|
12
12
|
readonly Close: 1;
|
|
13
13
|
};
|
|
14
14
|
export type EvType = (typeof EvType)[keyof typeof EvType];
|
|
15
|
+
/**
|
|
16
|
+
* `std::set<Node*, CmpNodePos>`: an array kept in `nodePosLt` order.
|
|
17
|
+
* @see lib/vpsc/generate-constraints.cpp: NodeSet
|
|
18
|
+
*/
|
|
19
|
+
export type NodeSet = SweepNode[];
|
|
15
20
|
export interface SweepNode {
|
|
16
21
|
v: Variable;
|
|
17
22
|
r: Rectangle;
|
|
18
23
|
pos: number;
|
|
24
|
+
/**
|
|
25
|
+
* Creation order in this pass, standing in for the `Node*` address that
|
|
26
|
+
* `CmpNodePos` compares on a position tie (part-8 AD-8).
|
|
27
|
+
*/
|
|
28
|
+
seq: number;
|
|
19
29
|
firstAbove: SweepNode | null;
|
|
20
30
|
firstBelow: SweepNode | null;
|
|
21
|
-
leftNeighbours:
|
|
22
|
-
rightNeighbours:
|
|
31
|
+
leftNeighbours: NodeSet;
|
|
32
|
+
rightNeighbours: NodeSet;
|
|
23
33
|
}
|
|
24
34
|
export interface SweepEvent {
|
|
25
35
|
type: EvType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sweepTypes.d.ts","sourceRoot":"","sources":["../../src/vpsc/sweepTypes.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,MAAM;;;CAAiC,CAAC;AACrD,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,SAAS,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"sweepTypes.d.ts","sourceRoot":"","sources":["../../src/vpsc/sweepTypes.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,MAAM;;;CAAiC,CAAC;AACrD,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;AAElC,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,SAAS,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knowvah/dot-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Faithful TypeScript port of Graphviz (dot, neato, fdp, sfdp, circo, twopi, osage, patchwork) — no C: no native binary, no WASM. Oracle-verified against the C implementation, runs in the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphviz",
|
package/src/common/graph-init.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { doGraphLabel } from '../layout/dot/graph-label.js';
|
|
|
30
30
|
import { mapbool, setClType, LOCAL, GLOBAL, NOCLUST } from '../layout/dot/rank.js';
|
|
31
31
|
import { cround } from './arith.js';
|
|
32
32
|
import { agwarningf } from './agerr.js';
|
|
33
|
-
import { setImagePath } from './safefile.js';
|
|
33
|
+
import { setImageHooks, setImagePath } from './safefile.js';
|
|
34
34
|
|
|
35
35
|
// ---------------------------------------------------------------------------
|
|
36
36
|
// Constants — @see lib/common/const.h
|
|
@@ -278,6 +278,10 @@ export function graphInit(g: Graph, useRankdir: boolean): void {
|
|
|
278
278
|
// Gvimagepath = agget(g, "imagepath"), else Gvfilepath (unported: undefined).
|
|
279
279
|
// Set unconditionally so a previous graph's value never leaks. @see input.c:627-630
|
|
280
280
|
setImagePath(g.attrs.get('imagepath'));
|
|
281
|
+
// The layout's own sizer/resolver stand in for the filesystem safefile reads
|
|
282
|
+
// (AD-7); the context installs itself on the root before the engine runs.
|
|
283
|
+
const gvc = g.root.info.gvc;
|
|
284
|
+
setImageHooks(gvc?.imageSizer, gvc?.imageResolver);
|
|
281
285
|
|
|
282
286
|
// SKIPPED — GD_drawing(g)->quantum (input.c:640-641): derived at its only
|
|
283
287
|
// use-site, nodeinit.ts:129 — `lateDouble(g.root.attrs.get('quantum'), 0, 0)`
|
package/src/common/htmltable.ts
CHANGED
|
@@ -22,10 +22,10 @@ import type {
|
|
|
22
22
|
HtmlCell, HtmlCellContent, HtmlImage, HtmlLabel, HtmlTable, HtmlText,
|
|
23
23
|
ImageSizer,
|
|
24
24
|
} from './htmltable-types.js';
|
|
25
|
-
import { DEFAULT_DPI,
|
|
25
|
+
import { DEFAULT_DPI, imageOpenFailure, usershapeSizePts } from '../gvc/usershape.js';
|
|
26
26
|
import { registerRenderState } from './render-state.js';
|
|
27
27
|
import { PointSet } from './pointset.js';
|
|
28
|
-
import type
|
|
28
|
+
import { getGlobalImageResolver, type ImageResolver } from '../gvc/image-resolver.js';
|
|
29
29
|
import type { TextMeasurer } from './textmeasure.js';
|
|
30
30
|
import { buildLineRuns, runsAreSimple } from './htmltable-pos-runs.js';
|
|
31
31
|
import { withTableFont } from './htmltable-fontinfo.js';
|
|
@@ -142,7 +142,8 @@ const sizeHtmlImg = (img: HtmlImage, { imageSizer, imageResolver, imageDpi, stde
|
|
|
142
142
|
// share layoutHtmlTable, so guard against re-sizing (and re-warning). The
|
|
143
143
|
// returned rv still follows C on every call.
|
|
144
144
|
if (img.width !== undefined && img.height !== undefined) return missingImages.set.has(img) ? 1 : 0;
|
|
145
|
-
const
|
|
145
|
+
const resolver = imageResolver ?? getGlobalImageResolver() ?? undefined;
|
|
146
|
+
const sz = usershapeSizePts(img.src, imageDpi ?? DEFAULT_DPI, imageSizer, resolver);
|
|
146
147
|
if (sz !== null) {
|
|
147
148
|
img.width = sz.x; img.height = sz.y;
|
|
148
149
|
return 0;
|
|
@@ -150,7 +151,8 @@ const sizeHtmlImg = (img: HtmlImage, { imageSizer, imageResolver, imageDpi, stde
|
|
|
150
151
|
// Missing-image: gvusershape_open's warning (unless bytes are supplied),
|
|
151
152
|
// then zero size + the Error.
|
|
152
153
|
// @see lib/gvc/gvusershape.c:gvusershape_file_access
|
|
153
|
-
|
|
154
|
+
const failure = imageOpenFailure(img.src, imageSizer, resolver);
|
|
155
|
+
if (failure !== null) agerrLine(stderr, `Warning: ${failure}`);
|
|
154
156
|
// C: agerrorf("No or improper image file=\"%s\"\n", img->src) — agerr
|
|
155
157
|
// prefixes "Error: " on stderr.
|
|
156
158
|
agerrLine(stderr, `Error: No or improper image file="${img.src}"`);
|
package/src/common/poly-init.ts
CHANGED
|
@@ -26,7 +26,8 @@ import {
|
|
|
26
26
|
} from './make-label.js';
|
|
27
27
|
import { computeVertices } from './poly-vertices.js';
|
|
28
28
|
import { agwarningf } from './agerr.js';
|
|
29
|
-
import {
|
|
29
|
+
import { getGlobalImageResolver } from '../gvc/image-resolver.js';
|
|
30
|
+
import { imageOpenFailure, usershapeDpi, usershapeSizePts } from '../gvc/usershape.js';
|
|
30
31
|
|
|
31
32
|
// Default half-dimensions in points (72 dpi, 0.75 in wide, 0.5 in tall)
|
|
32
33
|
const DEFAULT_LW = 27;
|
|
@@ -98,13 +99,28 @@ export function buildNodeLabel(n: Node, g: Graph, measurer: TextMeasurer): void
|
|
|
98
99
|
n.info.label = makeAnyLabel(content, isHtml, font, measurer, n);
|
|
99
100
|
}
|
|
100
101
|
|
|
102
|
+
/**
|
|
103
|
+
* gvusershape_size for a custom shape's non-empty shapefile: true when the
|
|
104
|
+
* caller's hooks size it (no warning at all), else prints gvusershape_open's
|
|
105
|
+
* failure line, if any.
|
|
106
|
+
* @see lib/common/shapes.c:2033, lib/gvc/gvusershape.c:gvusershape_open
|
|
107
|
+
*/
|
|
108
|
+
function warnShapefileOpen(g: Graph, shapefile: string): boolean {
|
|
109
|
+
const gvc = g.root.info.gvc;
|
|
110
|
+
const resolver = gvc?.imageResolver ?? getGlobalImageResolver() ?? undefined;
|
|
111
|
+
if (usershapeSizePts(shapefile, usershapeDpi(g.root.attrs), gvc?.imageSizer, resolver) !== null) return true;
|
|
112
|
+
const failure = imageOpenFailure(shapefile, gvc?.imageSizer, resolver);
|
|
113
|
+
if (failure !== null) agwarningf(failure);
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
|
|
101
117
|
/**
|
|
102
118
|
* poly_init's shapefile and `image` warnings, emitted once per layout from
|
|
103
|
-
* common_init_node after the label is made. For a custom shape
|
|
104
|
-
* fails
|
|
105
|
-
*
|
|
106
|
-
* shape's `image=`, the caller-supplied sizer/resolver
|
|
107
|
-
* supplies nothing the same pair is emitted.
|
|
119
|
+
* common_init_node after the label is made. For a custom shape whose
|
|
120
|
+
* gvusershape_size fails, gvusershape_open's warning precedes the "No or
|
|
121
|
+
* improper shapefile" line; a shapefile the caller's sizer/resolver sizes prints
|
|
122
|
+
* nothing. For a non-custom shape's `image=`, the caller-supplied sizer/resolver
|
|
123
|
+
* decides; when it supplies nothing the same pair is emitted.
|
|
108
124
|
* @see lib/common/shapes.c:2027-2046
|
|
109
125
|
*/
|
|
110
126
|
export function warnPolyInitImages(n: Node, g: Graph): void {
|
|
@@ -112,16 +128,16 @@ export function warnPolyInitImages(n: Node, g: Graph): void {
|
|
|
112
128
|
if (shape.usershape) {
|
|
113
129
|
if (shape.name !== CUSTOM_SHAPE_NAME) return;
|
|
114
130
|
const shapefile = nodeAttr(n, g, 'shapefile');
|
|
115
|
-
|
|
116
|
-
if (shapefile !== undefined && shapefile !== '') agwarningf(imageOpenWarning(shapefile));
|
|
131
|
+
if (shapefile !== undefined && shapefile !== '' && warnShapefileOpen(g, shapefile)) return;
|
|
117
132
|
agwarningf(`No or improper shapefile="${shapefile ?? '<nil>'}" for node "${n.name}"`);
|
|
118
133
|
return;
|
|
119
134
|
}
|
|
120
135
|
const image = nodeAttr(n, g, 'image');
|
|
121
136
|
if (image === undefined || image === '') return;
|
|
122
137
|
const gvc = g.root.info.gvc;
|
|
123
|
-
|
|
124
|
-
|
|
138
|
+
const failure = imageOpenFailure(image, gvc?.imageSizer, gvc?.imageResolver ?? getGlobalImageResolver() ?? undefined);
|
|
139
|
+
if (failure === null) return;
|
|
140
|
+
agwarningf(failure);
|
|
125
141
|
agwarningf(`No or improper image="${image}" for node "${n.name}"`);
|
|
126
142
|
}
|
|
127
143
|
|
|
@@ -137,14 +153,18 @@ function boundShape(n: Node, g: Graph): ShapeDesc {
|
|
|
137
153
|
* poly_init's imagesize for a non-usershape's `image=`: gvusershape_size in
|
|
138
154
|
* points plus the fixed 2pt padding, and GD_has_images. Null (C's imagesize 0)
|
|
139
155
|
* when there is no image or the caller supplies no size; the missing-image
|
|
140
|
-
* warning stays in warnPolyInitImages. A custom shape
|
|
141
|
-
*
|
|
142
|
-
* @see lib/common/shapes.c:
|
|
156
|
+
* warning stays in warnPolyInitImages. A `custom` shape sizes its shapefile
|
|
157
|
+
* the same way; any other usershape has imagesize 0.
|
|
158
|
+
* @see lib/common/shapes.c:2027-2051
|
|
143
159
|
*/
|
|
144
160
|
export function nodeImageSize(n: Node, g: Graph): { x: number; y: number } | undefined {
|
|
145
|
-
|
|
161
|
+
const shape = boundShape(n, g);
|
|
162
|
+
if (shape.usershape && shape.name !== CUSTOM_SHAPE_NAME) return undefined;
|
|
146
163
|
const gvc = g.root.info.gvc;
|
|
147
|
-
const sz = usershapeSizePts(
|
|
164
|
+
const sz = usershapeSizePts(
|
|
165
|
+
shape.usershape ? nodeAttr(n, g, 'shapefile') : nodeAttr(n, g, 'image'), usershapeDpi(g.root.attrs), gvc?.imageSizer,
|
|
166
|
+
gvc?.imageResolver ?? getGlobalImageResolver() ?? undefined,
|
|
167
|
+
);
|
|
148
168
|
if (sz === null) return undefined;
|
|
149
169
|
g.root.info.has_images = true;
|
|
150
170
|
return { x: sz.x + 2, y: sz.y + 2 }; // some fixed padding
|
package/src/common/safefile.ts
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* @see lib/common/utils.c:safefile (253-311)
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import type { ImageResolver } from '../gvc/image-resolver.js';
|
|
16
|
+
import { imageIsSupplied, type ImageSizer } from '../gvc/usershape.js';
|
|
16
17
|
import { registerRenderState } from './render-state.js';
|
|
17
18
|
|
|
18
19
|
/** utils.c PATHSEP on non-Windows. */
|
|
@@ -28,6 +29,23 @@ const PATH_SEPARATOR = '/';
|
|
|
28
29
|
const imagePathState: { value: string | undefined } = { value: undefined };
|
|
29
30
|
registerRenderState(() => { imagePathState.value = undefined; });
|
|
30
31
|
|
|
32
|
+
/**
|
|
33
|
+
* The layout's effective sizer and resolver (the per-context hooks, else
|
|
34
|
+
* undefined so the global ones apply). They stand in for C's filesystem and
|
|
35
|
+
* are set beside `Gvimagepath` at graph init (AD-7).
|
|
36
|
+
*/
|
|
37
|
+
const imageHooksState: { sizer: ImageSizer | undefined; resolver: ImageResolver | undefined } = {
|
|
38
|
+
sizer: undefined,
|
|
39
|
+
resolver: undefined,
|
|
40
|
+
};
|
|
41
|
+
registerRenderState(() => { imageHooksState.sizer = undefined; imageHooksState.resolver = undefined; });
|
|
42
|
+
|
|
43
|
+
/** Record the layout's per-context image hooks; graph_init calls this per graph. */
|
|
44
|
+
export function setImageHooks(sizer: ImageSizer | undefined, resolver: ImageResolver | undefined): void {
|
|
45
|
+
imageHooksState.sizer = sizer;
|
|
46
|
+
imageHooksState.resolver = resolver;
|
|
47
|
+
}
|
|
48
|
+
|
|
31
49
|
/**
|
|
32
50
|
* graph_init's `Gvimagepath = agget(g, "imagepath")`, falling back to
|
|
33
51
|
* `Gvfilepath` (unported: it comes from the command line/environment, so the
|
|
@@ -54,7 +72,7 @@ export function mkDirlist(list: string): string[] {
|
|
|
54
72
|
* @see lib/common/utils.c:findPath
|
|
55
73
|
*/
|
|
56
74
|
function findPath(dirs: readonly string[], str: string): string | null {
|
|
57
|
-
return dirs.length > 0 && imageIsSupplied(str) ? str : null;
|
|
75
|
+
return dirs.length > 0 && imageIsSupplied(str, imageHooksState.sizer, imageHooksState.resolver) ? str : null;
|
|
58
76
|
}
|
|
59
77
|
|
|
60
78
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hello
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
digraph{a[label=<<TABLE><TR><TD><IMG SRC="bad.png"/></TD></TR></TABLE>>]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
3
|
+
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<!-- Generated by graphviz version 16.1.0 (20261012.1431)
|
|
5
|
+
-->
|
|
6
|
+
<!-- Pages: 1 -->
|
|
7
|
+
<svg width="62pt" height="44pt"
|
|
8
|
+
viewBox="0.00 0.00 62.00 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
9
|
+
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
|
10
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-40 58,-40 58,4 -4,4"/>
|
|
11
|
+
<!-- a -->
|
|
12
|
+
<g id="node1" class="node">
|
|
13
|
+
<title>a</title>
|
|
14
|
+
<ellipse fill="none" stroke="black" cx="27" cy="-18" rx="27" ry="18"/>
|
|
15
|
+
<polygon fill="none" stroke="black" points="21,-12 21,-24 33,-24 33,-12 21,-12"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="24,-15 24,-21 30,-21 30,-15 24,-15"/>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
digraph {
|
|
2
|
+
graph [_draw_="c 9 -#fffffe00 C 7 -#ffffff P 4 0 0 0 36 54 36 54 0 ",
|
|
3
|
+
bb="0,0,54,36",
|
|
4
|
+
xdotversion=1.7
|
|
5
|
+
];
|
|
6
|
+
node [label="\N"];
|
|
7
|
+
a [_draw_="c 7 -#000000 e 27 18 27 18 ",
|
|
8
|
+
_ldraw_="S 5 -solid c 7 -#000000 p 4 21 12 21 24 33 24 33 12 S 5 -solid c 7 -#000000 p 4 24 15 24 21 30 21 30 15 ",
|
|
9
|
+
height=0.5,
|
|
10
|
+
label=<<TABLE><TR><TD><IMG SRC="bad.png"/></TD></TR></TABLE>>,
|
|
11
|
+
pos="27,18",
|
|
12
|
+
width=0.75];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
digraph{imagepath="d";a[shape=custom shapefile="r.png"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
3
|
+
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<!-- Generated by graphviz version 16.1.0 (20261012.1431)
|
|
5
|
+
-->
|
|
6
|
+
<!-- Pages: 1 -->
|
|
7
|
+
<svg width="62pt" height="44pt"
|
|
8
|
+
viewBox="0.00 0.00 62.00 44.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
9
|
+
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 40)">
|
|
10
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-40 58,-40 58,4 -4,4"/>
|
|
11
|
+
<!-- a -->
|
|
12
|
+
<g id="node1" class="node">
|
|
13
|
+
<title>a</title>
|
|
14
|
+
<polygon fill="none" stroke="black" points="54,-36 0,-36 0,0 54,0 54,-36"/>
|
|
15
|
+
<image xlink:href="r.png" width="40px" height="20px" preserveAspectRatio="xMinYMin meet" x="7" y="-28"/>
|
|
16
|
+
<text xml:space="preserve" text-anchor="middle" x="27" y="-13.8" font-family="Times,serif" font-size="14.00">a</text>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
digraph {
|
|
2
|
+
graph [_draw_="c 9 -#fffffe00 C 7 -#ffffff P 4 0 0 0 36 54 36 54 0 ",
|
|
3
|
+
bb="0,0,54,36",
|
|
4
|
+
imagepath=d,
|
|
5
|
+
xdotversion=1.7
|
|
6
|
+
];
|
|
7
|
+
node [label="\N"];
|
|
8
|
+
a [_draw_="c 7 -#000000 p 4 54 36 0 36 0 0 54 0 I 7 8 40 20 5 -r.png ",
|
|
9
|
+
_ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 27 13.8 0 6.21 1 -a ",
|
|
10
|
+
height=0.5,
|
|
11
|
+
pos="27,18",
|
|
12
|
+
shape=custom,
|
|
13
|
+
shapefile="r.png",
|
|
14
|
+
width=0.75];
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: EPL-2.0
|
|
3
|
+
# Regenerates the part-8 image fixtures: graphviz 16.1.0 (oracle/16.1.0), run
|
|
4
|
+
# from this dir so relative image names resolve.
|
|
5
|
+
# Usage: GVBINDIR=<full plugin dir> bash regen.sh
|
|
6
|
+
set -u
|
|
7
|
+
DOT=${DOT:-$HOME/git/graphviz/build/cmd/dot/dot}
|
|
8
|
+
cd "$(dirname "$0")"
|
|
9
|
+
for c in html-img-bad ip-shapefile; do
|
|
10
|
+
for fmt in svg xdot; do
|
|
11
|
+
"$DOT" -T"$fmt" "$c.gv" > "$c.$fmt" 2> "$c.$fmt.stderr"
|
|
12
|
+
done
|
|
13
|
+
done
|
|
@@ -44,6 +44,14 @@ declare module './job.js' {
|
|
|
44
44
|
|
|
45
45
|
let activeResolver: ImageResolver | null = null;
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* The active global resolver (null when none is registered). Layout callers
|
|
49
|
+
* pass the effective hook explicitly (AD-6).
|
|
50
|
+
*/
|
|
51
|
+
export function getGlobalImageResolver(): ImageResolver | null {
|
|
52
|
+
return activeResolver;
|
|
53
|
+
}
|
|
54
|
+
|
|
47
55
|
/**
|
|
48
56
|
* Register (or clear, with null) the global image resolver consulted when
|
|
49
57
|
* `RenderOptions.inlineImages` is set. Mirrors gvusershape's process-global
|
package/src/gvc/usershape.ts
CHANGED
|
@@ -36,6 +36,11 @@ export function setImageSizer(sizer: ImageSizer | null): void {
|
|
|
36
36
|
activeSizer = sizer;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** The active global sizer (null when none is registered); see AD-6. */
|
|
40
|
+
export function getGlobalImageSizer(): ImageSizer | null {
|
|
41
|
+
return activeSizer;
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
/** Resolve an image source via the registered sizer; null if unresolved. */
|
|
40
45
|
export function findImageSize(src: string): { w: number; h: number } | null {
|
|
41
46
|
return activeSizer !== null ? activeSizer(src) : null;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// SPDX-License-Identifier: EPL-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Expected results for the KK distance primitives, captured from a native
|
|
4
|
+
* clang -O3 -flto=thin -arch arm64 harness that links the oracle's own
|
|
5
|
+
* lib/neatogen/libneatogen.a (graphviz 16.1.0):
|
|
6
|
+
* plans/post-16-1-followups-8/harness/T2/. Generated by its gen.py: do not hand-edit.
|
|
7
|
+
*
|
|
8
|
+
* `SUBSET_CASES` call `makeGraphData(MODE_KK, MODEL_SUBSET)`, `compute_new_weights`
|
|
9
|
+
* and `compute_apsp_artificial_weights`; `RAW_CASES` start from hand-built rows.
|
|
10
|
+
* `CIRCUIT_CASES` call `circuit_model`. It indexes Gm by the 1-based AGSEQ, so
|
|
11
|
+
* `rv` is 0 on every graph and GD_dist stays at `before`. `gm` is the matrix
|
|
12
|
+
* solveCircuit hands to matinv, from a copy of circuit.c with `matinv` redirected.
|
|
13
|
+
* Graphs whose last-created node has an edge usually exit 139 (Gm[nG]);
|
|
14
|
+
* `circuitTries` and `gmTries` are the runs it took to get one that survived.
|
|
15
|
+
* `kk-last-edge` ends in a node joined to seq 1: Gm[1][n] lands in row 2 column 0.
|
|
16
|
+
* `kk-disc-iso` is the disconnected graph with an isolated last node, because
|
|
17
|
+
* `models/kk-disc-circuit.gv` exits 139 in every harness run.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/** One `vtx_data` row; `ewgts: null` is C `NULL`. */
|
|
21
|
+
export interface KkRow {
|
|
22
|
+
readonly edges: readonly number[];
|
|
23
|
+
readonly ewgts: readonly number[] | null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** The native kkutils.c results for one set of rows. */
|
|
27
|
+
export interface KkWeightsCase {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly n: number;
|
|
30
|
+
readonly rows: readonly KkRow[];
|
|
31
|
+
/** Rows after `compute_new_weights`. */
|
|
32
|
+
readonly weights: readonly KkRow[];
|
|
33
|
+
/** `compute_apsp_artificial_weights`, row-major. */
|
|
34
|
+
readonly dij: readonly number[];
|
|
35
|
+
/** `graph[0].ewgts == NULL` after the call. */
|
|
36
|
+
readonly ewgts0Null: 0 | 1;
|
|
37
|
+
/** Rows after the call when the caller had ewgts, else `null`. */
|
|
38
|
+
readonly after: readonly KkRow[] | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** A `KkWeightsCase` whose rows come from `makeGraphData` on a DOT source. */
|
|
42
|
+
export interface KkSubsetCase extends KkWeightsCase {
|
|
43
|
+
readonly source: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** One native `circuit_model` call. All matrices are row-major. */
|
|
47
|
+
export interface KkCircuitCase {
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly source: string;
|
|
50
|
+
readonly n: number;
|
|
51
|
+
readonly rv: 0 | 1;
|
|
52
|
+
/** `GD_dist` before the call (`Initial_dist`). */
|
|
53
|
+
readonly before: readonly number[];
|
|
54
|
+
/** `GD_dist` after the call. */
|
|
55
|
+
readonly after: readonly number[];
|
|
56
|
+
/** `Gm` after solveCircuit set its diagonal. */
|
|
57
|
+
readonly gm: readonly number[];
|
|
58
|
+
readonly circuitTries: number;
|
|
59
|
+
readonly gmTries: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const SUBSET_CASES: readonly KkSubsetCase[] = [
|
|
63
|
+
{source: "graph G {\n mode=KK;\n model=subset;\n a -- b;\n b -- c;\n c -- d;\n d -- e;\n e -- f;\n f -- a;\n a -- c;\n a -- g;\n g -- h;\n c -- i;\n i -- j;\n}\n", name: "kk-subset", n: 10, rows: [{"edges":[0,1,2,6,5],"ewgts":null},{"edges":[1,2,0],"ewgts":null},{"edges":[2,3,8,0,1],"ewgts":null},{"edges":[3,4,2],"ewgts":null},{"edges":[4,5,3],"ewgts":null},{"edges":[5,0,4],"ewgts":null},{"edges":[6,7,0],"ewgts":null},{"edges":[7,6],"ewgts":null},{"edges":[8,9,2],"ewgts":null},{"edges":[9,8],"ewgts":null}], weights: [{"edges":[0,1,2,6,5],"ewgts":[0,4,6,6,6]},{"edges":[1,2,0],"ewgts":[0,4,4]},{"edges":[2,3,8,0,1],"ewgts":[0,6,6,6,4]},{"edges":[3,4,2],"ewgts":[0,4,6]},{"edges":[4,5,3],"ewgts":[0,4,4]},{"edges":[5,0,4],"ewgts":[0,6,4]},{"edges":[6,7,0],"ewgts":[0,3,6]},{"edges":[7,6],"ewgts":[0,3]},{"edges":[8,9,2],"ewgts":[0,3,6]},{"edges":[9,8],"ewgts":[0,3]}], dij: [0,4,6,12,10,6,6,9,12,15,4,0,4,10,14,10,10,13,10,13,6,4,0,6,10,12,12,15,6,9,12,10,6,0,4,8,18,21,12,15,10,14,10,4,0,4,16,19,16,19,6,10,12,8,4,0,12,15,18,21,6,10,12,18,16,12,0,3,18,21,9,13,15,21,19,15,3,0,21,24,12,10,6,12,16,18,18,21,0,3,15,13,9,15,19,21,21,24,3,0], ewgts0Null: 1, after: null},
|
|
64
|
+
{source: "graph G {\n mode=KK;\n model=subset;\n a -- b [len=1.5];\n b -- c;\n c -- d [len=0.7];\n d -- e;\n e -- f [len=2.0];\n f -- a;\n a -- c;\n a -- g [len=1.25];\n g -- h;\n c -- i;\n i -- j [len=0.5];\n}\n", name: "kk-len-subset", n: 10, rows: [{"edges":[0,1,2,6,5],"ewgts":null},{"edges":[1,2,0],"ewgts":null},{"edges":[2,3,8,0,1],"ewgts":null},{"edges":[3,4,2],"ewgts":null},{"edges":[4,5,3],"ewgts":null},{"edges":[5,0,4],"ewgts":null},{"edges":[6,7,0],"ewgts":null},{"edges":[7,6],"ewgts":null},{"edges":[8,9,2],"ewgts":null},{"edges":[9,8],"ewgts":null}], weights: [{"edges":[0,1,2,6,5],"ewgts":[0,4,6,6,6]},{"edges":[1,2,0],"ewgts":[0,4,4]},{"edges":[2,3,8,0,1],"ewgts":[0,6,6,6,4]},{"edges":[3,4,2],"ewgts":[0,4,6]},{"edges":[4,5,3],"ewgts":[0,4,4]},{"edges":[5,0,4],"ewgts":[0,6,4]},{"edges":[6,7,0],"ewgts":[0,3,6]},{"edges":[7,6],"ewgts":[0,3]},{"edges":[8,9,2],"ewgts":[0,3,6]},{"edges":[9,8],"ewgts":[0,3]}], dij: [0,4,6,12,10,6,6,9,12,15,4,0,4,10,14,10,10,13,10,13,6,4,0,6,10,12,12,15,6,9,12,10,6,0,4,8,18,21,12,15,10,14,10,4,0,4,16,19,16,19,6,10,12,8,4,0,12,15,18,21,6,10,12,18,16,12,0,3,18,21,9,13,15,21,19,15,3,0,21,24,12,10,6,12,16,18,18,21,0,3,15,13,9,15,19,21,21,24,3,0], ewgts0Null: 1, after: null},
|
|
65
|
+
{source: "graph G {\n mode=KK;\n model=circuit;\n a -- b;\n b -- c;\n c -- a;\n d -- e;\n e -- f;\n}\n", name: "kk-disc-circuit", n: 6, rows: [{"edges":[0,1,2],"ewgts":null},{"edges":[1,2,0],"ewgts":null},{"edges":[2,0,1],"ewgts":null},{"edges":[3,4],"ewgts":null},{"edges":[4,5,3],"ewgts":null},{"edges":[5,4],"ewgts":null}], weights: [{"edges":[0,1,2],"ewgts":[0,2,2]},{"edges":[1,2,0],"ewgts":[0,2,2]},{"edges":[2,0,1],"ewgts":[0,2,2]},{"edges":[3,4],"ewgts":[0,3]},{"edges":[4,5,3],"ewgts":[0,3,3]},{"edges":[5,4],"ewgts":[0,3]}], dij: [0,2,2,12,12,12,2,0,2,12,12,12,2,2,0,12,12,12,16,16,16,0,3,6,13,13,13,3,0,3,16,16,16,6,3,0], ewgts0Null: 1, after: null},
|
|
66
|
+
{source: "graph G {\n mode=KK;\n model=circuit;\n a -- b;\n b -- c;\n c -- a;\n c -- d;\n d -- e;\n e -- a;\n z;\n}\n", name: "kk-iso-circuit", n: 6, rows: [{"edges":[0,1,2,4],"ewgts":null},{"edges":[1,2,0],"ewgts":null},{"edges":[2,0,3,1],"ewgts":null},{"edges":[3,4,2],"ewgts":null},{"edges":[4,0,3],"ewgts":null},{"edges":[5],"ewgts":null}], weights: [{"edges":[0,1,2,4],"ewgts":[0,3,4,5]},{"edges":[1,2,0],"ewgts":[0,3,3]},{"edges":[2,0,3,1],"ewgts":[0,4,5,3]},{"edges":[3,4,2],"ewgts":[0,4,5]},{"edges":[4,0,3],"ewgts":[0,5,4]},{"edges":[5],"ewgts":[0]}], dij: [0,3,4,9,5,19,3,0,3,8,8,18,4,3,0,5,9,19,9,8,5,0,4,19,5,8,9,4,0,19,2147483647,2147483647,2147483647,2147483647,2147483647,0], ewgts0Null: 1, after: null},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
export const RAW_CASES: readonly KkWeightsCase[] = [
|
|
70
|
+
{name: "caller ewgts", n: 4, rows: [{"edges":[0,1,2],"ewgts":[0,7.5,0.25]},{"edges":[1,0,2],"ewgts":[0,7.5,3]},{"edges":[2,0,1],"ewgts":[0,0.25,3]},{"edges":[3],"ewgts":[0]}], weights: [{"edges":[0,1,2],"ewgts":[0,2,2]},{"edges":[1,0,2],"ewgts":[0,2,2]},{"edges":[2,0,1],"ewgts":[0,2,2]},{"edges":[3],"ewgts":[0]}], dij: [0,2,2,12,2,0,2,12,2,2,0,12,2147483647,2147483647,2147483647,0], ewgts0Null: 0, after: [{"edges":[0,1,2],"ewgts":[0,7.5,0.25]},{"edges":[1,0,2],"ewgts":[0,7.5,3]},{"edges":[2,0,1],"ewgts":[0,0.25,3]},{"edges":[3],"ewgts":[0]}]},
|
|
71
|
+
{name: "size_t wrap", n: 3, rows: [{"edges":[0,1,2],"ewgts":null},{"edges":[1,2,2,2,2],"ewgts":null},{"edges":[2],"ewgts":null}], weights: [{"edges":[0,1,2],"ewgts":[0,1.8446744073709552e+19,2]},{"edges":[1,2,2,2,2],"ewgts":[0,4,4,4,4]},{"edges":[2],"ewgts":[0]}], dij: [0,12,2,14,0,4,2147483647,2147483647,0], ewgts0Null: 1, after: null},
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
export const CIRCUIT_CASES: readonly KkCircuitCase[] = [
|
|
75
|
+
{name: "kk-circuit", source: "graph G {\n mode=KK;\n model=circuit;\n a -- b;\n b -- c;\n c -- d;\n d -- e;\n e -- f;\n f -- a;\n a -- c;\n a -- g;\n g -- h;\n c -- i;\n i -- j;\n}\n", n: 10, rv: 0, before: [4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838], after: [4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838,4.16227766016838], gm: [-0.0,0,0,0,0,0,0,0,0,0,0,4,-1,-1,0,0,-1,-1,0,0,0,-1,2,-1,0,0,0,0,0,0,0,-1,-1,4,-1,0,0,0,0,-1,0,0,0,-1,2,-1,0,0,0,0,0,0,0,0,-1,2,-1,0,0,0,0,-1,0,0,0,-1,2,0,0,0,0,-1,0,0,0,0,0,2,-1,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,-1,0,0,0,0,0,1], circuitTries: 7, gmTries: 5},
|
|
76
|
+
{name: "kk-len-circuit", source: "graph G {\n mode=KK;\n model=circuit;\n a -- b [len=1.5];\n b -- c;\n c -- d [len=0.7];\n d -- e;\n e -- f [len=2.0];\n f -- a;\n a -- c;\n a -- g [len=1.25];\n g -- h;\n c -- i;\n i -- j [len=0.5];\n}\n", n: 10, rv: 0, before: [4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012], after: [4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012,4.435383458092012], gm: [-0.0,0,0,0,0,0,0,0,0,0,0,3.466666666666667,-0.6666666666666666,-1,0,0,-1,-0.8,0,0,0,-0.6666666666666666,1.6666666666666665,-1,0,0,0,0,0,0,0,-1,-1,4.428571428571429,-1.4285714285714286,0,0,0,0,-1,0,0,0,-1.4285714285714286,2.428571428571429,-1,0,0,0,0,0,0,0,0,-1,1.5,-0.5,0,0,0,0,-1,0,0,0,-0.5,1.5,0,0,0,0,-0.8,0,0,0,0,0,1.8,-1,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,-1,0,0,0,0,0,1], circuitTries: 1, gmTries: 9},
|
|
77
|
+
{name: "kk-disc-iso", source: "graph G {\n a -- b;\n b -- c;\n c -- a;\n d -- e;\n e -- f;\n z;\n}\n", n: 7, rv: 0, before: [3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907], after: [3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907,3.6457513110645907], gm: [-0.0,0,0,0,0,0,0,0,2,-1,-1,0,0,0,0,-1,2,-1,0,0,0,0,-1,-1,2,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,-1,2,-1,0,0,0,0,0,-1,1], circuitTries: 1, gmTries: 1},
|
|
78
|
+
{name: "kk-iso-circuit", source: "graph G {\n mode=KK;\n model=circuit;\n a -- b;\n b -- c;\n c -- a;\n c -- d;\n d -- e;\n e -- a;\n z;\n}\n", n: 6, rv: 0, before: [3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178], after: [3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178,3.449489742783178], gm: [-0.0,0,0,0,0,0,0,3,-1,-1,0,-1,0,-1,2,-1,0,0,0,-1,-1,3,-1,0,0,0,0,-1,2,-1,0,-1,0,0,-1,2], circuitTries: 1, gmTries: 1},
|
|
79
|
+
{name: "kk-iso-len-circuit", source: "graph G {\n mode=KK;\n model=circuit;\n a -- b [len=2];\n b -- c [len=3];\n c -- a [len=1.5];\n c -- d [len=0.75];\n d -- e [len=2.5];\n e -- a [len=1.25];\n z;\n}\n", n: 6, rv: 0, before: [5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493], after: [5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493,5.490731195102493], gm: [-0.0,0,0,0,0,0,0,1.9666666666666666,-0.5,-0.6666666666666666,0,-0.8,0,-0.5,0.8333333333333333,-0.3333333333333333,0,0,0,-0.6666666666666666,-0.3333333333333333,2.333333333333333,-1.3333333333333333,0,0,0,0,-1.3333333333333333,1.7333333333333334,-0.4,0,-0.8,0,0,-0.4,1.2000000000000002], circuitTries: 1, gmTries: 1},
|
|
80
|
+
{name: "kk-multi", source: "graph G {\n a -- b [len=2];\n b -- a [len=3];\n a -- b [len=5];\n a -- a [len=9];\n a -- c [len=0.5];\n c -- b;\n d -- a [len=4];\n a -- d [len=7];\n z;\n}\n", n: 5, rv: 0, before: [9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422], after: [9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422,9.804517661405422], gm: [-0.0,0,0,0,0,0,2.342857142857143,-0.2,-2,-0.14285714285714285,0,-0.2,1.2,-1,0,0,-2,-1,3,0,0,-0.14285714285714285,0,0,0.14285714285714285], circuitTries: 1, gmTries: 1},
|
|
81
|
+
{name: "kk-last-edge", source: "graph G {\n a -- b;\n b -- c;\n c -- a;\n a -- d [len=4];\n}\n", n: 4, rv: 0, before: [4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5], after: [4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5,4.5], gm: [-0.0,0,0,0,0,2,-1,-1,-0.25,-1,2.25,-1,0,-1,-1,2], circuitTries: 7, gmTries: 7},
|
|
82
|
+
];
|