@knowvah/dot-engine 2.12.2 → 2.12.3

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.
Files changed (190) hide show
  1. package/dist/common/compass-port.d.ts.map +1 -1
  2. package/dist/common/graph-init.d.ts.map +1 -1
  3. package/dist/common/htmltable-label.d.ts.map +1 -1
  4. package/dist/common/htmltable-lex.d.ts +3 -1
  5. package/dist/common/htmltable-lex.d.ts.map +1 -1
  6. package/dist/common/htmltable-parse-image.d.ts +23 -0
  7. package/dist/common/htmltable-parse-image.d.ts.map +1 -0
  8. package/dist/common/htmltable-parse-state.d.ts +4 -0
  9. package/dist/common/htmltable-parse-state.d.ts.map +1 -1
  10. package/dist/common/htmltable-parse.d.ts +33 -2
  11. package/dist/common/htmltable-parse.d.ts.map +1 -1
  12. package/dist/common/poly-inside.d.ts.map +1 -1
  13. package/dist/common/splines-geom.d.ts +2 -1
  14. package/dist/common/splines-geom.d.ts.map +1 -1
  15. package/dist/common/splines-routespl.d.ts +3 -0
  16. package/dist/common/splines-routespl.d.ts.map +1 -1
  17. package/dist/index.js +21301 -21229
  18. package/dist/index.js.map +4 -4
  19. package/dist/layout/dot/classify.d.ts.map +1 -1
  20. package/dist/layout/dot/edge-route-chain-views.d.ts +35 -0
  21. package/dist/layout/dot/edge-route-chain-views.d.ts.map +1 -0
  22. package/dist/layout/dot/edge-route-chain.d.ts +20 -16
  23. package/dist/layout/dot/edge-route-chain.d.ts.map +1 -1
  24. package/dist/layout/dot/edge-route-faithful.d.ts.map +1 -1
  25. package/dist/layout/dot/flat.d.ts +22 -7
  26. package/dist/layout/dot/flat.d.ts.map +1 -1
  27. package/dist/layout/dot/mincross-flat.d.ts +10 -1
  28. package/dist/layout/dot/mincross-flat.d.ts.map +1 -1
  29. package/dist/layout/dot/mincross.d.ts +6 -1
  30. package/dist/layout/dot/mincross.d.ts.map +1 -1
  31. package/dist/layout/dot/ns-subtree.d.ts +9 -6
  32. package/dist/layout/dot/ns-subtree.d.ts.map +1 -1
  33. package/dist/layout/dot/pack-components.d.ts +4 -3
  34. package/dist/layout/dot/pack-components.d.ts.map +1 -1
  35. package/dist/layout/dot/position-aux.d.ts +62 -20
  36. package/dist/layout/dot/position-aux.d.ts.map +1 -1
  37. package/dist/layout/dot/position-bbox.d.ts.map +1 -1
  38. package/dist/layout/dot/position-ycoords.d.ts.map +1 -1
  39. package/dist/layout/dot/position.d.ts.map +1 -1
  40. package/dist/layout/dot/rank-dot2.d.ts +7 -25
  41. package/dist/layout/dot/rank-dot2.d.ts.map +1 -1
  42. package/dist/layout/dot/self-loop.d.ts +11 -4
  43. package/dist/layout/dot/self-loop.d.ts.map +1 -1
  44. package/dist/layout/dot/splines-flat-multi.d.ts +11 -3
  45. package/dist/layout/dot/splines-flat-multi.d.ts.map +1 -1
  46. package/dist/layout/dot/splines-route.d.ts +6 -3
  47. package/dist/layout/dot/splines-route.d.ts.map +1 -1
  48. package/dist/layout/dot/straight-edges.d.ts.map +1 -1
  49. package/dist/layout/fdp/tlayout.d.ts +3 -0
  50. package/dist/layout/fdp/tlayout.d.ts.map +1 -1
  51. package/dist/layout/neato/__fixtures__/hier-imds.d.ts +5 -4
  52. package/dist/layout/neato/__fixtures__/hier-imds.d.ts.map +1 -1
  53. package/dist/layout/neato/__fixtures__/hier-majorization.d.ts +6 -5
  54. package/dist/layout/neato/__fixtures__/hier-majorization.d.ts.map +1 -1
  55. package/dist/layout/neato/conjgrad.d.ts +7 -6
  56. package/dist/layout/neato/conjgrad.d.ts.map +1 -1
  57. package/dist/layout/neato/matrix-ops-dense.d.ts +1 -6
  58. package/dist/layout/neato/matrix-ops-dense.d.ts.map +1 -1
  59. package/dist/layout/neato/matrix-ops.d.ts +0 -6
  60. package/dist/layout/neato/matrix-ops.d.ts.map +1 -1
  61. package/dist/layout/neato/quad-prog-vpsc.d.ts.map +1 -1
  62. package/dist/model/rankEntry.d.ts +3 -1
  63. package/dist/model/rankEntry.d.ts.map +1 -1
  64. package/dist/ortho/index.d.ts +0 -1
  65. package/dist/ortho/index.d.ts.map +1 -1
  66. package/dist/ortho/partition.d.ts +2 -4
  67. package/dist/ortho/partition.d.ts.map +1 -1
  68. package/dist/pathplan/route.d.ts +93 -0
  69. package/dist/pathplan/route.d.ts.map +1 -1
  70. package/dist/render/dot/agwrite.d.ts +21 -9
  71. package/dist/render/dot/agwrite.d.ts.map +1 -1
  72. package/dist/render/dot/types.d.ts +7 -2
  73. package/dist/render/dot/types.d.ts.map +1 -1
  74. package/dist/render.js +21301 -21229
  75. package/dist/render.js.map +4 -4
  76. package/dist/util/overflow.d.ts +37 -0
  77. package/dist/util/overflow.d.ts.map +1 -0
  78. package/package.json +3 -2
  79. package/src/common/compass-port.ts +36 -20
  80. package/src/common/graph-init.ts +11 -1
  81. package/src/common/htmltable-label.ts +9 -4
  82. package/src/common/htmltable-lex.ts +5 -2
  83. package/src/common/htmltable-parse-image.ts +69 -0
  84. package/src/common/htmltable-parse-state.ts +6 -0
  85. package/src/common/htmltable-parse.ts +34 -44
  86. package/src/common/poly-inside.ts +11 -5
  87. package/src/common/splines-geom.ts +24 -6
  88. package/src/common/splines-routespl.ts +32 -0
  89. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.1 +19 -19
  90. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.2 +19 -19
  91. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.3 +19 -19
  92. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.2 +18 -18
  93. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.3 +12 -12
  94. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.1 +20 -20
  95. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.2 +31 -31
  96. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.3 +33 -33
  97. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.1 +10 -10
  98. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.2 +28 -28
  99. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.3 +28 -28
  100. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.1 +21 -28
  101. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.2 +100 -102
  102. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.3 +137 -139
  103. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.1 +1 -1
  104. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.2 +1 -1
  105. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.3 +1 -1
  106. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.1 +3 -3
  107. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.2 +3 -3
  108. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.3 +3 -3
  109. package/src/gvc/__fixtures__/rerender/regen.sh +6 -0
  110. package/src/layout/dot/classify.ts +5 -2
  111. package/src/layout/dot/edge-route-chain-views.ts +120 -0
  112. package/src/layout/dot/edge-route-chain.ts +103 -117
  113. package/src/layout/dot/edge-route-faithful.ts +20 -5
  114. package/src/layout/dot/flat.ts +38 -17
  115. package/src/layout/dot/mincross-flat.ts +15 -5
  116. package/src/layout/dot/mincross.ts +6 -2
  117. package/src/layout/dot/ns-subtree.ts +11 -7
  118. package/src/layout/dot/pack-components.ts +6 -4
  119. package/src/layout/dot/position-aux.ts +112 -39
  120. package/src/layout/dot/position-bbox.ts +14 -1
  121. package/src/layout/dot/position-ycoords.ts +7 -1
  122. package/src/layout/dot/position.ts +4 -1
  123. package/src/layout/dot/rank-dot2.ts +13 -94
  124. package/src/layout/dot/self-loop.ts +29 -11
  125. package/src/layout/dot/splines-flat-multi.ts +12 -4
  126. package/src/layout/dot/splines-route.ts +10 -11
  127. package/src/layout/dot/straight-edges.ts +5 -3
  128. package/src/layout/fdp/tlayout.ts +6 -5
  129. package/src/layout/neato/__fixtures__/conjgrad-d.json +1 -0
  130. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.dot +141 -141
  131. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.xdot +339 -339
  132. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.dot +140 -140
  133. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.xdot +323 -323
  134. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.dot +141 -141
  135. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.xdot +339 -339
  136. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.dot +251 -251
  137. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.xdot +535 -535
  138. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.dot +14 -14
  139. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.xdot +32 -32
  140. package/src/layout/neato/__fixtures__/dim/hier-dim4.dot +8 -8
  141. package/src/layout/neato/__fixtures__/dim/hier-dim4.xdot +14 -14
  142. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.dot +17 -17
  143. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.xdot +35 -35
  144. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.dot +2 -2
  145. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.xdot +2 -2
  146. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.dot +11 -11
  147. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.xdot +21 -21
  148. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.dot +14 -14
  149. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.xdot +26 -26
  150. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.dot +13 -13
  151. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.xdot +30 -30
  152. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.dot +10 -10
  153. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.xdot +19 -19
  154. package/src/layout/neato/__fixtures__/dim/smart-units.json +1 -1
  155. package/src/layout/neato/__fixtures__/hier/cases/dirnone.plain +10 -10
  156. package/src/layout/neato/__fixtures__/hier/cases/tdist.plain +12 -12
  157. package/src/layout/neato/__fixtures__/hier/hier-probe.plain +1 -1
  158. package/src/layout/neato/__fixtures__/hier/hier-probe.xdot +19 -19
  159. package/src/layout/neato/__fixtures__/hier-imds.ts +14 -13
  160. package/src/layout/neato/__fixtures__/hier-majorization.ts +24 -23
  161. package/src/layout/neato/__fixtures__/ipsep/ipsep-grid.xdot +20 -20
  162. package/src/layout/neato/__fixtures__/ipsep/ipsep-k6.xdot +8 -8
  163. package/src/layout/neato/__fixtures__/ipsep/ipsep-rand-len.xdot +34 -34
  164. package/src/layout/neato/__fixtures__/ipsep/ipsep-rand.xdot +32 -32
  165. package/src/layout/neato/__fixtures__/ipsep/ipsep-tree.xdot +18 -18
  166. package/src/layout/neato/__fixtures__/ipsep/kd-ipsep-len.xdot +13 -13
  167. package/src/layout/neato/__fixtures__/ipsep/kd-ipsep.xdot +12 -12
  168. package/src/layout/neato/__fixtures__/models/hier-circuit.xdot +33 -33
  169. package/src/layout/neato/__fixtures__/models/hier-default.xdot +30 -30
  170. package/src/layout/neato/__fixtures__/models/hier-mds-nolen.xdot +30 -30
  171. package/src/layout/neato/__fixtures__/models/hier-pin-disc-circuit.xdot +35 -35
  172. package/src/layout/neato/__fixtures__/models/hier-shortpath.xdot +30 -30
  173. package/src/layout/neato/conjgrad.ts +38 -35
  174. package/src/layout/neato/matrix-ops-dense.ts +2 -20
  175. package/src/layout/neato/matrix-ops.ts +0 -20
  176. package/src/layout/neato/quad-prog-vpsc.ts +7 -5
  177. package/src/layout/neato/smart-ini-x.ts +15 -15
  178. package/src/layout/neato/stress-subspace.ts +5 -5
  179. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.dot +6 -6
  180. package/src/layout/sfdp/__fixtures__/dim/dim3.dot +6 -6
  181. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.dot +6 -6
  182. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.dot +6 -6
  183. package/src/layout/sfdp/__fixtures__/dim/regen.sh +2 -0
  184. package/src/model/rankEntry.ts +3 -1
  185. package/src/ortho/index.ts +0 -1
  186. package/src/ortho/partition.ts +10 -22
  187. package/src/pathplan/route.ts +14 -4
  188. package/src/render/dot/agwrite.ts +35 -15
  189. package/src/render/dot/types.ts +7 -2
  190. package/src/util/overflow.ts +74 -0
