@knowvah/dot-engine 2.9.0 → 2.10.1
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/context.d.ts +7 -1
- package/dist/gvc/context.d.ts.map +1 -1
- package/dist/gvc/device.d.ts +2 -3
- package/dist/gvc/device.d.ts.map +1 -1
- package/dist/gvc/emit-xdot.d.ts +11 -0
- package/dist/gvc/emit-xdot.d.ts.map +1 -0
- package/dist/gvc/image-resolver.d.ts +5 -0
- package/dist/gvc/image-resolver.d.ts.map +1 -1
- package/dist/gvc/init-xdot.d.ts +7 -0
- package/dist/gvc/init-xdot.d.ts.map +1 -0
- package/dist/gvc/landscape.d.ts +11 -0
- package/dist/gvc/landscape.d.ts.map +1 -0
- package/dist/gvc/layout-bb.d.ts +17 -0
- package/dist/gvc/layout-bb.d.ts.map +1 -0
- package/dist/gvc/layout-reset.d.ts +26 -0
- package/dist/gvc/layout-reset.d.ts.map +1 -0
- package/dist/gvc/viewport.d.ts +1 -10
- package/dist/gvc/viewport.d.ts.map +1 -1
- package/dist/index.js +2497 -1650
- package/dist/index.js.map +4 -4
- package/dist/layout/circo/blocks.d.ts +2 -0
- package/dist/layout/circo/blocks.d.ts.map +1 -1
- package/dist/layout/circo/blocktree.d.ts +6 -0
- package/dist/layout/circo/blocktree.d.ts.map +1 -1
- package/dist/layout/circo/circular.d.ts +6 -0
- package/dist/layout/circo/circular.d.ts.map +1 -1
- package/dist/layout/dot/edge-route-rank.d.ts +34 -0
- package/dist/layout/dot/edge-route-rank.d.ts.map +1 -1
- package/dist/layout/dot/index.d.ts.map +1 -1
- package/dist/layout/dot/init.d.ts.map +1 -1
- package/dist/layout/dot/splines-flat-labeled.d.ts.map +1 -1
- package/dist/layout/dot/splines-flat-multi.d.ts.map +1 -1
- package/dist/layout/dot/splines-flat.d.ts +1 -2
- package/dist/layout/dot/splines-flat.d.ts.map +1 -1
- package/dist/layout/dot/splines.d.ts +2 -2
- package/dist/layout/dot/splines.d.ts.map +1 -1
- 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-dir1-n40.d.ts +12 -0
- package/dist/layout/neato/__fixtures__/quad-prog-vpsc-dir1-n40.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/dijkstra.d.ts +7 -0
- package/dist/layout/neato/dijkstra.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/splines.d.ts +7 -3
- package/dist/layout/neato/splines.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/layout/pack/ccomps.d.ts +32 -0
- package/dist/layout/pack/ccomps.d.ts.map +1 -0
- package/dist/layout/pack/index.d.ts +1 -24
- package/dist/layout/pack/index.d.ts.map +1 -1
- package/dist/layout/sfdp/init.d.ts.map +1 -1
- package/dist/render/dot/write-back.d.ts +37 -0
- package/dist/render/dot/write-back.d.ts.map +1 -0
- package/dist/render/dot.d.ts +5 -7
- package/dist/render/dot.d.ts.map +1 -1
- package/dist/render/json.d.ts +16 -21
- package/dist/render/json.d.ts.map +1 -1
- package/dist/render.js +2899 -2052
- package/dist/render.js.map +4 -4
- package/dist/util/libcxx-sort.d.ts +7 -0
- package/dist/util/libcxx-sort.d.ts.map +1 -0
- package/dist/vpsc/SweepLine.d.ts +23 -10
- 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/__fixtures__/replay-native.json +422 -0
- package/src/gvc/__fixtures__/rerender/background.dot.seq-xdot-svg.1 +25 -0
- package/src/gvc/__fixtures__/rerender/background.dot.seq-xdot-svg.2 +37 -0
- package/src/gvc/__fixtures__/rerender/background.gv +1 -0
- package/src/gvc/__fixtures__/rerender/cluster-lrvn.dot.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/cluster-lrvn.dot.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/cluster-lrvn.dot.xdot.1 +25 -0
- package/src/gvc/__fixtures__/rerender/cluster-lrvn.dot.xdot.2 +25 -0
- package/src/gvc/__fixtures__/rerender/cluster-lrvn.gv +1 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.plain.1 +7 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.plain.2 +7 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-dot-dot.1 +18 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-dot-dot.2 +18 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-plain-xdot.1 +7 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-plain-xdot.2 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-dot.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-dot.2 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-plain.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-plain.2 +7 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-svg.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-svg.2 +46 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-then-svg.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-then-svg.2 +47 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-xdot.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.seq-xdot-xdot.2 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.xdot.1 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.dot.xdot.2 +33 -0
- package/src/gvc/__fixtures__/rerender/cluster-skeleton.gv +1 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.circo.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.then-circo.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.then-fdp.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.plain.then-neato.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-dot-dot.1 +11 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-dot-dot.2 +11 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-json-json.1 +148 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-json-json.2 +162 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-plain-xdot.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-plain-xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-dot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-dot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-plain.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-svg.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-svg.2 +30 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-then-svg.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-then-svg.2 +31 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.seq-xdot-xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.dot.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.fdp.xdot.2 +21 -0
- package/src/gvc/__fixtures__/rerender/filing.gv +1 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.seq-xdot-then-svg.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.seq-xdot-then-svg.2 +31 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.neato.xdot.2 +21 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.osage.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.patchwork.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.sfdp.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.plain.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.plain.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.plain.nofree.1 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.plain.nofree.2 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.plain.nofree.3 +5 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.xdot.1 +20 -0
- package/src/gvc/__fixtures__/rerender/filing.twopi.xdot.2 +20 -0
- package/src/gvc/__fixtures__/rerender/mixed.circo.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.circo.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.circo.xdot.1 +103 -0
- package/src/gvc/__fixtures__/rerender/mixed.circo.xdot.2 +104 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-dot-dot.1 +75 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-dot-dot.2 +75 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-plain-xdot.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-plain-xdot.2 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-dot.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-dot.2 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-plain.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-svg.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-svg.2 +127 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-then-svg.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-then-svg.2 +128 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-xdot.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.seq-xdot-xdot.2 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.xdot.1 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.dot.xdot.2 +119 -0
- package/src/gvc/__fixtures__/rerender/mixed.fdp.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.fdp.xdot.1 +117 -0
- package/src/gvc/__fixtures__/rerender/mixed.gv +8 -0
- package/src/gvc/__fixtures__/rerender/mixed.neato.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.neato.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.neato.xdot.1 +117 -0
- package/src/gvc/__fixtures__/rerender/mixed.neato.xdot.2 +118 -0
- package/src/gvc/__fixtures__/rerender/mixed.osage.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.osage.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.osage.xdot.1 +117 -0
- package/src/gvc/__fixtures__/rerender/mixed.osage.xdot.2 +117 -0
- package/src/gvc/__fixtures__/rerender/mixed.patchwork.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.patchwork.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.patchwork.xdot.1 +78 -0
- package/src/gvc/__fixtures__/rerender/mixed.patchwork.xdot.2 +79 -0
- package/src/gvc/__fixtures__/rerender/mixed.sfdp.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.sfdp.xdot.1 +103 -0
- package/src/gvc/__fixtures__/rerender/mixed.twopi.plain.1 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.twopi.plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/mixed.twopi.xdot.1 +103 -0
- package/src/gvc/__fixtures__/rerender/mixed.twopi.xdot.2 +103 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.1 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.2 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.3 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.fdp.plain.nofree.1 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.fdp.plain.nofree.2 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.fdp.plain.nofree.3 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.gv +16 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.patchwork.plain.nofree.1 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.patchwork.plain.nofree.2 +29 -0
- package/src/gvc/__fixtures__/rerender/multi-edge.patchwork.plain.nofree.3 +29 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.gv +1 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-dot-plain.1 +34 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-dot-plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-json-plain.1 +471 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-json-plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-json0-plain.1 +121 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-json0-plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-xdot-plain.1 +60 -0
- package/src/gvc/__fixtures__/rerender/neato-pos.neato.seq-xdot-plain.2 +18 -0
- package/src/gvc/__fixtures__/rerender/regen.sh +81 -0
- package/src/gvc/__fixtures__/rerender/sized-clip.gv +18 -0
- package/src/gvc/__fixtures__/rerender/sized-clip.neato.xdot.1 +86 -0
- package/src/gvc/__fixtures__/rerender/sized-clip.neato.xdot.2 +86 -0
- package/src/gvc/context.ts +13 -1
- package/src/gvc/device.ts +6 -6
- package/src/gvc/emit-xdot.ts +208 -0
- package/src/gvc/image-resolver.ts +8 -0
- package/src/gvc/init-xdot.ts +36 -0
- package/src/gvc/landscape.ts +36 -0
- package/src/gvc/layout-bb.ts +43 -0
- package/src/gvc/layout-reset.ts +62 -0
- package/src/gvc/viewport.ts +1 -32
- package/src/layout/circo/__fixtures__/root/both-connected.gv +11 -0
- package/src/layout/circo/__fixtures__/root/both-connected.xdot +53 -0
- package/src/layout/circo/__fixtures__/root/both-connected.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/both-per-component.gv +18 -0
- package/src/layout/circo/__fixtures__/root/both-per-component.xdot +97 -0
- package/src/layout/circo/__fixtures__/root/both-per-component.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/graph-none-node.gv +11 -0
- package/src/layout/circo/__fixtures__/root/graph-none-node.xdot +53 -0
- package/src/layout/circo/__fixtures__/root/graph-none-node.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/graph-root-first.gv +17 -0
- package/src/layout/circo/__fixtures__/root/graph-root-first.xdot +96 -0
- package/src/layout/circo/__fixtures__/root/graph-root-first.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/graph-root-later.gv +17 -0
- package/src/layout/circo/__fixtures__/root/graph-root-later.xdot +96 -0
- package/src/layout/circo/__fixtures__/root/graph-root-later.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/graph-root-none.gv +17 -0
- package/src/layout/circo/__fixtures__/root/graph-root-none.xdot +96 -0
- package/src/layout/circo/__fixtures__/root/graph-root-none.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/graph-root-paths.gv +7 -0
- package/src/layout/circo/__fixtures__/root/graph-root-paths.xdot +46 -0
- package/src/layout/circo/__fixtures__/root/graph-root-paths.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/no-root-connected.gv +9 -0
- package/src/layout/circo/__fixtures__/root/no-root-connected.xdot +51 -0
- package/src/layout/circo/__fixtures__/root/no-root-connected.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/no-root.gv +16 -0
- package/src/layout/circo/__fixtures__/root/no-root.xdot +95 -0
- package/src/layout/circo/__fixtures__/root/no-root.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/node-root-connected.gv +10 -0
- package/src/layout/circo/__fixtures__/root/node-root-connected.xdot +52 -0
- package/src/layout/circo/__fixtures__/root/node-root-connected.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/node-root-false.gv +10 -0
- package/src/layout/circo/__fixtures__/root/node-root-false.xdot +52 -0
- package/src/layout/circo/__fixtures__/root/node-root-false.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/node-root-later.gv +17 -0
- package/src/layout/circo/__fixtures__/root/node-root-later.xdot +96 -0
- package/src/layout/circo/__fixtures__/root/node-root-later.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/node-root-two.gv +11 -0
- package/src/layout/circo/__fixtures__/root/node-root-two.xdot +53 -0
- package/src/layout/circo/__fixtures__/root/node-root-two.xdot.stderr +0 -0
- package/src/layout/circo/__fixtures__/root/regen.sh +16 -0
- package/src/layout/circo/blocks.ts +3 -0
- package/src/layout/circo/blocktree.ts +17 -3
- package/src/layout/circo/circular.ts +13 -1
- package/src/layout/dot/edge-route-rank.ts +72 -0
- package/src/layout/dot/edge-route.ts +6 -6
- package/src/layout/dot/index.ts +2 -0
- package/src/layout/dot/init.ts +17 -5
- package/src/layout/dot/splines-flat-labeled.ts +2 -1
- package/src/layout/dot/splines-flat-multi.ts +2 -1
- package/src/layout/dot/splines-flat.ts +3 -3
- package/src/layout/dot/splines.ts +9 -9
- 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__/multi-component-attrs/hier-default.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-default.xdot +115 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-epsilon.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-epsilon.xdot +116 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-epsilon.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiter3.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiter3.xdot +116 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiter3.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiterneg.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiterneg.xdot +116 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-maxiterneg.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-stresswt.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-stresswt.xdot +116 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/hier-stresswt.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-default.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-default.xdot +102 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-epsilon.gv +19 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-epsilon.xdot +103 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-epsilon.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiter3.gv +19 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiter3.xdot +103 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiter3.xdot.stderr +3 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiterneg.gv +19 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiterneg.xdot +103 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-maxiterneg.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-stresswt.gv +19 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-stresswt.xdot +103 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/kk-stresswt.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-default.gv +16 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-default.xdot +100 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-epsilon.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-epsilon.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-epsilon.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-cluster.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-cluster.xdot +106 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-cluster.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-pin.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-pin.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3-pin.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiter3.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiterneg.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiterneg.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-maxiterneg.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-stresswt.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-stresswt.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/major-stresswt.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/regen.sh +16 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-default.gv +17 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-default.xdot +101 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-default.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-epsilon.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-epsilon.xdot +102 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-epsilon.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiter3.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiter3.xdot +102 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiter3.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiterneg.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiterneg.xdot +102 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-maxiterneg.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-stresswt.gv +18 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-stresswt.xdot +102 -0
- package/src/layout/neato/__fixtures__/multi-component-attrs/sgd-stresswt.xdot.stderr +0 -0
- package/src/layout/neato/__fixtures__/quad-prog-vpsc-dir1-n40.ts +14 -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/dijkstra.ts +12 -3
- 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/splines.ts +18 -18
- package/src/layout/neato/start.ts +20 -65
- package/src/layout/neato/stress-models.ts +55 -59
- package/src/layout/pack/ccomps.ts +131 -0
- package/src/layout/pack/index.ts +1 -95
- package/src/layout/sfdp/__fixtures__/start-warning/regen.sh +16 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-5.gv +15 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-5.xdot +77 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-5.xdot.stderr +0 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-random5.gv +15 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-random5.xdot +77 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-random5.xdot.stderr +0 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-regular.gv +15 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-regular.xdot +77 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-regular.xdot.stderr +1 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self-label-scheme.gv +16 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self-label-scheme.xdot +78 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self-label-scheme.xdot.stderr +2 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self.gv +15 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self.xdot +77 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-self.xdot.stderr +1 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-unset.gv +14 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-unset.xdot +76 -0
- package/src/layout/sfdp/__fixtures__/start-warning/start-unset.xdot.stderr +0 -0
- package/src/layout/sfdp/index.ts +1 -1
- package/src/layout/sfdp/init.ts +9 -1
- package/src/layout/twopi/index.ts +1 -1
- package/src/render/dot/agwrite.ts +1 -1
- package/src/render/dot/write-back.ts +137 -0
- package/src/render/dot.ts +12 -12
- package/src/render/json.ts +34 -34
- package/src/util/libcxx-sort.ts +461 -0
- package/src/vpsc/SweepLine.ts +50 -38
- package/src/vpsc/sweepTypes.ts +13 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: EPL-2.0
|
|
3
|
+
# Regenerates these part-9 fixtures: graphviz 16.1.0 (oracle/16.1.0), -Kcirco -Txdot,
|
|
4
|
+
# one <case>.xdot and <case>.xdot.stderr per <case>.gv. Inputs come from
|
|
5
|
+
# plans/post-16-1-followups-9/harness/T0/gen-fixtures.py.
|
|
6
|
+
#
|
|
7
|
+
# Usage: GVBINDIR=<full plugin dir> bash regen.sh
|
|
8
|
+
set -u
|
|
9
|
+
DOT=${DOT:-$HOME/git/graphviz/build/cmd/dot/dot}
|
|
10
|
+
cd "$(dirname "$0")"
|
|
11
|
+
for f in *.gv; do
|
|
12
|
+
c=${f%.gv}
|
|
13
|
+
"$DOT" -Kcirco -Txdot "$f" > "$c.xdot" 2> "$c.xdot.stderr"
|
|
14
|
+
rc=$?
|
|
15
|
+
[ "$rc" -eq 0 ] || echo "$c: exit $rc"
|
|
16
|
+
done
|
|
@@ -194,6 +194,8 @@ export interface CircState {
|
|
|
194
194
|
spanningTreeCount: number;
|
|
195
195
|
minDist: number;
|
|
196
196
|
rootname: string;
|
|
197
|
+
/** N_root: default of the declared node `root` attribute; null when undeclared. */
|
|
198
|
+
nRoot: string | null;
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
const MINDIST = 1.0;
|
|
@@ -208,6 +210,7 @@ export function makeCircState(blockCount: number): CircState {
|
|
|
208
210
|
spanningTreeCount: 0,
|
|
209
211
|
minDist: MINDIST,
|
|
210
212
|
rootname: '',
|
|
213
|
+
nRoot: null,
|
|
211
214
|
};
|
|
212
215
|
}
|
|
213
216
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type { DerivedNode, DerivedEdge, DerivedGraph, SubGraph } from './blocks.js';
|
|
12
|
+
import { mapbool } from '../dot/rank.js';
|
|
12
13
|
import { spanIncident } from './blockpath.js';
|
|
13
14
|
import {
|
|
14
15
|
type Block,
|
|
@@ -156,14 +157,27 @@ export function dfsVisit(ctx: DfsCtx, u: DerivedNode, isRoot: boolean): void {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Root of the block search: the component's node named `rootname`, else the
|
|
162
|
+
* first node whose `root` attribute is true, else the first node.
|
|
163
|
+
* @see lib/circogen/blocktree.c:find_blocks
|
|
164
|
+
*/
|
|
165
|
+
export function findRoot(g: SubGraph, state: CircState): DerivedNode | null {
|
|
166
|
+
let root: DerivedNode | null = null;
|
|
167
|
+
if (state.rootname) root = g.nodes.find((dn) => dn.name === state.rootname) ?? null;
|
|
168
|
+
if (!root && state.nRoot !== null) {
|
|
169
|
+
root = g.nodes.find((dn) => mapbool(dn.orig.attrs.get('root') ?? state.nRoot ?? undefined)) ?? null;
|
|
170
|
+
}
|
|
171
|
+
if (!root && g.nodes.length > 0) root = g.nodes[0]!;
|
|
172
|
+
return root;
|
|
173
|
+
}
|
|
174
|
+
|
|
159
175
|
export function findBlocks(
|
|
160
176
|
g: SubGraph,
|
|
161
177
|
state: CircState,
|
|
162
178
|
allEdges: DerivedEdge[],
|
|
163
179
|
): void {
|
|
164
|
-
|
|
165
|
-
if (state.rootname) root = g.parent.nodes.get(state.rootname) ?? null;
|
|
166
|
-
if (!root && g.nodes.length > 0) root = g.nodes[0]!;
|
|
180
|
+
const root = findRoot(g, state);
|
|
167
181
|
if (!root) return;
|
|
168
182
|
const ord = new Map<DerivedNode, number>();
|
|
169
183
|
g.nodes.forEach((dn, i) => ord.set(dn, i));
|
|
@@ -88,7 +88,7 @@ export function buildDerivedEdges(g: Graph, dg: DerivedGraph): DerivedEdge[] {
|
|
|
88
88
|
|
|
89
89
|
/** Decompose derived graph into connected components with their edges. */
|
|
90
90
|
export function derivedComponents(g: Graph, dg: DerivedGraph, allEdges: DerivedEdge[]): SubGraph[] {
|
|
91
|
-
const comps = ccomps(g
|
|
91
|
+
const comps = ccomps(g);
|
|
92
92
|
return comps.map((sg, i) => {
|
|
93
93
|
const nodes: DerivedNode[] = [];
|
|
94
94
|
for (const n of sg.nodes.values()) {
|
|
@@ -125,6 +125,17 @@ export function readMinDist(realg: Graph): number {
|
|
|
125
125
|
return isNaN(v) || v < 0 ? 1.0 : v;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* N_root = agattr_text(rootg, AGNODE, "root", NULL): the declared default of
|
|
130
|
+
* the node `root` attribute, or null when no node declares it.
|
|
131
|
+
* @see lib/circogen/circular.c:initGraphAttrs
|
|
132
|
+
*/
|
|
133
|
+
export function nodeRootDefault(realg: Graph): string | null {
|
|
134
|
+
const declared = realg.nodeDefaults.get('root');
|
|
135
|
+
if (declared !== undefined) return declared;
|
|
136
|
+
return Array.from(realg.nodes.values()).some((n) => n.attrs.has('root')) ? '' : null;
|
|
137
|
+
}
|
|
138
|
+
|
|
128
139
|
/**
|
|
129
140
|
* Lay out one connected component of the derived graph.
|
|
130
141
|
* @see lib/circogen/circular.c:circularLayout
|
|
@@ -134,6 +145,7 @@ export function circularLayout(sg: SubGraph, realg: Graph, blockCount: number, a
|
|
|
134
145
|
const state = makeCircState(blockCount);
|
|
135
146
|
state.minDist = readMinDist(realg);
|
|
136
147
|
state.rootname = realg.attrs.get('root') ?? '';
|
|
148
|
+
state.nRoot = nodeRootDefault(realg);
|
|
137
149
|
let root: Block;
|
|
138
150
|
if (isOneblock(realg)) root = createOneBlock(sg, state);
|
|
139
151
|
else root = createBlocktree(sg, state, allEdges);
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
import type { Graph } from '../../model/graph.js';
|
|
14
14
|
import type { Node } from '../../model/node.js';
|
|
15
|
+
import type { Edge } from '../../model/edge.js';
|
|
16
|
+
import { swapBezier, swapEndsP } from './splines.js';
|
|
15
17
|
import type { RankEdgeInfo } from './edge-route-routing.js';
|
|
16
18
|
|
|
17
19
|
/** Minimum edge routing width. @see lib/dotgen/dotsplines.c:MINW */
|
|
@@ -108,6 +110,76 @@ export function resetSplineBounds(g: Graph): void {
|
|
|
108
110
|
boundsSnapshotByGraph.delete(g);
|
|
109
111
|
}
|
|
110
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Per-edge count of the beziers a pass found already on the edge, which only a
|
|
115
|
+
* layout with no gvFreeLayout before it leaves there. An edge with no entry had
|
|
116
|
+
* no spline at the start of the pass. Rewritten by every `beginRoutingPass`.
|
|
117
|
+
*/
|
|
118
|
+
const staleBeziersByEdge = new WeakMap<Edge, number>();
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Start a `dotSplines_` pass on `g`: the bounds snapshot above, and the record of
|
|
122
|
+
* what an earlier layout left on each edge. C routes each edge once per
|
|
123
|
+
* `dot_splines_` and `new_spline` appends to whatever `ED_spl` holds, so stale
|
|
124
|
+
* beziers neither stop this pass routing an edge nor count as this pass's route.
|
|
125
|
+
* A stale `lost` is the same: this pass has not lost the edge yet.
|
|
126
|
+
* @see lib/dotgen/dotsplines.c:dot_splines_
|
|
127
|
+
* @see lib/common/splines.c:new_spline
|
|
128
|
+
*/
|
|
129
|
+
export function beginRoutingPass(g: Graph): void {
|
|
130
|
+
resetSplineBounds(g);
|
|
131
|
+
for (const e of g.edges) {
|
|
132
|
+
e.info.lost = undefined;
|
|
133
|
+
if (e.info.spl === undefined) staleBeziersByEdge.delete(e);
|
|
134
|
+
else staleBeziersByEdge.set(e, e.info.spl.size);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* True when this routing pass has installed a bezier on `e`. On a first layout no
|
|
140
|
+
* edge has a stale count, and this is exactly `e.info.spl !== undefined`.
|
|
141
|
+
*/
|
|
142
|
+
export function routedThisPass(e: Edge): boolean {
|
|
143
|
+
const spl = e.info.spl;
|
|
144
|
+
if (spl === undefined) return false;
|
|
145
|
+
const stale = staleBeziersByEdge.get(e);
|
|
146
|
+
return stale === undefined || spl.size > stale;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** The beziers `e` came into this routing pass holding, 0 on a first layout. */
|
|
150
|
+
export function staleBezierCount(e: Edge): number {
|
|
151
|
+
return staleBeziersByEdge.get(e) ?? 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* True when `e` kept ED_adjacent from an earlier layout. C never clears the flag,
|
|
156
|
+
* so it routes `e` as adjacent even if a node now sits between its ends.
|
|
157
|
+
* @see lib/dotgen/flat.c:236
|
|
158
|
+
* @see lib/dotgen/dotsplines.c:366
|
|
159
|
+
*/
|
|
160
|
+
export function staleAdjacent(e: Edge): boolean {
|
|
161
|
+
return staleBezierCount(e) > 0 && (e.info.adjacent ?? 0) !== 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Finish a pass's edge_normalize for the beziers an earlier layout left. C swaps
|
|
166
|
+
* the whole spline once, at the end of the pass, so a swapped edge's stale beziers
|
|
167
|
+
* end up reversed and after the new ones. The port's routers orient what they
|
|
168
|
+
* install as they go, and `swapSpline` leaves the stale beziers alone for this.
|
|
169
|
+
* @see lib/dotgen/dotsplines.c:edge_normalize
|
|
170
|
+
* @see lib/dotgen/dotsplines.c:swap_spline
|
|
171
|
+
*/
|
|
172
|
+
export function swapStaleBeziers(g: Graph): void {
|
|
173
|
+
for (const e of g.edges) {
|
|
174
|
+
const stale = staleBezierCount(e);
|
|
175
|
+
const spl = e.info.spl;
|
|
176
|
+
if (stale === 0 || spl === undefined || !swapEndsP(e)) continue;
|
|
177
|
+
const old = spl.list.splice(0, stale).reverse();
|
|
178
|
+
for (const bz of old) swapBezier(bz);
|
|
179
|
+
spl.list.push(...old);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
111
183
|
/**
|
|
112
184
|
* Extract RankEdgeInfo from the graph's rank table for an edge.
|
|
113
185
|
* Returns undefined if rank geometry is not available.
|
|
@@ -25,7 +25,7 @@ import { clipAndInstall } from '../../common/splines-clip.js';
|
|
|
25
25
|
import { normalizeVec } from './edge-route-geom.js';
|
|
26
26
|
import { arrowDrawOpsForEnd } from './edge-route-arrow.js';
|
|
27
27
|
import { linearBezier } from './edge-route-poly.js';
|
|
28
|
-
import { rankEdgeInfoOf } from './edge-route-rank.js';
|
|
28
|
+
import { rankEdgeInfoOf, routedThisPass } from './edge-route-rank.js';
|
|
29
29
|
import { routeRegularEdgeFaithful } from './edge-route-faithful.js';
|
|
30
30
|
import { edgeRouteCmp } from './edge-order.js';
|
|
31
31
|
import { isFlatAdjacent, makeFlatAdjEdges } from './splines-flat.js';
|
|
@@ -316,7 +316,7 @@ function isAdjacentPortFlat(e: GraphEdge, g: Graph): boolean {
|
|
|
316
316
|
/** True when x is an unrouted adjacent same-rank flat edge (port or not): C
|
|
317
317
|
* groups by main edge only, so a port-less sibling joins the aux call. */
|
|
318
318
|
function isGroupableFlat(x: GraphEdge, g: Graph): boolean {
|
|
319
|
-
return x
|
|
319
|
+
return !routedThisPass(x) && x.tail.info.rank !== undefined
|
|
320
320
|
&& x.tail.info.rank === x.head.info.rank && isFlatAdjacent(g, x);
|
|
321
321
|
}
|
|
322
322
|
|
|
@@ -373,7 +373,7 @@ function routeFaithfulSidePort(e: GraphEdge, g: Graph): boolean {
|
|
|
373
373
|
if (sameRank && isFlatAdjacent(g, e)) {
|
|
374
374
|
const group = collectAdjacentFlatGroup(e, g);
|
|
375
375
|
return makeFlatAdjEdges(g, group, group.length, edgeType(g)) === 0
|
|
376
|
-
&& e
|
|
376
|
+
&& routedThisPass(e);
|
|
377
377
|
}
|
|
378
378
|
// Non-adjacent flats: C groups identical-port siblings into ONE make_flat_edge
|
|
379
379
|
// call and nests their splines (cnt-loop). Collect the group and route once;
|
|
@@ -382,7 +382,7 @@ function routeFaithfulSidePort(e: GraphEdge, g: Graph): boolean {
|
|
|
382
382
|
// @see lib/dotgen/dotsplines.c:make_flat_edge, make_flat_bottom_edges
|
|
383
383
|
if (sameRank) {
|
|
384
384
|
const group = collectNonAdjacentFlatGroup(e, g);
|
|
385
|
-
return routeFlatEdgeGroupFaithful(g, group, group.length, edgeType(g)) && e
|
|
385
|
+
return routeFlatEdgeGroupFaithful(g, group, group.length, edgeType(g)) && routedThisPass(e);
|
|
386
386
|
}
|
|
387
387
|
const pts = routeRegularEdgeFaithful(g, e);
|
|
388
388
|
if (pts === null) return false;
|
|
@@ -431,7 +431,7 @@ function routeFlatEdge(e: GraphEdge, g: Graph): boolean {
|
|
|
431
431
|
const group = collectNonAdjacentFlatGroup(e, g);
|
|
432
432
|
if (group.length > 0
|
|
433
433
|
&& routeFlatEdgeGroupFaithful(g, group, group.length, edgeType(g))
|
|
434
|
-
&& e
|
|
434
|
+
&& routedThisPass(e)) return true;
|
|
435
435
|
}
|
|
436
436
|
return false;
|
|
437
437
|
}
|
|
@@ -486,7 +486,7 @@ function orderedDotEdges(g: Graph): GraphEdge[] {
|
|
|
486
486
|
export function routeLoneEdge(e: GraphEdge, g: Graph): void {
|
|
487
487
|
// A lost edge (routesplines failure, C semantics) is consumed: C routes each
|
|
488
488
|
// edge exactly once, so the backstop sweep must not re-attempt it.
|
|
489
|
-
if (e
|
|
489
|
+
if (routedThisPass(e) || e.info.lost === true) return;
|
|
490
490
|
// C dot_splines_ skips FLATORDER/IGNORED edges when building the route list;
|
|
491
491
|
// an IGNORED edge (e.g. a concentrate-merged parallel duplicate) must get no
|
|
492
492
|
// spline so emit draws only the representative. @see dotsplines.c:295
|
package/src/layout/dot/index.ts
CHANGED
|
@@ -123,6 +123,8 @@ export function getAttrInt(g: Graph, key: string, defaultVal: number): number {
|
|
|
123
123
|
* @see lib/dotgen/dotinit.c:dotLayout (static)
|
|
124
124
|
*/
|
|
125
125
|
export function dotPhaseInit(g: Graph): void {
|
|
126
|
+
// C's dot_init_edge overwrites ED_weight; dotInitEdge keeps only an aux graph's stamp.
|
|
127
|
+
for (const e of g.edges) e.info.weight = undefined;
|
|
126
128
|
dotGraphInit(g);
|
|
127
129
|
setEdgeTypeFromAttr(g, EDGETYPE_SPLINE);
|
|
128
130
|
setAspect(g);
|
package/src/layout/dot/init.ts
CHANGED
|
@@ -223,6 +223,21 @@ export function dotInitSubg(g: Graph): void {
|
|
|
223
223
|
// dotInitNodeEdge
|
|
224
224
|
// ---------------------------------------------------------------------------
|
|
225
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Drops a node's fast-graph lists. dot_init_node allocates new ones
|
|
228
|
+
* unconditionally, and dot_cleanup frees them, so neither a later layout nor a
|
|
229
|
+
* layout with no gvFreeLayout before it reads the previous layout's edges.
|
|
230
|
+
* @see lib/dotgen/dotinit.c:dot_init_node (alloc_elist)
|
|
231
|
+
* @see lib/dotgen/dotinit.c:dot_cleanup_node (free_list)
|
|
232
|
+
*/
|
|
233
|
+
function clearFastGraphLists(n: Node): void {
|
|
234
|
+
n.info.in = undefined;
|
|
235
|
+
n.info.out = undefined;
|
|
236
|
+
n.info.flat_in = undefined;
|
|
237
|
+
n.info.flat_out = undefined;
|
|
238
|
+
n.info.other = undefined;
|
|
239
|
+
}
|
|
240
|
+
|
|
226
241
|
/**
|
|
227
242
|
* Calls commonInitNode (shape-aware, label-driven sizing) then
|
|
228
243
|
* dotInitNode for every node, then dotInitEdge for every edge.
|
|
@@ -233,6 +248,7 @@ export function dotInitSubg(g: Graph): void {
|
|
|
233
248
|
export function dotInitNodeEdge(g: Graph): void {
|
|
234
249
|
for (const n of nodesInSeq(g)) {
|
|
235
250
|
commonInitNode(n, g);
|
|
251
|
+
clearFastGraphLists(n); // C's alloc_elist does not keep the lists it replaces
|
|
236
252
|
dotInitNode(n);
|
|
237
253
|
}
|
|
238
254
|
const measurer = g.root.info.gvc?.textMeasurer;
|
|
@@ -319,11 +335,7 @@ export function dotCleanup(g: Graph): void {
|
|
|
319
335
|
let n: Node | undefined = g.info.nlist;
|
|
320
336
|
while (n !== undefined) {
|
|
321
337
|
const next: Node | undefined = n.info.next;
|
|
322
|
-
n
|
|
323
|
-
n.info.out = undefined;
|
|
324
|
-
n.info.flat_in = undefined;
|
|
325
|
-
n.info.flat_out = undefined;
|
|
326
|
-
n.info.other = undefined;
|
|
338
|
+
clearFastGraphLists(n);
|
|
327
339
|
n.info.next = undefined;
|
|
328
340
|
n.info.prev = undefined;
|
|
329
341
|
n = next;
|
|
@@ -22,6 +22,7 @@ import { addBox } from '../../common/splines-path-shared.js';
|
|
|
22
22
|
import { routeSplines, routePolylines } from '../../common/splines-routespl.js';
|
|
23
23
|
import { clipAndInstall } from '../../common/splines-clip.js';
|
|
24
24
|
import { buildDotSinfo } from './self-loop.js';
|
|
25
|
+
import { routedThisPass } from './edge-route-rank.js';
|
|
25
26
|
import { TOP } from '../../common/splines-constants.js';
|
|
26
27
|
import { edgeType, EDGETYPE_LINE, EDGETYPE_SPLINE, EDGETYPE_PLINE, getMainEdge, swapEndsP, swapEdgeSpline } from './splines.js';
|
|
27
28
|
import { shortestPath, routeSpline, polyBarriers, makePolyline } from '../../pathplan/index.js';
|
|
@@ -401,7 +402,7 @@ export function makeAdjFlatNoPortEdge(g: Graph, e: Edge): boolean {
|
|
|
401
402
|
// The group is rendered as a unit (both directions). When the opposing leg is
|
|
402
403
|
// dispatched later it is already installed — skip re-rendering but report it
|
|
403
404
|
// handled. C does the whole unordered group in one make_flat_adj_edges call.
|
|
404
|
-
if (e
|
|
405
|
+
if (routedThisPass(e)) return true;
|
|
405
406
|
const group = collectAdjFlatGroup(g, e);
|
|
406
407
|
const et = edgeType(g);
|
|
407
408
|
if (group.some(x => x.info.label !== undefined)) makeSimpleFlatLabels(group, et);
|
|
@@ -26,6 +26,7 @@ import { routeSplines, routePolylines } from '../../common/splines-routespl.js';
|
|
|
26
26
|
import { clipAndInstall } from '../../common/splines-clip.js';
|
|
27
27
|
import { graphRanksep } from './position-aux.js';
|
|
28
28
|
import { buildDotSinfo } from './self-loop.js';
|
|
29
|
+
import { routedThisPass } from './edge-route-rank.js';
|
|
29
30
|
import { EDGETYPE_LINE, EDGETYPE_SPLINE } from './splines.js';
|
|
30
31
|
import { makeSimpleFlat } from './splines-flat-labeled.js';
|
|
31
32
|
import {
|
|
@@ -74,7 +75,7 @@ function flatPortKey(e: Edge, lo: Node): { loP: Port; hiP: Port } {
|
|
|
74
75
|
/** True when x is an unrouted non-adjacent same-rank flat edge (C make_flat_edge
|
|
75
76
|
* routes EVERY non-adjacent flat; side ports are not a precondition). */
|
|
76
77
|
function isNonAdjGroupable(x: Edge, g: Graph): boolean {
|
|
77
|
-
return x
|
|
78
|
+
return !routedThisPass(x)
|
|
78
79
|
&& x.tail.info.rank !== undefined
|
|
79
80
|
&& x.tail.info.rank === x.head.info.rank
|
|
80
81
|
&& !isFlatAdjacent(g, x);
|
|
@@ -30,7 +30,7 @@ import { TOP, BOTTOM, FLATEDGE } from '../../common/splines-constants.js';
|
|
|
30
30
|
import {
|
|
31
31
|
maximalBbox, appendRegularEnd, freshEndp, type BboxCtx,
|
|
32
32
|
} from './edge-route-faithful.js';
|
|
33
|
-
import { getSplineBounds } from './edge-route-rank.js';
|
|
33
|
+
import { getSplineBounds, staleAdjacent } from './edge-route-rank.js';
|
|
34
34
|
import { graphRanksep } from './position-aux.js';
|
|
35
35
|
import { Edge as EdgeClass } from '../../model/edge.js';
|
|
36
36
|
import { cloneNode, cloneEdge, cleanupCloneGraph, transformf } from './splines-clone.js';
|
|
@@ -386,13 +386,13 @@ export function makeFlatAdjEdges(g: Graph, edges: Edge[], cnt: number, et: numbe
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
|
-
* True when a same-rank edge's
|
|
390
|
-
* or labeled-virtual node between them) — the make_flat_adj_edges case.
|
|
389
|
+
* True when a same-rank edge's ends are adjacent in rank order (no NORMAL or labeled-virtual node between).
|
|
391
390
|
* @see lib/dotgen/flat.c:checkFlatAdjacent
|
|
392
391
|
*/
|
|
393
392
|
export function isFlatAdjacent(g: Graph, e: Edge): boolean {
|
|
394
393
|
const r = e.tail.info.rank;
|
|
395
394
|
if (r === undefined || e.head.info.rank !== r) return false;
|
|
395
|
+
if (staleAdjacent(e)) return true;
|
|
396
396
|
const rank = g.info.rank?.[r];
|
|
397
397
|
if (rank === undefined) return false;
|
|
398
398
|
const to = e.tail.info.order ?? 0;
|
|
@@ -21,7 +21,7 @@ import { IGNORED, EDGE_LABEL } from './rank.js';
|
|
|
21
21
|
import { markLowclusters } from './cluster.js';
|
|
22
22
|
import { routeDotEdges } from './edge-route.js';
|
|
23
23
|
import { collectOtherEdges } from './self-loop.js';
|
|
24
|
-
import {
|
|
24
|
+
import { beginRoutingPass, staleBezierCount, swapStaleBeziers } from './edge-route-rank.js';
|
|
25
25
|
import { dispatchOrthoEdges } from './ortho-adapter.js';
|
|
26
26
|
import { routeEdgeGroups } from './splines-groups.js';
|
|
27
27
|
import { placePortLabels, placeRegularEdgeLabels, setEdgeLabelPos } from './splines-label.js';
|
|
@@ -298,10 +298,10 @@ export function swapBezier(b: Bezier): void {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
/** Reverse the list of beziers in a spline and swap each
|
|
302
|
-
export function swapSpline(s: Spline): void {
|
|
303
|
-
s.list.reverse();
|
|
304
|
-
for (
|
|
301
|
+
/** Reverse the list of beziers in a spline after its first `stale`, and swap each of those. */
|
|
302
|
+
export function swapSpline(s: Spline, stale = 0): void {
|
|
303
|
+
s.list.push(...s.list.splice(stale).reverse());
|
|
304
|
+
for (let i = stale; i < s.list.length; i++) swapBezier(s.list[i]);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
/**
|
|
@@ -317,7 +317,7 @@ export function swapSpline(s: Spline): void {
|
|
|
317
317
|
*/
|
|
318
318
|
export function swapEdgeSpline(e: Edge): void {
|
|
319
319
|
if (e.info.spl === undefined) return;
|
|
320
|
-
swapSpline(e.info.spl);
|
|
320
|
+
swapSpline(e.info.spl, staleBezierCount(e));
|
|
321
321
|
const t = e.info.tailArrowOps;
|
|
322
322
|
e.info.tailArrowOps = e.info.headArrowOps;
|
|
323
323
|
e.info.headArrowOps = t;
|
|
@@ -481,13 +481,13 @@ function curvedTop(g: Graph): void {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
/**
|
|
484
|
-
* Post-loop:
|
|
485
|
-
* routed its groups; C skips routesplinesterm), port labels. @see c:422-471
|
|
484
|
+
* Post-loop: labels, normalize, backstop (curved skips it), port labels. @see c:422-471
|
|
486
485
|
*/
|
|
487
486
|
function finalizeSplines(g: Graph, et: number, normalize: boolean): void {
|
|
488
487
|
placeRegularEdgeLabels(g);
|
|
489
488
|
if (normalize) edgeNormalize(g);
|
|
490
489
|
if (et !== EDGETYPE_CURVED) routeDotEdges(g);
|
|
490
|
+
if (normalize) swapStaleBeziers(g);
|
|
491
491
|
placePortLabels(g);
|
|
492
492
|
setState(GVSPLINES); // @see dotsplines.c:477
|
|
493
493
|
g.info.edgeLabelsDone = true; // @see dotsplines.c:471 (EdgeLabelsDone = 1)
|
|
@@ -504,7 +504,7 @@ export function dotSplines_(g: Graph, normalize: boolean): number {
|
|
|
504
504
|
// Force the next getSplineBounds(g) access to recompute so this pass sees
|
|
505
505
|
// a frozen snapshot immune to recoverSlack/resizeVn vnode mutations from
|
|
506
506
|
// edges routed earlier in THIS SAME pass. @see edge-route-rank.ts:getSplineBounds
|
|
507
|
-
|
|
507
|
+
beginRoutingPass(g);
|
|
508
508
|
const edges: Edge[] = [];
|
|
509
509
|
collectRankEdges(g, edges);
|
|
510
510
|
// C sorts with libc qsort (LIST_SORT → gv_list_sort_ → qsort), which is
|
|
@@ -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
|
+
];
|