@@ -16,76 +16,76 @@ digraph G {
16
16
  height=0.5,
17
17
  pos="207.36,155.84",
18
18
  width=0.75];
19
- a -> b [_draw_="c 7 -#000000 B 4 186.21 155.84 186.25 155.84 186.29 155.84 186.34 155.84 ",
20
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 174.96 159.35 184.95 155.85 174.95 152.35 ",
21
- pos="e,186.47,155.84 186.21,155.84 186.25,155.84 186.29,155.84 186.34,155.84"];
22
19
  c [_draw_="c 7 -#000000 e 252.34 132.4 27 18 ",
23
20
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 252.34 128.2 0 6.21 1 -c ",
24
21
  height=0.5,
25
22
  pos="252.34,132.4",
26
23
  width=0.75];
27
- a -> c [_draw_="c 7 -#000000 B 4 184.38 149.44 194.07 147.01 205.3 144.19 215.81 141.56 ",
28
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 216.5 144.99 225.35 139.17 214.8 138.2 ",
29
- pos="e,226.82,138.8 184.38,149.44 194.07,147.01 205.3,144.19 215.81,141.56"];
30
24
  g [_draw_="c 7 -#000000 e 80.2 132.4 27 18 ",
31
25
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 80.2 128.2 0 7 1 -g ",
32
26
  height=0.5,
33
27
  pos="80.203,132.4",
34
28
  width=0.75];
35
- a -> g [_draw_="c 7 -#000000 B 4 133.94 148.43 128.21 146.72 122 144.86 115.9 143.05 ",
36
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 117.22 139.79 106.64 140.28 115.22 146.5 ",
37
- pos="e,105.19,139.85 133.94,148.43 128.21,146.72 122,144.86 115.9,143.05"];
38
- b -> c [_draw_="c 7 -#000000 B 4 229.06 144.54 229.19 144.47 229.33 144.39 229.46 144.32 ",
39
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 222.08 152.12 229.34 144.39 218.85 145.91 ",
40
- pos="e,230.68,143.69 229.06,144.54 229.19,144.47 229.33,144.39 229.46,144.32"];
41
29
  d [_draw_="c 7 -#000000 e 306.25 132.4 27 18 ",
42
30
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 306.25 128.2 0 7 1 -d ",
43
31
  height=0.5,
44
32
  pos="306.25,132.4",
45
33
  width=0.75];
46
- c -> d [_draw_="c 7 -#000000 B 4 279.61 132.4 279.67 132.4 279.72 132.4 279.77 132.4 ",
47
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 268.41 135.91 278.41 132.4 268.41 128.91 ",
48
- pos="e,279.93,132.4 279.61,132.4 279.67,132.4 279.72,132.4 279.77,132.4"];
49
34
  i [_draw_="c 7 -#000000 e 320.38 64.33 27 18 ",
50
35
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 320.38 60.13 0 3.89 1 -i ",
51
36
  height=0.5,
52
37
  pos="320.38,64.331",
53
38
  width=0.75];
54
- c -> i [_draw_="c 7 -#000000 B 4 267.44 117.3 276.25 108.48 287.54 97.19 297.43 87.29 ",
55
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 299.66 90.01 304.25 80.47 294.71 85.07 ",
56
- pos="e,305.32,79.396 267.44,117.3 276.25,108.48 287.54,97.187 297.43,87.293"];
57
39
  e [_draw_="c 7 -#000000 e 242.27 64.33 27 18 ",
58
40
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 242.27 60.13 0 6.21 1 -e ",
59
41
  height=0.5,
60
42
  pos="242.27,64.331",
61
43
  width=0.75];
62
- d -> e [_draw_="c 7 -#000000 B 4 291.73 116.96 283.72 108.43 273.59 97.65 264.59 88.07 ",
63
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 267.17 85.71 257.77 80.82 262.07 90.5 ",
64
- pos="e,256.73,79.717 291.73,116.96 283.72,108.43 273.59,97.651 264.59,88.075"];
65
44
  f [_draw_="c 7 -#000000 e 165.27 64.33 27 18 ",
66
45
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 165.27 60.13 0 4.66 1 -f ",
67
46
  height=0.5,
68
47
  pos="165.27,64.331",
69
48
  width=0.75];
70
- e -> f [_draw_="c 7 -#000000 B 4 214.91 64.33 211.28 64.33 207.5 64.33 203.73 64.33 ",
71
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 204.06 60.83 194.06 64.33 204.06 67.83 ",
72
- pos="e,192.55,64.331 214.91,64.331 211.28,64.331 207.5,64.331 203.73,64.331"];
73
- f -> a [_draw_="c 7 -#000000 B 4 164 82.41 163.12 94.86 161.93 111.7 160.92 126.11 ",
74
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 157.43 125.76 160.22 135.98 164.41 126.25 ",
75
- pos="e,160.11,137.49 164,82.411 163.12,94.864 161.93,111.7 160.92,126.11"];
76
49
  h [_draw_="c 7 -#000000 e 27 64.33 27 18 ",
77
50
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 27 60.13 0 7 1 -h ",
78
51
  height=0.5,
79
52
  pos="27,64.331",
80
53
  width=0.75];
81
- g -> h [_draw_="c 7 -#000000 B 4 67.59 116.27 61.3 108.22 53.54 98.29 46.5 89.29 ",
82
- _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 49.37 87.26 40.45 81.54 43.85 91.57 ",
83
- pos="e,39.518,80.347 67.594,116.27 61.3,108.22 53.544,98.294 46.504,89.286"];
84
54
  j [_draw_="c 7 -#000000 e 382.14 18 27 18 ",
85
55
  _ldraw_="F 14 11 -Times-Roman c 7 -#000000 T 382.14 13.8 0 3.89 1 -j ",
86
56
  height=0.5,
87
57
  pos="382.14,18",
88
58
  width=0.75];
59
+ a -> b [_draw_="c 7 -#000000 B 4 186.21 155.84 186.25 155.84 186.29 155.84 186.34 155.84 ",
60
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 174.96 159.35 184.95 155.85 174.95 152.35 ",
61
+ pos="e,186.47,155.84 186.21,155.84 186.25,155.84 186.29,155.84 186.34,155.84"];
62
+ b -> c [_draw_="c 7 -#000000 B 4 229.06 144.54 229.19 144.47 229.33 144.39 229.46 144.32 ",
63
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 222.08 152.12 229.34 144.39 218.85 145.91 ",
64
+ pos="e,230.68,143.69 229.06,144.54 229.19,144.47 229.33,144.39 229.46,144.32"];
65
+ c -> d [_draw_="c 7 -#000000 B 4 279.61 132.4 279.67 132.4 279.72 132.4 279.77 132.4 ",
66
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 268.41 135.91 278.41 132.4 268.41 128.91 ",
67
+ pos="e,279.93,132.4 279.61,132.4 279.67,132.4 279.72,132.4 279.77,132.4"];
68
+ d -> e [_draw_="c 7 -#000000 B 4 291.73 116.96 283.72 108.43 273.59 97.65 264.59 88.07 ",
69
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 267.17 85.71 257.77 80.82 262.07 90.5 ",
70
+ pos="e,256.73,79.717 291.73,116.96 283.72,108.43 273.59,97.651 264.59,88.075"];
71
+ e -> f [_draw_="c 7 -#000000 B 4 214.91 64.33 211.28 64.33 207.5 64.33 203.73 64.33 ",
72
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 204.06 60.83 194.06 64.33 204.06 67.83 ",
73
+ pos="e,192.55,64.331 214.91,64.331 211.28,64.331 207.5,64.331 203.73,64.331"];
74
+ f -> a [_draw_="c 7 -#000000 B 4 164 82.41 163.12 94.86 161.93 111.7 160.92 126.11 ",
75
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 157.43 125.76 160.22 135.98 164.41 126.25 ",
76
+ pos="e,160.11,137.49 164,82.411 163.12,94.864 161.93,111.7 160.92,126.11"];
77
+ a -> c [_draw_="c 7 -#000000 B 4 184.38 149.44 194.07 147.01 205.3 144.19 215.81 141.56 ",
78
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 216.5 144.99 225.35 139.17 214.8 138.2 ",
79
+ pos="e,226.82,138.8 184.38,149.44 194.07,147.01 205.3,144.19 215.81,141.56"];
80
+ a -> g [_draw_="c 7 -#000000 B 4 133.94 148.43 128.21 146.72 122 144.86 115.9 143.05 ",
81
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 117.22 139.79 106.64 140.28 115.22 146.5 ",
82
+ pos="e,105.19,139.85 133.94,148.43 128.21,146.72 122,144.86 115.9,143.05"];
83
+ g -> h [_draw_="c 7 -#000000 B 4 67.59 116.27 61.3 108.22 53.54 98.29 46.5 89.29 ",
84
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 49.37 87.26 40.45 81.54 43.85 91.57 ",
85
+ pos="e,39.518,80.348 67.594,116.27 61.3,108.22 53.544,98.294 46.504,89.286"];
86
+ c -> i [_draw_="c 7 -#000000 B 4 267.44 117.3 276.25 108.48 287.54 97.19 297.43 87.29 ",
87
+ _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 299.66 90.01 304.25 80.47 294.71 85.07 ",
88
+ pos="e,305.32,79.396 267.44,117.3 276.25,108.48 287.54,97.187 297.43,87.293"];
89
89
  i -> j [_draw_="c 7 -#000000 B 4 338.58 50.68 343.68 46.85 349.35 42.6 354.86 38.47 ",
90
90
  _hdraw_="S 5 -solid c 7 -#000000 C 7 -#000000 P 3 356.75 41.42 362.65 32.62 352.55 35.82 ",
91
91
  pos="e,363.86,31.713 338.58,50.681 343.68,46.851 349.35,42.6 354.86,38.466"];
@@ -8,11 +8,11 @@ import {
8
8
  maxAbs,
9
9
  orthog1,
10
10
  rightMultWithVector,
11
- rightMultWithVectorF,
12
11
  vectorsAddition,
13
12
  vectorsScalarMult,
14
13
  vectorsSubtraction,
15
14
  } from './matrix-ops.js';
15
+ import { rightMultWithVectorD } from './matrix-ops-dense.js';
16
16
 
17
17
  /**
18
18
  * Conjugate gradient solvers for packed symmetric float matrices.
@@ -174,7 +174,7 @@ export function conjugateGradientMkernel(
174
174
  }
175
175
 
176
176
  // ---------------------------------------------------------------------------
177
- // Double-precision solvers (conjugate_gradient, conjugate_gradient_f)
177
+ // Double-precision solvers (conjugate_gradient, conjugate_gradient_d)
178
178
  // ---------------------------------------------------------------------------
179
179
 
180
180
  /**
@@ -268,19 +268,21 @@ export function conjugateGradient(
268
268
  }
269
269
 
270
270
  /**
271
- * Block widths of conjugate_gradient_f's inlined sites in the same build:
272
- * the initial `A x` and the in-loop `A p` row reductions and the initial
273
- * `r.r` are blocks of 4, `p.Ap` blocks of 8, the in-loop `r.r` scalar.
274
- * Verified bit for bit against the oracle's own libneatogen.a over random
275
- * float matrices (n = 5..40, ortho1 on and off).
271
+ * Block widths of conjugate_gradient_d's reductions in the 16.1.1 arm64
272
+ * `-O3 -flto=thin` build, where the function is out of line (one copy serves
273
+ * IMDS_given_dim and the subspace loop): the initial `r.r` is blocks of 4,
274
+ * `p.Ap` blocks of 8, the in-loop `r.r` scalar. The rows of `A x` and `A p`
275
+ * are blocks of 8, which is `rightMultWithVectorD`'s own width. Calibrated
276
+ * bit for bit against the oracle's libneatogen.a on 288 random systems
277
+ * (n = 5..40, ortho1 on and off): x after every iteration count, `r.r`, `p.Ap`
278
+ * and `alpha`; no other choice of widths in {1, 4, 8, 16} per site matches
279
+ * (plans/issue-156-neato-double-laplacian/harness/native/calibrate.mts).
276
280
  */
277
- const CGF_BLOCK_AX = 4;
278
- const CGF_BLOCK_AP = 4;
279
- const CGF_BLOCK_INITIAL_RR = 4;
280
- const CGF_BLOCK_P_AP = 8;
281
+ const CGD_BLOCK_INITIAL_RR = 4;
282
+ const CGD_BLOCK_P_AP = 8;
281
283
 
282
- /** Work vectors of one conjugate_gradient_f call. @internal */
283
- interface CgfState {
284
+ /** Work vectors of one conjugate_gradient_d call. @internal */
285
+ interface CgdState {
284
286
  r: Float64Array;
285
287
  p: Float64Array;
286
288
  Ap: Float64Array;
@@ -290,11 +292,11 @@ interface CgfState {
290
292
 
291
293
  /**
292
294
  * Residual setup: r = orth_b - A x, p = r. `x` is centred when `ortho1`.
293
- * @see lib/neatogen/conjgrad.c:conjugate_gradient_f
295
+ * @see lib/neatogen/conjgrad.c:conjugate_gradient_d
294
296
  */
295
- function cgfInit(
296
- A: readonly Float32Array[], x: Float64Array, b: Float64Array, n: number, ortho1: boolean,
297
- ): CgfState {
297
+ function cgdInit(
298
+ A: readonly Float64Array[], x: Float64Array, b: Float64Array, n: number, ortho1: boolean,
299
+ ): CgdState {
298
300
  const orthB = new Float64Array(n);
299
301
  copyVector(n, b, orthB);
300
302
  if (ortho1) {
@@ -302,25 +304,25 @@ function cgfInit(
302
304
  orthog1(n, x);
303
305
  }
304
306
  const Ax = new Float64Array(n);
305
- rightMultWithVectorF(A, n, x, Ax, CGF_BLOCK_AX);
307
+ rightMultWithVectorD(A, n, n, x, Ax);
306
308
  const r = new Float64Array(n);
307
309
  vectorsSubtraction(n, orthB, Ax, r);
308
310
  const p = new Float64Array(n);
309
311
  copyVector(n, r, p);
310
312
  return {
311
313
  r, p, Ap: new Float64Array(n), alphap: new Float64Array(n),
312
- rr: innerProduct(n, r, r, CGF_BLOCK_INITIAL_RR),
314
+ rr: innerProduct(n, r, r, CGD_BLOCK_INITIAL_RR),
313
315
  };
314
316
  }
315
317
 
316
318
  /**
317
319
  * Residual and direction update of a non-last iteration; returns C's `rv`
318
320
  * (1 after reporting a zero-length residual).
319
- * @see lib/neatogen/conjgrad.c:conjugate_gradient_f
321
+ * @see lib/neatogen/conjgrad.c:conjugate_gradient_d
320
322
  */
321
- function cgfUpdate(n: number, alpha: number, st: CgfState): number {
323
+ function cgdUpdate(n: number, alpha: number, st: CgdState): number {
322
324
  vectorsScalarMult(n, st.Ap, alpha, st.Ap);
323
- vectorsSubtraction(n, st.r, st.Ap, st.r);
325
+ vectorsSubtraction(n, st.r, st.Ap, st.r); // fast computation of r, the residual
324
326
  const rrNew = innerProduct(n, st.r, st.r, BLOCK_NONE);
325
327
  if (st.rr === 0) {
326
328
  agerrorf('conjugate_gradient: unexpected length 0 vector');
@@ -333,35 +335,36 @@ function cgfUpdate(n: number, alpha: number, st: CgfState): number {
333
335
  return 0;
334
336
  }
335
337
 
336
- /** Stopping rule and centring of {@link conjugateGradientF} (C's trailing parameters). */
337
- export interface CgfOptions {
338
+ /** Stopping rule and centring of {@link conjugateGradientD} (C's trailing parameters). */
339
+ export interface CgdOptions {
338
340
  tol: number;
339
341
  maxIterations: number;
340
342
  ortho1: boolean;
341
343
  }
342
344
 
343
345
  /**
344
- * Solves A x = b for a float** matrix with double x, b (x, b centred when
345
- * `ortho1`). Returns 0, or 1 after a zero-length residual (callers test `< 0`).
346
- * @see lib/neatogen/conjgrad.c:conjugate_gradient_f
346
+ * Solves A x = b for a dense double** matrix (x, b centred when `ortho1`).
347
+ * Returns 0, or 1 after a zero-length residual (IMDS_given_dim tests `< 0`,
348
+ * the subspace loop tests non-zero, as C does).
349
+ * @see lib/neatogen/conjgrad.c:conjugate_gradient_d
347
350
  */
348
- export function conjugateGradientF(
349
- A: readonly Float32Array[],
351
+ export function conjugateGradientD(
352
+ A: readonly Float64Array[],
350
353
  x: Float64Array,
351
354
  b: Float64Array,
352
355
  n: number,
353
- opts: CgfOptions,
356
+ opts: CgdOptions,
354
357
  ): number {
355
358
  const { tol, maxIterations, ortho1 } = opts;
356
- const st = cgfInit(A, x, b, n, ortho1);
359
+ const st = cgdInit(A, x, b, n, ortho1);
357
360
  for (let i = 0; i < maxIterations && maxAbs(n, st.r) > tol; i++) {
358
- rightMultWithVectorF(A, n, st.p, st.Ap, CGF_BLOCK_AP);
359
- const pAp = innerProduct(n, st.p, st.Ap, CGF_BLOCK_P_AP);
361
+ rightMultWithVectorD(A, n, n, st.p, st.Ap);
362
+ const pAp = innerProduct(n, st.p, st.Ap, CGD_BLOCK_P_AP);
360
363
  if (pAp === 0) break;
361
364
  const alpha = st.rr / pAp;
362
- vectorsScalarMult(n, st.p, alpha, st.alphap);
365
+ vectorsScalarMult(n, st.p, alpha, st.alphap); // derive new x
363
366
  vectorsAddition(n, x, st.alphap, x);
364
- if (i < maxIterations - 1 && cgfUpdate(n, alpha, st) === 1) return 1;
367
+ if (i < maxIterations - 1 && cgdUpdate(n, alpha, st) === 1) return 1; // not last iteration
365
368
  }
366
369
  return 0;
367
370
  }
@@ -28,12 +28,12 @@ const P_ITERATION_THRESHOLD = 1e-3;
28
28
  const POWER_LENGTH_FLOOR = 1e-10;
29
29
  /** `rand() % 100`, the components of a guessed eigenvector. */
30
30
  const GUESS_RANGE = 100;
31
- /** Vector width of the reductions inlined in `_power_iteration` and `_stress_majorization_kD_mkernel`. */
31
+ /** Vector width of the reductions inlined in `_power_iteration`, `_stress_majorization_kD_mkernel` and `_conjugate_gradient_d`. */
32
32
  const BLOCK_ROW = 8;
33
33
 
34
34
  /**
35
35
  * result = matrix × vector, matrix dim1 × dim2. Its inlined copies (in
36
- * power_iteration and the subspace loop) are both 8-wide.
36
+ * power_iteration, the subspace loop and conjugate_gradient_d) are all 8-wide.
37
37
  * @see lib/neatogen/matrix_ops.c:right_mult_with_vector_d
38
38
  */
39
39
  export function rightMultWithVectorD(
@@ -64,24 +64,6 @@ export function rightMultWithVectorTranspose(
64
64
  }
65
65
  }
66
66
 
67
- /**
68
- * C = A × B: A is dim1 × dim2 (double), B is dim2 × dim3 (float), C is float.
69
- * @see lib/neatogen/matrix_ops.c:mult_dense_mat
70
- */
71
- export function multDenseMat(
72
- A: readonly Float64Array[], B: readonly Float32Array[], dim1: number, dim2: number, dim3: number,
73
- ): Float32Array[] {
74
- const C = Array.from({ length: dim1 }, () => new Float32Array(dim3));
75
- for (let i = 0; i < dim1; i++) {
76
- for (let j = 0; j < dim3; j++) {
77
- let sum = 0;
78
- for (let k = 0; k < dim2; k++) sum = fma(A[i]![k]!, B[k]![j]!, sum);
79
- C[i]![j] = sum;
80
- }
81
- }
82
- return C;
83
- }
84
-
85
67
  /**
86
68
  * C = A × B: A is dim1 × dim2 (double), B is dim2 × dim3 (float), C is double.
87
69
  * @see lib/neatogen/matrix_ops.c:mult_dense_mat_d
@@ -191,26 +191,6 @@ export function maxAbs(n: number, vector: Float64Array): number {
191
191
  return maxVal;
192
192
  }
193
193
 
194
- /**
195
- * result = matrix * vector for an n x n float** matrix and double vector;
196
- * each row's reduction is blocked as the call site was compiled.
197
- * @see lib/neatogen/matrix_ops.c:right_mult_with_vector_f
198
- */
199
- export function rightMultWithVectorF(
200
- matrix: readonly Float32Array[], n: number, vector: Float64Array, result: Float64Array,
201
- block: number,
202
- ): void {
203
- const blocked = block === BLOCK_NONE ? 0 : n - (n % block);
204
- for (let i = 0; i < n; i++) {
205
- const row = matrix[i]!;
206
- let res = 0;
207
- let j = 0;
208
- for (; j < blocked; j++) res += row[j]! * vector[j]!;
209
- for (; j < n; j++) res = fma(row[j]!, vector[j]!, res);
210
- result[i] = res;
211
- }
212
- }
213
-
214
194
  /**
215
195
  * result = matrix * vector over the sparse `vtx_data` rows (`ewgts` weights).
216
196
  * The loop is scalar in the oracle: every term is an fmadd.
@@ -39,6 +39,7 @@ import {
39
39
  type Variable,
40
40
  } from '../../vpsc/index.js';
41
41
  import { InternalError } from '../../errors.js';
42
+ import { fdivfOverflow } from '../../util/overflow.js';
42
43
  import { computeHierarchy } from './compute-hierarchy.js';
43
44
  import type { DirectedVtxData } from './opt-arrangement.js';
44
45
  import { fmaf, unpackMatrix } from './quad-prog-solve.js';
@@ -173,12 +174,14 @@ function descentStep(e: CMajEnvVPSC, b: Float32Array, place: Float32Array, n: nu
173
174
  const r = rowReduce(A[i]!, 2, g, n, 0);
174
175
  denominator = fmaf(-r, g[i]!, denominator);
175
176
  }
176
- return denominator !== 0 ? -fr(numerator / denominator) : -1.0;
177
+ // C: if (fdivf_overflow(numerator, denominator, &alpha)) alpha = 1.0;
178
+ const alpha = fdivfOverflow(numerator, denominator) ?? 1.0;
179
+ return -alpha;
177
180
  }
178
181
 
179
182
  /**
180
183
  * `d = place - old_place` and the line-search factor `beta` along it.
181
- * @see lib/neatogen/quad_prog_vpsc.c:constrained_majorization_vpsc (130-147)
184
+ * @see lib/neatogen/quad_prog_vpsc.c:constrained_majorization_vpsc (130-146)
182
185
  */
183
186
  function lineSearchBeta(e: CMajEnvVPSC, place: Float32Array, n: number): number {
184
187
  const A = e.A!;
@@ -195,9 +198,8 @@ function lineSearchBeta(e: CMajEnvVPSC, place: Float32Array, n: number): number
195
198
  const r = rowReduce(A[i]!, 2, d, n, 0);
196
199
  denominator = fmaf(r, d[i]!, denominator);
197
200
  }
198
- // C: !is_exactly_zero(denominator) && !is_exactly_equal(denominator, -0.0)
199
- if (!Object.is(denominator, 0) && !Object.is(denominator, -0)) return fr(numerator / denominator);
200
- return 1.0;
201
+ // C: if (fdivf_overflow(numerator, denominator, &beta)) beta = 1.0;
202
+ return fdivfOverflow(numerator, denominator) ?? 1.0;
201
203
  }
202
204
 
203
205
  /**
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { crand } from '../../common/crand.js';
14
14
  import { fma } from '../../common/fma.js';
15
- import { conjugateGradientF } from './conjgrad.js';
15
+ import { conjugateGradientD } from './conjgrad.js';
16
16
  import type { VtxData } from './dijkstra.js';
17
17
  import { computeApsp } from './kkutils.js';
18
18
  import {
@@ -366,19 +366,19 @@ function scaleGivenCoords(Dij: Int32Array[], n: number, x: Float64Array): number
366
366
  }
367
367
 
368
368
  /**
369
- * The Laplacian of the weights w_ij = 1 / D_ij^2, as floats.
369
+ * The Laplacian of the weights w_ij = 1 / D_ij^2, in double (`double **lap`).
370
370
  * @see lib/neatogen/smart_ini_x.c:IMDS_given_dim
371
371
  */
372
- function computeLaplacian(Dij: Int32Array[], n: number): FloatMatrix {
373
- const lap: FloatMatrix = [];
372
+ function computeLaplacian(Dij: Int32Array[], n: number): Float64Array[] {
373
+ const lap: Float64Array[] = [];
374
374
  for (let i = 0; i < n; i++) {
375
- const row = new Float32Array(n);
376
- let degree = fr(0);
375
+ const row = new Float64Array(n);
376
+ let degree = 0;
377
377
  for (let j = 0; j < n; j++) {
378
378
  if (j === i) continue;
379
- const w = fr(fr(-1.0) / fr(fr(Dij[i]![j]!) * fr(Dij[i]![j]!))); // w_{ij}
379
+ const w = -1.0 / (Dij[i]![j]! * Dij[i]![j]!); // w_{ij}
380
380
  row[j] = w;
381
- degree = fr(degree - w);
381
+ degree -= w;
382
382
  }
383
383
  row[i] = degree;
384
384
  lap.push(row);
@@ -406,7 +406,8 @@ function computeResidualDistances(Dij: Int32Array[], n: number, x: Float64Array)
406
406
 
407
407
  /**
408
408
  * One entry of the balance vector: sum_j sign * delta_ij * w_ij, the sign
409
- * following the order of y_i and y_j.
409
+ * following the order of y_i and y_j. The oracle fuses both branches:
410
+ * `b += D * -lap` and `b -= D * -lap` are one fmadd / fmsub each.
410
411
  * @see lib/neatogen/smart_ini_x.c:IMDS_given_dim
411
412
  */
412
413
  function balanceOf(i: number, n: number, y: Float64Array, ctx: BalanceCtx): number {
@@ -414,9 +415,8 @@ function balanceOf(i: number, n: number, y: Float64Array, ctx: BalanceCtx): numb
414
415
  let b = 0;
415
416
  for (let j = 0; j < n; j++) {
416
417
  if (j === i) continue;
417
- const term = fr(fr(ctx.Dij[i]![j]!) * -ctx.lap[i]![j]!); // w_{ij}*delta_{ij}
418
- if (posI >= y[j]!) b += term;
419
- else b -= term;
418
+ const lap = ctx.lap[i]![j]!;
419
+ b = fma(ctx.Dij[i]![j]!, posI >= y[j]! ? -lap : lap, b); // w_{ij}*delta_{ij}
420
420
  }
421
421
  return b;
422
422
  }
@@ -424,7 +424,7 @@ function balanceOf(i: number, n: number, y: Float64Array, ctx: BalanceCtx): numb
424
424
  /** Distances and Laplacian read by {@link balanceOf}. */
425
425
  interface BalanceCtx {
426
426
  Dij: Int32Array[];
427
- lap: FloatMatrix;
427
+ lap: Float64Array[];
428
428
  }
429
429
 
430
430
  /**
@@ -441,11 +441,11 @@ function solveBalanced(
441
441
  ): 0 | 1 {
442
442
  let converged = false;
443
443
  for (let iterations2 = 0; iterations2 < 200 && !converged; iterations2++) {
444
- if (conjugateGradientF(ctx.lap, y, balance, n, { tol: convTol, maxIterations: n, ortho1: true }) < 0) return 1;
444
+ if (conjugateGradientD(ctx.lap, y, balance, n, { tol: convTol, maxIterations: n, ortho1: true }) < 0) return 1;
445
445
  converged = true;
446
446
  for (let i = 0; i < n; i++) {
447
447
  const b = balanceOf(i, n, y, ctx);
448
- if (b !== balance[i] && Math.abs(1 - b / balance[i]!) > 1e-5) {
448
+ if (Math.abs(1 - b / balance[i]!) > 1e-5) {
449
449
  converged = false;
450
450
  balance[i] = b;
451
451
  }
@@ -21,11 +21,11 @@
21
21
 
22
22
  import { crand } from '../../common/crand.js';
23
23
  import { fma } from '../../common/fma.js';
24
- import { conjugateGradientF } from './conjgrad.js';
24
+ import { conjugateGradientD } from './conjgrad.js';
25
25
  import type { VtxData } from './dijkstra.js';
26
26
  import { centerCoordinate, embedGraph, pivotDistances, saveWeights } from './embed-graph.js';
27
27
  import { computeNewWeights, restoreOldWeights } from './kkutils.js';
28
- import { multDenseMat, multSparseDenseMatTranspose, rightMultWithVectorD, rightMultWithVectorTranspose } from './matrix-ops-dense.js';
28
+ import { multDenseMatD, multSparseDenseMatTranspose, rightMultWithVectorD, rightMultWithVectorTranspose } from './matrix-ops-dense.js';
29
29
  import { iterativePCA1D, pcaAlloc } from './pca.js';
30
30
  import { TOLERANCE_CG } from './stress.js';
31
31
 
@@ -255,7 +255,7 @@ interface SubspaceState {
255
255
  readonly subspace: readonly Float64Array[];
256
256
  readonly distances: readonly DistData[];
257
257
  readonly lap: readonly VtxData[];
258
- readonly matrix: readonly Float32Array[];
258
+ readonly matrix: readonly Float64Array[];
259
259
  readonly directions: readonly Float64Array[];
260
260
  readonly coords: readonly Float64Array[];
261
261
  readonly b: Float64Array;
@@ -294,7 +294,7 @@ function optimizeAxes(st: SubspaceState): boolean {
294
294
  for (let k = 0; k < dim; k++) {
295
295
  computeB(st, k);
296
296
  rightMultWithVectorD(subspace, subspaceDim, n, b, bRestricted);
297
- const rc = conjugateGradientF(matrix, directions[k]!, bRestricted, subspaceDim, {
297
+ const rc = conjugateGradientD(matrix, directions[k]!, bRestricted, subspaceDim, {
298
298
  tol: TOLERANCE_CG, maxIterations: subspaceDim, ortho1: false,
299
299
  });
300
300
  if (rc !== 0) return true;
@@ -360,7 +360,7 @@ export function sparseStressSubspaceMajorizationKD(
360
360
 
361
361
  // the restriction of the Laplacian to the subspace
362
362
  const tmpMat = multSparseDenseMatTranspose(lap, subspace, n, subspaceDim);
363
- const matrix = multDenseMat(subspace, tmpMat, subspaceDim, n, subspaceDim);
363
+ const matrix = multDenseMatD(subspace, tmpMat, subspaceDim, n, subspaceDim);
364
364
 
365
365
  const iterations = optimizeLayout({
366
366
  n, dim, subspaceDim, subspace, distances, lap, matrix, directions, coords,
@@ -10,23 +10,23 @@ graph G {
10
10
  b [height=0.5,
11
11
  pos="27,272.05,-746.78",
12
12
  width=0.75];
13
- a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
14
13
  c [height=0.5,
15
14
  pos="85.401,226.11,-801.24",
16
15
  width=0.75];
17
- a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
18
- b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
19
16
  d [height=0.5,
20
17
  pos="156.36,144.76,-803.5",
21
18
  width=0.75];
22
- c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
23
19
  e [height=0.5,
24
20
  pos="160.26,102.33,-708.71",
25
21
  width=0.75];
26
- d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
27
- e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
28
22
  f [height=0.5,
29
23
  pos="221.74,18,-676.03",
30
24
  width=0.75];
25
+ a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
26
+ b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
27
+ c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
28
+ d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
29
+ e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
30
+ a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
31
31
  e -- f [pos="172.11,86.072 182.93,71.234 198.84,49.409 209.72,34.498"];
32
32
  }
@@ -9,23 +9,23 @@ graph G {
9
9
  b [height=0.5,
10
10
  pos="27,272.05",
11
11
  width=0.75];
12
- a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
13
12
  c [height=0.5,
14
13
  pos="85.401,226.11",
15
14
  width=0.75];
16
- a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
17
- b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
18
15
  d [height=0.5,
19
16
  pos="156.36,144.76",
20
17
  width=0.75];
21
- c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
22
18
  e [height=0.5,
23
19
  pos="160.26,102.33",
24
20
  width=0.75];
25
- d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
26
- e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
27
21
  f [height=0.5,
28
22
  pos="221.74,18",
29
23
  width=0.75];
24
+ a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
25
+ b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
26
+ c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
27
+ d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
28
+ e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
29
+ a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
30
30
  e -- f [pos="172.11,86.072 182.93,71.234 198.84,49.409 209.72,34.498"];
31
31
  }
@@ -10,23 +10,23 @@ graph G {
10
10
  b [height=0.5,
11
11
  pos="115.45,247.38,391.97,1819.1",
12
12
  width=0.75];
13
- a -- b [pos="97.653,198.45 101.14,208.04 105.42,219.82 108.91,229.42"];
14
13
  c [height=0.5,
15
14
  pos="82.07,187.27,336.22,1827",
16
15
  width=0.75];
17
- a -- c [pos="82.172,187.19 82.139,187.22 82.114,187.24 82.096,187.25"];
18
- b -- c [pos="105.97,230.31 101.5,222.26 96.173,212.67 91.685,204.58"];
19
16
  d [height=0.5,
20
17
  pos="47.025,107.38,301.45,1783.9",
21
18
  width=0.75];
22
- c -- d [pos="74.293,169.54 68.485,156.3 60.583,138.29 54.781,125.06"];
23
19
  e [height=0.5,
24
20
  pos="52.909,90.582,350.09,1698.6",
25
21
  width=0.75];
26
- d -- e [pos="52.892,90.63 52.898,90.614 52.902,90.602 52.905,90.594"];
27
- e -- a [pos="60.462,108.35 67.164,124.12 76.904,147.04 83.602,162.8"];
28
22
  f [height=0.5,
29
23
  pos="27,18,343.6,1625.3",
30
24
  width=0.75];
25
+ a -- b [pos="97.653,198.45 101.14,208.04 105.42,219.82 108.91,229.42"];
26
+ b -- c [pos="105.97,230.31 101.5,222.26 96.173,212.67 91.685,204.58"];
27
+ c -- d [pos="74.293,169.54 68.485,156.3 60.583,138.29 54.781,125.06"];
28
+ d -- e [pos="52.892,90.63 52.898,90.614 52.902,90.602 52.905,90.594"];
29
+ e -- a [pos="60.462,108.35 67.164,124.12 76.904,147.04 83.602,162.8"];
30
+ a -- c [pos="82.172,187.19 82.139,187.22 82.114,187.24 82.096,187.25"];
31
31
  e -- f [pos="46.505,72.64 42.519,61.474 37.41,47.162 33.421,35.987"];
32
32
  }
@@ -11,23 +11,23 @@ graph G {
11
11
  b [height=0.5,
12
12
  pos="27,272.05,-746.78",
13
13
  width=0.75];
14
- a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
15
14
  c [height=0.5,
16
15
  pos="85.401,226.11,-801.24",
17
16
  width=0.75];
18
- a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
19
- b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
20
17
  d [height=0.5,
21
18
  pos="156.36,144.76,-803.5",
22
19
  width=0.75];
23
- c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
24
20
  e [height=0.5,
25
21
  pos="160.26,102.33,-708.71",
26
22
  width=0.75];
27
- d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
28
- e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
29
23
  f [height=0.5,
30
24
  pos="221.74,18,-676.03",
31
25
  width=0.75];
26
+ a -- b [pos="69.373,212.21 60.296,225.03 47.79,242.69 38.719,255.5"];
27
+ b -- c [pos="44.84,258.01 52.085,252.31 60.436,245.75 67.671,240.06"];
28
+ c -- d [pos="99.082,210.42 111.57,196.11 129.93,175.06 142.47,160.67"];
29
+ d -- e [pos="158.03,126.52 158.22,124.54 158.4,122.53 158.58,120.55"];
30
+ e -- a [pos="146.83,118.16 132.28,135.32 109.19,162.54 94.606,179.73"];
31
+ a -- c [pos="83.658,213.71 83.672,213.82 83.686,213.92 83.701,214.02"];
32
32
  e -- f [pos="172.11,86.072 182.93,71.234 198.84,49.409 209.72,34.498"];
33
33
  }
@@ -4,6 +4,8 @@
4
4
  # <case>.dot and <case>.stderr per <case>.gv. Engine sfdp. The .stderr is the -Txdot run's;
5
5
  # regen reports a case whose -Tdot stderr differs. Inputs come from
6
6
  # plans/post-16-1-followups-10/harness/T0/gen-fixtures.py.
7
+ # {dim3,dim3-dimen3,dim4-dimen4,overlap-prism-dim3}.dot are native 16.1.1's, re-captured by
8
+ # #149 (plans/issue-149-agwrite-edge-order/harness/recapture.sh).
7
9
  #
8
10
  # Usage: GVBINDIR=<full plugin dir> bash regen.sh
9
11
  set -u
@@ -73,8 +73,10 @@ export interface RankEntry {
73
73
 
74
74
  /**
75
75
  * Flat-edge adjacency matrix for cycle-breaking. Allocated per-rank by
76
- * flatBreakcycles when any flat edges exist; freed in cleanup2.
76
+ * flatBreakcycles when any flat edges exist. Left set after cleanup2, as
77
+ * C's free_matrix leaves the pointer: flat_edges reads it as a flag.
77
78
  * @see lib/dotgen/mincross.c:GD_rank(g)[r].flat
79
+ * @see lib/dotgen/flat.c:flat_edges (16.1.1) 274
78
80
  */
79
81
  flat?: AdjMatrix;
80
82
 
@@ -23,7 +23,6 @@ import { gvQsort } from "../util/bsd-qsort.js";
23
23
  import { agwarningf } from '../common/agerr.js';
24
24
 
25
25
  export type { OrthoGraph, OrthoEdge, OrthoNode, OrthoPoint, ClipAndInstallFn };
26
- export { SEED } from "./partition.js";
27
26
 
28
27
  // ─── Edge length / sorting ────────────────────────────────────────────────────
29
28