@knowvah/dot-engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +277 -0
- package/README.md +292 -0
- package/dist/api/builder.d.ts +78 -0
- package/dist/api/builder.d.ts.map +1 -0
- package/dist/api/edge-ops.d.ts +45 -0
- package/dist/api/edge-ops.d.ts.map +1 -0
- package/dist/api/geometry.d.ts +159 -0
- package/dist/api/geometry.d.ts.map +1 -0
- package/dist/api/index.d.ts +24 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api.js +719 -0
- package/dist/api.js.map +7 -0
- package/dist/bundle.js +101 -0
- package/dist/cdt/bag.d.ts +58 -0
- package/dist/cdt/bag.d.ts.map +1 -0
- package/dist/cdt/hash-core.d.ts +40 -0
- package/dist/cdt/hash-core.d.ts.map +1 -0
- package/dist/cdt/hash.d.ts +74 -0
- package/dist/cdt/hash.d.ts.map +1 -0
- package/dist/cdt/index.d.ts +16 -0
- package/dist/cdt/index.d.ts.map +1 -0
- package/dist/cdt/splay-core.d.ts +78 -0
- package/dist/cdt/splay-core.d.ts.map +1 -0
- package/dist/cdt/splay.d.ts +63 -0
- package/dist/cdt/splay.d.ts.map +1 -0
- package/dist/cdt/strhash.d.ts +26 -0
- package/dist/cdt/strhash.d.ts.map +1 -0
- package/dist/cdt/types.d.ts +11 -0
- package/dist/cdt/types.d.ts.map +1 -0
- package/dist/common/arith.d.ts +35 -0
- package/dist/common/arith.d.ts.map +1 -0
- package/dist/common/arm-pow-data.d.ts +17 -0
- package/dist/common/arm-pow-data.d.ts.map +1 -0
- package/dist/common/arm-pow.d.ts +12 -0
- package/dist/common/arm-pow.d.ts.map +1 -0
- package/dist/common/arrows-constants.d.ts +97 -0
- package/dist/common/arrows-constants.d.ts.map +1 -0
- package/dist/common/arrows-geometry.d.ts +24 -0
- package/dist/common/arrows-geometry.d.ts.map +1 -0
- package/dist/common/arrows-miter.d.ts +24 -0
- package/dist/common/arrows-miter.d.ts.map +1 -0
- package/dist/common/arrows-shapes-poly.d.ts +24 -0
- package/dist/common/arrows-shapes-poly.d.ts.map +1 -0
- package/dist/common/arrows-shapes-util.d.ts +77 -0
- package/dist/common/arrows-shapes-util.d.ts.map +1 -0
- package/dist/common/arrows-shapes.d.ts +48 -0
- package/dist/common/arrows-shapes.d.ts.map +1 -0
- package/dist/common/arrows-types.d.ts +59 -0
- package/dist/common/arrows-types.d.ts.map +1 -0
- package/dist/common/arrows.d.ts +69 -0
- package/dist/common/arrows.d.ts.map +1 -0
- package/dist/common/color.d.ts +66 -0
- package/dist/common/color.d.ts.map +1 -0
- package/dist/common/colorData.d.ts +10 -0
- package/dist/common/colorData.d.ts.map +1 -0
- package/dist/common/compass-port.d.ts +39 -0
- package/dist/common/compass-port.d.ts.map +1 -0
- package/dist/common/crand.d.ts +42 -0
- package/dist/common/crand.d.ts.map +1 -0
- package/dist/common/edge-label-init.d.ts +51 -0
- package/dist/common/edge-label-init.d.ts.map +1 -0
- package/dist/common/edge-offset.d.ts +66 -0
- package/dist/common/edge-offset.d.ts.map +1 -0
- package/dist/common/ellipse-wedge.d.ts +10 -0
- package/dist/common/ellipse-wedge.d.ts.map +1 -0
- package/dist/common/emit-types.d.ts +255 -0
- package/dist/common/emit-types.d.ts.map +1 -0
- package/dist/common/fma.d.ts +10 -0
- package/dist/common/fma.d.ts.map +1 -0
- package/dist/common/graph-init.d.ts +61 -0
- package/dist/common/graph-init.d.ts.map +1 -0
- package/dist/common/html-entities.d.ts +17 -0
- package/dist/common/html-entities.d.ts.map +1 -0
- package/dist/common/html-string.d.ts +14 -0
- package/dist/common/html-string.d.ts.map +1 -0
- package/dist/common/htmltable-emit-fill.d.ts +84 -0
- package/dist/common/htmltable-emit-fill.d.ts.map +1 -0
- package/dist/common/htmltable-emit-rules.d.ts +79 -0
- package/dist/common/htmltable-emit-rules.d.ts.map +1 -0
- package/dist/common/htmltable-emit.d.ts +63 -0
- package/dist/common/htmltable-emit.d.ts.map +1 -0
- package/dist/common/htmltable-lex.d.ts +16 -0
- package/dist/common/htmltable-lex.d.ts.map +1 -0
- package/dist/common/htmltable-parse.d.ts +37 -0
- package/dist/common/htmltable-parse.d.ts.map +1 -0
- package/dist/common/htmltable-port.d.ts +15 -0
- package/dist/common/htmltable-port.d.ts.map +1 -0
- package/dist/common/htmltable-pos-runs.d.ts +88 -0
- package/dist/common/htmltable-pos-runs.d.ts.map +1 -0
- package/dist/common/htmltable-pos.d.ts +192 -0
- package/dist/common/htmltable-pos.d.ts.map +1 -0
- package/dist/common/htmltable-types.d.ts +237 -0
- package/dist/common/htmltable-types.d.ts.map +1 -0
- package/dist/common/htmltable.d.ts +74 -0
- package/dist/common/htmltable.d.ts.map +1 -0
- package/dist/common/layers.d.ts +20 -0
- package/dist/common/layers.d.ts.map +1 -0
- package/dist/common/make-label.d.ts +60 -0
- package/dist/common/make-label.d.ts.map +1 -0
- package/dist/common/multicolor.d.ts +46 -0
- package/dist/common/multicolor.d.ts.map +1 -0
- package/dist/common/nodeinit.d.ts +45 -0
- package/dist/common/nodeinit.d.ts.map +1 -0
- package/dist/common/poly-gencode.d.ts +40 -0
- package/dist/common/poly-gencode.d.ts.map +1 -0
- package/dist/common/poly-init.d.ts +51 -0
- package/dist/common/poly-init.d.ts.map +1 -0
- package/dist/common/poly-inside.d.ts +37 -0
- package/dist/common/poly-inside.d.ts.map +1 -0
- package/dist/common/poly-shapes-cases.d.ts +31 -0
- package/dist/common/poly-shapes-cases.d.ts.map +1 -0
- package/dist/common/poly-shapes-cases2.d.ts +25 -0
- package/dist/common/poly-shapes-cases2.d.ts.map +1 -0
- package/dist/common/poly-shapes-util.d.ts +42 -0
- package/dist/common/poly-shapes-util.d.ts.map +1 -0
- package/dist/common/poly-shapes.d.ts +39 -0
- package/dist/common/poly-shapes.d.ts.map +1 -0
- package/dist/common/poly-sizing.d.ts +189 -0
- package/dist/common/poly-sizing.d.ts.map +1 -0
- package/dist/common/poly-vertices.d.ts +42 -0
- package/dist/common/poly-vertices.d.ts.map +1 -0
- package/dist/common/postproc.d.ts +49 -0
- package/dist/common/postproc.d.ts.map +1 -0
- package/dist/common/ps-fontalias.d.ts +36 -0
- package/dist/common/ps-fontalias.d.ts.map +1 -0
- package/dist/common/random.d.ts +8 -0
- package/dist/common/random.d.ts.map +1 -0
- package/dist/common/record-port.d.ts +34 -0
- package/dist/common/record-port.d.ts.map +1 -0
- package/dist/common/record.d.ts +105 -0
- package/dist/common/record.d.ts.map +1 -0
- package/dist/common/shapeData.d.ts +186 -0
- package/dist/common/shapeData.d.ts.map +1 -0
- package/dist/common/shapes.d.ts +36 -0
- package/dist/common/shapes.d.ts.map +1 -0
- package/dist/common/spline-midpoint.d.ts +31 -0
- package/dist/common/spline-midpoint.d.ts.map +1 -0
- package/dist/common/splines-clip.d.ts +21 -0
- package/dist/common/splines-clip.d.ts.map +1 -0
- package/dist/common/splines-constants.d.ts +42 -0
- package/dist/common/splines-constants.d.ts.map +1 -0
- package/dist/common/splines-geom.d.ts +51 -0
- package/dist/common/splines-geom.d.ts.map +1 -0
- package/dist/common/splines-path-begin.d.ts +17 -0
- package/dist/common/splines-path-begin.d.ts.map +1 -0
- package/dist/common/splines-path-end.d.ts +17 -0
- package/dist/common/splines-path-end.d.ts.map +1 -0
- package/dist/common/splines-path-shared.d.ts +53 -0
- package/dist/common/splines-path-shared.d.ts.map +1 -0
- package/dist/common/splines-routespl.d.ts +40 -0
- package/dist/common/splines-routespl.d.ts.map +1 -0
- package/dist/common/splines-selfedge.d.ts +21 -0
- package/dist/common/splines-selfedge.d.ts.map +1 -0
- package/dist/common/splines.d.ts +18 -0
- package/dist/common/splines.d.ts.map +1 -0
- package/dist/common/style-resolve.d.ts +197 -0
- package/dist/common/style-resolve.d.ts.map +1 -0
- package/dist/common/subst.d.ts +31 -0
- package/dist/common/subst.d.ts.map +1 -0
- package/dist/common/taper.d.ts +23 -0
- package/dist/common/taper.d.ts.map +1 -0
- package/dist/common/textmeasure-factory.d.ts +33 -0
- package/dist/common/textmeasure-factory.d.ts.map +1 -0
- package/dist/common/textmeasure-lookup.d.ts +17 -0
- package/dist/common/textmeasure-lookup.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-a.d.ts +13 -0
- package/dist/common/textmeasure-lut-data-a.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-b.d.ts +12 -0
- package/dist/common/textmeasure-lut-data-b.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data-c.d.ts +13 -0
- package/dist/common/textmeasure-lut-data-c.d.ts.map +1 -0
- package/dist/common/textmeasure-lut-data.d.ts +27 -0
- package/dist/common/textmeasure-lut-data.d.ts.map +1 -0
- package/dist/common/textmeasure.d.ts +120 -0
- package/dist/common/textmeasure.d.ts.map +1 -0
- package/dist/common/types.d.ts +316 -0
- package/dist/common/types.d.ts.map +1 -0
- package/dist/common/xlabels-place.d.ts +125 -0
- package/dist/common/xlabels-place.d.ts.map +1 -0
- package/dist/debug.d.ts +58 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/errors.d.ts +63 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/gvc/anchor.d.ts +86 -0
- package/dist/gvc/anchor.d.ts.map +1 -0
- package/dist/gvc/context.d.ts +177 -0
- package/dist/gvc/context.d.ts.map +1 -0
- package/dist/gvc/default-context.d.ts +20 -0
- package/dist/gvc/default-context.d.ts.map +1 -0
- package/dist/gvc/device-cluster.d.ts +25 -0
- package/dist/gvc/device-cluster.d.ts.map +1 -0
- package/dist/gvc/device.d.ts +99 -0
- package/dist/gvc/device.d.ts.map +1 -0
- package/dist/gvc/edge-labels.d.ts +10 -0
- package/dist/gvc/edge-labels.d.ts.map +1 -0
- package/dist/gvc/emit-walk.d.ts +22 -0
- package/dist/gvc/emit-walk.d.ts.map +1 -0
- package/dist/gvc/image-resolver.d.ts +44 -0
- package/dist/gvc/image-resolver.d.ts.map +1 -0
- package/dist/gvc/job.d.ts +234 -0
- package/dist/gvc/job.d.ts.map +1 -0
- package/dist/gvc/textlayout.d.ts +33 -0
- package/dist/gvc/textlayout.d.ts.map +1 -0
- package/dist/gvc/textspan-emit.d.ts +41 -0
- package/dist/gvc/textspan-emit.d.ts.map +1 -0
- package/dist/gvc/usershape.d.ts +25 -0
- package/dist/gvc/usershape.d.ts.map +1 -0
- package/dist/gvc/viewport.d.ts +71 -0
- package/dist/gvc/viewport.d.ts.map +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52862 -0
- package/dist/index.js.map +7 -0
- package/dist/label/index.d.ts +74 -0
- package/dist/label/index.d.ts.map +1 -0
- package/dist/label/node.d.ts +108 -0
- package/dist/label/node.d.ts.map +1 -0
- package/dist/label/rectangle.d.ts +60 -0
- package/dist/label/rectangle.d.ts.map +1 -0
- package/dist/label/split-q.d.ts +13 -0
- package/dist/label/split-q.d.ts.map +1 -0
- package/dist/label/xlabels-geom.d.ts +46 -0
- package/dist/label/xlabels-geom.d.ts.map +1 -0
- package/dist/label/xlabels-intersect.d.ts +79 -0
- package/dist/label/xlabels-intersect.d.ts.map +1 -0
- package/dist/label/xlabels.d.ts +67 -0
- package/dist/label/xlabels.d.ts.map +1 -0
- package/dist/layout/circo/blockpath.d.ts +120 -0
- package/dist/layout/circo/blockpath.d.ts.map +1 -0
- package/dist/layout/circo/blocks.d.ts +135 -0
- package/dist/layout/circo/blocks.d.ts.map +1 -0
- package/dist/layout/circo/blocktree.d.ts +51 -0
- package/dist/layout/circo/blocktree.d.ts.map +1 -0
- package/dist/layout/circo/circular.d.ts +59 -0
- package/dist/layout/circo/circular.d.ts.map +1 -0
- package/dist/layout/circo/index.d.ts +35 -0
- package/dist/layout/circo/index.d.ts.map +1 -0
- package/dist/layout/circo/init.d.ts +50 -0
- package/dist/layout/circo/init.d.ts.map +1 -0
- package/dist/layout/circo/position-helpers.d.ts +33 -0
- package/dist/layout/circo/position-helpers.d.ts.map +1 -0
- package/dist/layout/circo/position.d.ts +66 -0
- package/dist/layout/circo/position.d.ts.map +1 -0
- package/dist/layout/dot/acyclic.d.ts +8 -0
- package/dist/layout/dot/acyclic.d.ts.map +1 -0
- package/dist/layout/dot/aspect.d.ts +17 -0
- package/dist/layout/dot/aspect.d.ts.map +1 -0
- package/dist/layout/dot/classify.d.ts +52 -0
- package/dist/layout/dot/classify.d.ts.map +1 -0
- package/dist/layout/dot/cluster-path.d.ts +38 -0
- package/dist/layout/dot/cluster-path.d.ts.map +1 -0
- package/dist/layout/dot/cluster.d.ts +102 -0
- package/dist/layout/dot/cluster.d.ts.map +1 -0
- package/dist/layout/dot/compound-clip.d.ts +69 -0
- package/dist/layout/dot/compound-clip.d.ts.map +1 -0
- package/dist/layout/dot/compound-geom.d.ts +115 -0
- package/dist/layout/dot/compound-geom.d.ts.map +1 -0
- package/dist/layout/dot/compound.d.ts +56 -0
- package/dist/layout/dot/compound.d.ts.map +1 -0
- package/dist/layout/dot/conc.d.ts +88 -0
- package/dist/layout/dot/conc.d.ts.map +1 -0
- package/dist/layout/dot/decomp.d.ts +66 -0
- package/dist/layout/dot/decomp.d.ts.map +1 -0
- package/dist/layout/dot/edge-order.d.ts +27 -0
- package/dist/layout/dot/edge-order.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-arrow.d.ts +46 -0
- package/dist/layout/dot/edge-route-arrow.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-boxes.d.ts +75 -0
- package/dist/layout/dot/edge-route-boxes.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-chain.d.ts +67 -0
- package/dist/layout/dot/edge-route-chain.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-clip.d.ts +88 -0
- package/dist/layout/dot/edge-route-clip.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-faithful.d.ts +94 -0
- package/dist/layout/dot/edge-route-faithful.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-geom.d.ts +43 -0
- package/dist/layout/dot/edge-route-geom.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-helpers.d.ts +50 -0
- package/dist/layout/dot/edge-route-helpers.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-poly.d.ts +48 -0
- package/dist/layout/dot/edge-route-poly.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-rank.d.ts +57 -0
- package/dist/layout/dot/edge-route-rank.d.ts.map +1 -0
- package/dist/layout/dot/edge-route-routing.d.ts +99 -0
- package/dist/layout/dot/edge-route-routing.d.ts.map +1 -0
- package/dist/layout/dot/edge-route.d.ts +57 -0
- package/dist/layout/dot/edge-route.d.ts.map +1 -0
- package/dist/layout/dot/fastgr.d.ts +147 -0
- package/dist/layout/dot/fastgr.d.ts.map +1 -0
- package/dist/layout/dot/flat-utils.d.ts +21 -0
- package/dist/layout/dot/flat-utils.d.ts.map +1 -0
- package/dist/layout/dot/flat.d.ts +152 -0
- package/dist/layout/dot/flat.d.ts.map +1 -0
- package/dist/layout/dot/graph-label.d.ts +18 -0
- package/dist/layout/dot/graph-label.d.ts.map +1 -0
- package/dist/layout/dot/index.d.ts +128 -0
- package/dist/layout/dot/index.d.ts.map +1 -0
- package/dist/layout/dot/init.d.ts +93 -0
- package/dist/layout/dot/init.d.ts.map +1 -0
- package/dist/layout/dot/label-order.d.ts +45 -0
- package/dist/layout/dot/label-order.d.ts.map +1 -0
- package/dist/layout/dot/mincross-build.d.ts +52 -0
- package/dist/layout/dot/mincross-build.d.ts.map +1 -0
- package/dist/layout/dot/mincross-cross.d.ts +80 -0
- package/dist/layout/dot/mincross-cross.d.ts.map +1 -0
- package/dist/layout/dot/mincross-flat.d.ts +27 -0
- package/dist/layout/dot/mincross-flat.d.ts.map +1 -0
- package/dist/layout/dot/mincross-order.d.ts +89 -0
- package/dist/layout/dot/mincross-order.d.ts.map +1 -0
- package/dist/layout/dot/mincross-utils.d.ts +60 -0
- package/dist/layout/dot/mincross-utils.d.ts.map +1 -0
- package/dist/layout/dot/mincross.d.ts +75 -0
- package/dist/layout/dot/mincross.d.ts.map +1 -0
- package/dist/layout/dot/ns-core.d.ts +37 -0
- package/dist/layout/dot/ns-core.d.ts.map +1 -0
- package/dist/layout/dot/ns-range.d.ts +17 -0
- package/dist/layout/dot/ns-range.d.ts.map +1 -0
- package/dist/layout/dot/ns-subtree.d.ts +78 -0
- package/dist/layout/dot/ns-subtree.d.ts.map +1 -0
- package/dist/layout/dot/ns.d.ts +86 -0
- package/dist/layout/dot/ns.d.ts.map +1 -0
- package/dist/layout/dot/ortho-adapter.d.ts +19 -0
- package/dist/layout/dot/ortho-adapter.d.ts.map +1 -0
- package/dist/layout/dot/pack-components.d.ts +100 -0
- package/dist/layout/dot/pack-components.d.ts.map +1 -0
- package/dist/layout/dot/position-aux.d.ts +110 -0
- package/dist/layout/dot/position-aux.d.ts.map +1 -0
- package/dist/layout/dot/position-bbox.d.ts +57 -0
- package/dist/layout/dot/position-bbox.d.ts.map +1 -0
- package/dist/layout/dot/position-cluster.d.ts +48 -0
- package/dist/layout/dot/position-cluster.d.ts.map +1 -0
- package/dist/layout/dot/position-ycoords.d.ts +42 -0
- package/dist/layout/dot/position-ycoords.d.ts.map +1 -0
- package/dist/layout/dot/position.d.ts +47 -0
- package/dist/layout/dot/position.d.ts.map +1 -0
- package/dist/layout/dot/rank-dot2.d.ts +114 -0
- package/dist/layout/dot/rank-dot2.d.ts.map +1 -0
- package/dist/layout/dot/rank.d.ts +119 -0
- package/dist/layout/dot/rank.d.ts.map +1 -0
- package/dist/layout/dot/sameport.d.ts +70 -0
- package/dist/layout/dot/sameport.d.ts.map +1 -0
- package/dist/layout/dot/self-loop.d.ts +54 -0
- package/dist/layout/dot/self-loop.d.ts.map +1 -0
- package/dist/layout/dot/splines-clone.d.ts +33 -0
- package/dist/layout/dot/splines-clone.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat-labeled.d.ts +101 -0
- package/dist/layout/dot/splines-flat-labeled.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat-multi.d.ts +35 -0
- package/dist/layout/dot/splines-flat-multi.d.ts.map +1 -0
- package/dist/layout/dot/splines-flat.d.ts +116 -0
- package/dist/layout/dot/splines-flat.d.ts.map +1 -0
- package/dist/layout/dot/splines-groups.d.ts +38 -0
- package/dist/layout/dot/splines-groups.d.ts.map +1 -0
- package/dist/layout/dot/splines-label.d.ts +105 -0
- package/dist/layout/dot/splines-label.d.ts.map +1 -0
- package/dist/layout/dot/splines-route-type.d.ts +28 -0
- package/dist/layout/dot/splines-route-type.d.ts.map +1 -0
- package/dist/layout/dot/splines-route.d.ts +99 -0
- package/dist/layout/dot/splines-route.d.ts.map +1 -0
- package/dist/layout/dot/splines.d.ts +157 -0
- package/dist/layout/dot/splines.d.ts.map +1 -0
- package/dist/layout/dot/straight-edges.d.ts +39 -0
- package/dist/layout/dot/straight-edges.d.ts.map +1 -0
- package/dist/layout/fdp/cluster-edges.d.ts +31 -0
- package/dist/layout/fdp/cluster-edges.d.ts.map +1 -0
- package/dist/layout/fdp/comp.d.ts +29 -0
- package/dist/layout/fdp/comp.d.ts.map +1 -0
- package/dist/layout/fdp/derive.d.ts +39 -0
- package/dist/layout/fdp/derive.d.ts.map +1 -0
- package/dist/layout/fdp/fdp-model.d.ts +101 -0
- package/dist/layout/fdp/fdp-model.d.ts.map +1 -0
- package/dist/layout/fdp/grid.d.ts +49 -0
- package/dist/layout/fdp/grid.d.ts.map +1 -0
- package/dist/layout/fdp/index.d.ts +36 -0
- package/dist/layout/fdp/index.d.ts.map +1 -0
- package/dist/layout/fdp/init.d.ts +26 -0
- package/dist/layout/fdp/init.d.ts.map +1 -0
- package/dist/layout/fdp/layout.d.ts +57 -0
- package/dist/layout/fdp/layout.d.ts.map +1 -0
- package/dist/layout/fdp/normalize.d.ts +18 -0
- package/dist/layout/fdp/normalize.d.ts.map +1 -0
- package/dist/layout/fdp/ports.d.ts +41 -0
- package/dist/layout/fdp/ports.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout-init.d.ts +21 -0
- package/dist/layout/fdp/tlayout-init.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout-parms.d.ts +98 -0
- package/dist/layout/fdp/tlayout-parms.d.ts.map +1 -0
- package/dist/layout/fdp/tlayout.d.ts +43 -0
- package/dist/layout/fdp/tlayout.d.ts.map +1 -0
- package/dist/layout/fdp/xlayout.d.ts +26 -0
- package/dist/layout/fdp/xlayout.d.ts.map +1 -0
- package/dist/layout/neato/bfs.d.ts +43 -0
- package/dist/layout/neato/bfs.d.ts.map +1 -0
- package/dist/layout/neato/cdt-surface.d.ts +16 -0
- package/dist/layout/neato/cdt-surface.d.ts.map +1 -0
- package/dist/layout/neato/conjgrad.d.ts +61 -0
- package/dist/layout/neato/conjgrad.d.ts.map +1 -0
- package/dist/layout/neato/delaunay.d.ts +28 -0
- package/dist/layout/neato/delaunay.d.ts.map +1 -0
- package/dist/layout/neato/dijkstra.d.ts +80 -0
- package/dist/layout/neato/dijkstra.d.ts.map +1 -0
- package/dist/layout/neato/fdp-adjust.d.ts +31 -0
- package/dist/layout/neato/fdp-adjust.d.ts.map +1 -0
- package/dist/layout/neato/index.d.ts +58 -0
- package/dist/layout/neato/index.d.ts.map +1 -0
- package/dist/layout/neato/init.d.ts +207 -0
- package/dist/layout/neato/init.d.ts.map +1 -0
- package/dist/layout/neato/legal.d.ts +7 -0
- package/dist/layout/neato/legal.d.ts.map +1 -0
- package/dist/layout/neato/matrix-ops.d.ts +28 -0
- package/dist/layout/neato/matrix-ops.d.ts.map +1 -0
- package/dist/layout/neato/multispline-router.d.ts +80 -0
- package/dist/layout/neato/multispline-router.d.ts.map +1 -0
- package/dist/layout/neato/multispline.d.ts +24 -0
- package/dist/layout/neato/multispline.d.ts.map +1 -0
- package/dist/layout/neato/overlap-prism.d.ts +26 -0
- package/dist/layout/neato/overlap-prism.d.ts.map +1 -0
- package/dist/layout/neato/overlap.d.ts +85 -0
- package/dist/layout/neato/overlap.d.ts.map +1 -0
- package/dist/layout/neato/sc-adjust.d.ts +33 -0
- package/dist/layout/neato/sc-adjust.d.ts.map +1 -0
- package/dist/layout/neato/sep-factor.d.ts +41 -0
- package/dist/layout/neato/sep-factor.d.ts.map +1 -0
- package/dist/layout/neato/set-aspect.d.ts +33 -0
- package/dist/layout/neato/set-aspect.d.ts.map +1 -0
- package/dist/layout/neato/sgd.d.ts +166 -0
- package/dist/layout/neato/sgd.d.ts.map +1 -0
- package/dist/layout/neato/splines.d.ts +153 -0
- package/dist/layout/neato/splines.d.ts.map +1 -0
- package/dist/layout/neato/stress-kernel.d.ts +53 -0
- package/dist/layout/neato/stress-kernel.d.ts.map +1 -0
- package/dist/layout/neato/stress.d.ts +158 -0
- package/dist/layout/neato/stress.d.ts.map +1 -0
- package/dist/layout/osage/index.d.ts +158 -0
- package/dist/layout/osage/index.d.ts.map +1 -0
- package/dist/layout/osage/layout.d.ts +49 -0
- package/dist/layout/osage/layout.d.ts.map +1 -0
- package/dist/layout/osage/types.d.ts +28 -0
- package/dist/layout/osage/types.d.ts.map +1 -0
- package/dist/layout/pack/array-pack.d.ts +114 -0
- package/dist/layout/pack/array-pack.d.ts.map +1 -0
- package/dist/layout/pack/index.d.ts +157 -0
- package/dist/layout/pack/index.d.ts.map +1 -0
- package/dist/layout/pack/poly-pack.d.ts +126 -0
- package/dist/layout/pack/poly-pack.d.ts.map +1 -0
- package/dist/layout/pack/poly-place.d.ts +27 -0
- package/dist/layout/pack/poly-place.d.ts.map +1 -0
- package/dist/layout/pack/spiral-search.d.ts +18 -0
- package/dist/layout/pack/spiral-search.d.ts.map +1 -0
- package/dist/layout/pack/test-helpers.d.ts +7 -0
- package/dist/layout/pack/test-helpers.d.ts.map +1 -0
- package/dist/layout/pack/types.d.ts +74 -0
- package/dist/layout/pack/types.d.ts.map +1 -0
- package/dist/layout/patchwork/index.d.ts +136 -0
- package/dist/layout/patchwork/index.d.ts.map +1 -0
- package/dist/layout/patchwork/tree-map.d.ts +32 -0
- package/dist/layout/patchwork/tree-map.d.ts.map +1 -0
- package/dist/layout/patchwork/tree-node.d.ts +46 -0
- package/dist/layout/patchwork/tree-node.d.ts.map +1 -0
- package/dist/layout/sfdp/index.d.ts +39 -0
- package/dist/layout/sfdp/index.d.ts.map +1 -0
- package/dist/layout/sfdp/init.d.ts +61 -0
- package/dist/layout/sfdp/init.d.ts.map +1 -0
- package/dist/layout/sfdp/multilevel.d.ts +23 -0
- package/dist/layout/sfdp/multilevel.d.ts.map +1 -0
- package/dist/layout/sfdp/quadtree.d.ts +45 -0
- package/dist/layout/sfdp/quadtree.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-matrix-multiply.d.ts +34 -0
- package/dist/layout/sfdp/sparse-matrix-multiply.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-matrix.d.ts +101 -0
- package/dist/layout/sfdp/sparse-matrix.d.ts.map +1 -0
- package/dist/layout/sfdp/sparse-solve.d.ts +14 -0
- package/dist/layout/sfdp/sparse-solve.d.ts.map +1 -0
- package/dist/layout/sfdp/spring-driver.d.ts +18 -0
- package/dist/layout/sfdp/spring-driver.d.ts.map +1 -0
- package/dist/layout/sfdp/spring-electrical.d.ts +61 -0
- package/dist/layout/sfdp/spring-electrical.d.ts.map +1 -0
- package/dist/layout/twopi/circle.d.ts +83 -0
- package/dist/layout/twopi/circle.d.ts.map +1 -0
- package/dist/layout/twopi/index.d.ts +24 -0
- package/dist/layout/twopi/index.d.ts.map +1 -0
- package/dist/layout/twopi/init.d.ts +85 -0
- package/dist/layout/twopi/init.d.ts.map +1 -0
- package/dist/layout/twopi/pipeline.d.ts +37 -0
- package/dist/layout/twopi/pipeline.d.ts.map +1 -0
- package/dist/layout/twopi/twopi-test-helpers.d.ts +12 -0
- package/dist/layout/twopi/twopi-test-helpers.d.ts.map +1 -0
- package/dist/model/algData.d.ts +175 -0
- package/dist/model/algData.d.ts.map +1 -0
- package/dist/model/cgraph-ops.d.ts +86 -0
- package/dist/model/cgraph-ops.d.ts.map +1 -0
- package/dist/model/edge.d.ts +80 -0
- package/dist/model/edge.d.ts.map +1 -0
- package/dist/model/edgeInfo.d.ts +299 -0
- package/dist/model/edgeInfo.d.ts.map +1 -0
- package/dist/model/geom.d.ts +149 -0
- package/dist/model/geom.d.ts.map +1 -0
- package/dist/model/graph.d.ts +135 -0
- package/dist/model/graph.d.ts.map +1 -0
- package/dist/model/graphInfo.d.ts +418 -0
- package/dist/model/graphInfo.d.ts.map +1 -0
- package/dist/model/index.d.ts +10 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/layoutParams.d.ts +85 -0
- package/dist/model/layoutParams.d.ts.map +1 -0
- package/dist/model/node.d.ts +101 -0
- package/dist/model/node.d.ts.map +1 -0
- package/dist/model/nodeInfo.d.ts +278 -0
- package/dist/model/nodeInfo.d.ts.map +1 -0
- package/dist/model/rankEntry.d.ts +80 -0
- package/dist/model/rankEntry.d.ts.map +1 -0
- package/dist/ortho/chan-dict.d.ts +82 -0
- package/dist/ortho/chan-dict.d.ts.map +1 -0
- package/dist/ortho/fpq.d.ts +54 -0
- package/dist/ortho/fpq.d.ts.map +1 -0
- package/dist/ortho/index.d.ts +35 -0
- package/dist/ortho/index.d.ts.map +1 -0
- package/dist/ortho/maze-channels.d.ts +47 -0
- package/dist/ortho/maze-channels.d.ts.map +1 -0
- package/dist/ortho/maze.d.ts +27 -0
- package/dist/ortho/maze.d.ts.map +1 -0
- package/dist/ortho/ortho-parallel.d.ts +26 -0
- package/dist/ortho/ortho-parallel.d.ts.map +1 -0
- package/dist/ortho/ortho-route.d.ts +31 -0
- package/dist/ortho/ortho-route.d.ts.map +1 -0
- package/dist/ortho/partition.d.ts +34 -0
- package/dist/ortho/partition.d.ts.map +1 -0
- package/dist/ortho/rawgraph.d.ts +41 -0
- package/dist/ortho/rawgraph.d.ts.map +1 -0
- package/dist/ortho/sgraph.d.ts +74 -0
- package/dist/ortho/sgraph.d.ts.map +1 -0
- package/dist/ortho/trap-query.d.ts +32 -0
- package/dist/ortho/trap-query.d.ts.map +1 -0
- package/dist/ortho/trap-segment.d.ts +23 -0
- package/dist/ortho/trap-segment.d.ts.map +1 -0
- package/dist/ortho/trap-types.d.ts +91 -0
- package/dist/ortho/trap-types.d.ts.map +1 -0
- package/dist/ortho/trap-update.d.ts +12 -0
- package/dist/ortho/trap-update.d.ts.map +1 -0
- package/dist/ortho/trapezoid.d.ts +18 -0
- package/dist/ortho/trapezoid.d.ts.map +1 -0
- package/dist/ortho/types.d.ts +241 -0
- package/dist/ortho/types.d.ts.map +1 -0
- package/dist/parser/ast.d.ts +49 -0
- package/dist/parser/ast.d.ts.map +1 -0
- package/dist/parser/builder.d.ts +75 -0
- package/dist/parser/builder.d.ts.map +1 -0
- package/dist/parser/index.d.ts +97 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/pathplan/index.d.ts +8 -0
- package/dist/pathplan/index.d.ts.map +1 -0
- package/dist/pathplan/route.d.ts +9 -0
- package/dist/pathplan/route.d.ts.map +1 -0
- package/dist/pathplan/shortest.d.ts +5 -0
- package/dist/pathplan/shortest.d.ts.map +1 -0
- package/dist/pathplan/solvers.d.ts +5 -0
- package/dist/pathplan/solvers.d.ts.map +1 -0
- package/dist/pathplan/triang.d.ts +25 -0
- package/dist/pathplan/triang.d.ts.map +1 -0
- package/dist/pathplan/types.d.ts +22 -0
- package/dist/pathplan/types.d.ts.map +1 -0
- package/dist/pathplan/visibility.d.ts +13 -0
- package/dist/pathplan/visibility.d.ts.map +1 -0
- package/dist/pathplan/vispath.d.ts +9 -0
- package/dist/pathplan/vispath.d.ts.map +1 -0
- package/dist/rbtree/index.d.ts +127 -0
- package/dist/rbtree/index.d.ts.map +1 -0
- package/dist/render/color-resolve.d.ts +38 -0
- package/dist/render/color-resolve.d.ts.map +1 -0
- package/dist/render/dot.d.ts +379 -0
- package/dist/render/dot.d.ts.map +1 -0
- package/dist/render/index.d.ts +24 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/json.d.ts +89 -0
- package/dist/render/json.d.ts.map +1 -0
- package/dist/render/map-test-helpers.d.ts +13 -0
- package/dist/render/map-test-helpers.d.ts.map +1 -0
- package/dist/render/map.d.ts +197 -0
- package/dist/render/map.d.ts.map +1 -0
- package/dist/render/public.d.ts +64 -0
- package/dist/render/public.d.ts.map +1 -0
- package/dist/render/svg-arrow-ops.d.ts +10 -0
- package/dist/render/svg-arrow-ops.d.ts.map +1 -0
- package/dist/render/svg-cluster.d.ts +9 -0
- package/dist/render/svg-cluster.d.ts.map +1 -0
- package/dist/render/svg-edge-ortho-radius.d.ts +31 -0
- package/dist/render/svg-edge-ortho-radius.d.ts.map +1 -0
- package/dist/render/svg-edge-split.d.ts +48 -0
- package/dist/render/svg-edge-split.d.ts.map +1 -0
- package/dist/render/svg-gradient.d.ts +46 -0
- package/dist/render/svg-gradient.d.ts.map +1 -0
- package/dist/render/svg-graph.d.ts +97 -0
- package/dist/render/svg-graph.d.ts.map +1 -0
- package/dist/render/svg-helpers.d.ts +122 -0
- package/dist/render/svg-helpers.d.ts.map +1 -0
- package/dist/render/svg-id.d.ts +28 -0
- package/dist/render/svg-id.d.ts.map +1 -0
- package/dist/render/svg-multicolor.d.ts +60 -0
- package/dist/render/svg-multicolor.d.ts.map +1 -0
- package/dist/render/svg-parallel-edge.d.ts +28 -0
- package/dist/render/svg-parallel-edge.d.ts.map +1 -0
- package/dist/render/svg-tapered-edge.d.ts +18 -0
- package/dist/render/svg-tapered-edge.d.ts.map +1 -0
- package/dist/render/svg.d.ts +104 -0
- package/dist/render/svg.d.ts.map +1 -0
- package/dist/render/xdot-public.d.ts +95 -0
- package/dist/render/xdot-public.d.ts.map +1 -0
- package/dist/render/xml-escape.d.ts +21 -0
- package/dist/render/xml-escape.d.ts.map +1 -0
- package/dist/render.js +52556 -0
- package/dist/render.js.map +7 -0
- package/dist/util/agxbuf.d.ts +72 -0
- package/dist/util/agxbuf.d.ts.map +1 -0
- package/dist/util/bsd-qsort.d.ts +22 -0
- package/dist/util/bsd-qsort.d.ts.map +1 -0
- package/dist/util/index.d.ts +11 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/list.d.ts +47 -0
- package/dist/util/list.d.ts.map +1 -0
- package/dist/util/math.d.ts +54 -0
- package/dist/util/math.d.ts.map +1 -0
- package/dist/util/mt19937.d.ts +40 -0
- package/dist/util/mt19937.d.ts.map +1 -0
- package/dist/util/printf-round.d.ts +45 -0
- package/dist/util/printf-round.d.ts.map +1 -0
- package/dist/util/xml.d.ts +24 -0
- package/dist/util/xml.d.ts.map +1 -0
- package/dist/vpsc/Block.d.ts +116 -0
- package/dist/vpsc/Block.d.ts.map +1 -0
- package/dist/vpsc/Blocks.d.ts +66 -0
- package/dist/vpsc/Blocks.d.ts.map +1 -0
- package/dist/vpsc/Constraint.d.ts +51 -0
- package/dist/vpsc/Constraint.d.ts.map +1 -0
- package/dist/vpsc/HeapUtils.d.ts +37 -0
- package/dist/vpsc/HeapUtils.d.ts.map +1 -0
- package/dist/vpsc/Solver.d.ts +107 -0
- package/dist/vpsc/Solver.d.ts.map +1 -0
- package/dist/vpsc/SweepLine.d.ts +38 -0
- package/dist/vpsc/SweepLine.d.ts.map +1 -0
- package/dist/vpsc/Variable.d.ts +38 -0
- package/dist/vpsc/Variable.d.ts.map +1 -0
- package/dist/vpsc/index.d.ts +54 -0
- package/dist/vpsc/index.d.ts.map +1 -0
- package/dist/vpsc/sweepTypes.d.ts +29 -0
- package/dist/vpsc/sweepTypes.d.ts.map +1 -0
- package/dist/xdot/index.d.ts +6 -0
- package/dist/xdot/index.d.ts.map +1 -0
- package/dist/xdot/lex.d.ts +22 -0
- package/dist/xdot/lex.d.ts.map +1 -0
- package/dist/xdot/misc.d.ts +13 -0
- package/dist/xdot/misc.d.ts.map +1 -0
- package/dist/xdot/parse.d.ts +21 -0
- package/dist/xdot/parse.d.ts.map +1 -0
- package/dist/xdot/types.d.ts +152 -0
- package/dist/xdot/types.d.ts.map +1 -0
- package/package.json +113 -0
- package/src/api/builder.ts +277 -0
- package/src/api/edge-ops.ts +113 -0
- package/src/api/geometry.ts +307 -0
- package/src/api/index.ts +46 -0
- package/src/cdt/bag.ts +196 -0
- package/src/cdt/hash-core.ts +84 -0
- package/src/cdt/hash.ts +207 -0
- package/src/cdt/index.ts +17 -0
- package/src/cdt/splay-core.ts +301 -0
- package/src/cdt/splay.ts +191 -0
- package/src/cdt/strhash.ts +52 -0
- package/src/cdt/types.ts +13 -0
- package/src/common/arith.ts +39 -0
- package/src/common/arm-pow-data.ts +201 -0
- package/src/common/arm-pow.ts +296 -0
- package/src/common/arrows-constants.ts +175 -0
- package/src/common/arrows-geometry.ts +62 -0
- package/src/common/arrows-miter.ts +84 -0
- package/src/common/arrows-shapes-poly.ts +241 -0
- package/src/common/arrows-shapes-util.ts +162 -0
- package/src/common/arrows-shapes.ts +360 -0
- package/src/common/arrows-types.ts +59 -0
- package/src/common/arrows.ts +209 -0
- package/src/common/color.ts +340 -0
- package/src/common/colorData.ts +264 -0
- package/src/common/compass-port.ts +384 -0
- package/src/common/crand.ts +79 -0
- package/src/common/edge-label-init.ts +310 -0
- package/src/common/edge-offset.ts +140 -0
- package/src/common/ellipse-wedge.ts +189 -0
- package/src/common/emit-types.ts +332 -0
- package/src/common/fma.ts +52 -0
- package/src/common/graph-init.ts +359 -0
- package/src/common/html-entities.ts +299 -0
- package/src/common/html-string.ts +22 -0
- package/src/common/htmltable-emit-fill.ts +367 -0
- package/src/common/htmltable-emit-rules.ts +293 -0
- package/src/common/htmltable-emit.ts +345 -0
- package/src/common/htmltable-lex.ts +138 -0
- package/src/common/htmltable-parse.ts +539 -0
- package/src/common/htmltable-port.ts +32 -0
- package/src/common/htmltable-pos-runs.ts +313 -0
- package/src/common/htmltable-pos.ts +601 -0
- package/src/common/htmltable-types.ts +262 -0
- package/src/common/htmltable.ts +477 -0
- package/src/common/layers.ts +113 -0
- package/src/common/make-label.ts +192 -0
- package/src/common/multicolor.ts +167 -0
- package/src/common/nodeinit.ts +339 -0
- package/src/common/poly-gencode.ts +475 -0
- package/src/common/poly-init.ts +133 -0
- package/src/common/poly-inside.ts +202 -0
- package/src/common/poly-shapes-cases.ts +253 -0
- package/src/common/poly-shapes-cases2.ts +170 -0
- package/src/common/poly-shapes-util.ts +124 -0
- package/src/common/poly-shapes.ts +181 -0
- package/src/common/poly-sizing.ts +639 -0
- package/src/common/poly-vertices.ts +237 -0
- package/src/common/postproc.ts +436 -0
- package/src/common/ps-fontalias.ts +112 -0
- package/src/common/random.ts +37 -0
- package/src/common/record-port.ts +89 -0
- package/src/common/record.ts +523 -0
- package/src/common/shapeData.ts +502 -0
- package/src/common/shapes.ts +187 -0
- package/src/common/spline-midpoint.ts +105 -0
- package/src/common/splines-clip.ts +449 -0
- package/src/common/splines-constants.ts +53 -0
- package/src/common/splines-geom.ts +194 -0
- package/src/common/splines-path-begin.ts +243 -0
- package/src/common/splines-path-end.ts +231 -0
- package/src/common/splines-path-shared.ts +258 -0
- package/src/common/splines-routespl.ts +444 -0
- package/src/common/splines-selfedge.ts +403 -0
- package/src/common/splines.ts +33 -0
- package/src/common/style-resolve.ts +481 -0
- package/src/common/subst.ts +126 -0
- package/src/common/taper.ts +219 -0
- package/src/common/textmeasure-factory.ts +86 -0
- package/src/common/textmeasure-lookup.ts +50 -0
- package/src/common/textmeasure-lut-data-a.ts +182 -0
- package/src/common/textmeasure-lut-data-b.ts +140 -0
- package/src/common/textmeasure-lut-data-c.ts +221 -0
- package/src/common/textmeasure-lut-data.ts +78 -0
- package/src/common/textmeasure.ts +321 -0
- package/src/common/types.ts +425 -0
- package/src/common/xlabels-place.ts +475 -0
- package/src/debug.ts +38 -0
- package/src/errors.ts +95 -0
- package/src/gvc/anchor.ts +530 -0
- package/src/gvc/context.ts +260 -0
- package/src/gvc/default-context.ts +70 -0
- package/src/gvc/device-cluster.ts +114 -0
- package/src/gvc/device.ts +598 -0
- package/src/gvc/edge-labels.ts +116 -0
- package/src/gvc/emit-walk.ts +98 -0
- package/src/gvc/image-resolver.ts +137 -0
- package/src/gvc/job.ts +401 -0
- package/src/gvc/textlayout.ts +44 -0
- package/src/gvc/textspan-emit.ts +100 -0
- package/src/gvc/usershape.ts +33 -0
- package/src/gvc/viewport.ts +203 -0
- package/src/index.ts +165 -0
- package/src/label/index.ts +302 -0
- package/src/label/node.ts +278 -0
- package/src/label/rectangle.ts +123 -0
- package/src/label/split-q.ts +237 -0
- package/src/label/xlabels-geom.ts +132 -0
- package/src/label/xlabels-intersect.ts +421 -0
- package/src/label/xlabels.ts +212 -0
- package/src/layout/circo/blockpath.ts +560 -0
- package/src/layout/circo/blocks.ts +234 -0
- package/src/layout/circo/blocktree.ts +246 -0
- package/src/layout/circo/circular.ts +227 -0
- package/src/layout/circo/index.ts +90 -0
- package/src/layout/circo/init.ts +84 -0
- package/src/layout/circo/position-helpers.ts +104 -0
- package/src/layout/circo/position.ts +196 -0
- package/src/layout/dot/__fixtures__/xcoord-pivot-divergence.gv +79 -0
- package/src/layout/dot/acyclic.ts +60 -0
- package/src/layout/dot/aspect.ts +22 -0
- package/src/layout/dot/classify.ts +462 -0
- package/src/layout/dot/cluster-path.ts +200 -0
- package/src/layout/dot/cluster.ts +480 -0
- package/src/layout/dot/compound-clip.ts +224 -0
- package/src/layout/dot/compound-geom.ts +282 -0
- package/src/layout/dot/compound.ts +294 -0
- package/src/layout/dot/conc.ts +433 -0
- package/src/layout/dot/decomp.ts +165 -0
- package/src/layout/dot/edge-order.ts +62 -0
- package/src/layout/dot/edge-route-arrow.ts +87 -0
- package/src/layout/dot/edge-route-boxes.ts +99 -0
- package/src/layout/dot/edge-route-chain.ts +420 -0
- package/src/layout/dot/edge-route-clip.ts +253 -0
- package/src/layout/dot/edge-route-faithful.ts +404 -0
- package/src/layout/dot/edge-route-geom.ts +90 -0
- package/src/layout/dot/edge-route-helpers.ts +170 -0
- package/src/layout/dot/edge-route-poly.ts +174 -0
- package/src/layout/dot/edge-route-rank.ts +136 -0
- package/src/layout/dot/edge-route-routing.ts +219 -0
- package/src/layout/dot/edge-route.ts +490 -0
- package/src/layout/dot/fastgr.ts +377 -0
- package/src/layout/dot/flat-utils.ts +52 -0
- package/src/layout/dot/flat.ts +518 -0
- package/src/layout/dot/graph-label.ts +114 -0
- package/src/layout/dot/index.ts +302 -0
- package/src/layout/dot/init.ts +300 -0
- package/src/layout/dot/label-order.ts +161 -0
- package/src/layout/dot/mincross-build.ts +373 -0
- package/src/layout/dot/mincross-cross.ts +409 -0
- package/src/layout/dot/mincross-flat.ts +213 -0
- package/src/layout/dot/mincross-order.ts +401 -0
- package/src/layout/dot/mincross-utils.ts +170 -0
- package/src/layout/dot/mincross.ts +386 -0
- package/src/layout/dot/ns-core.ts +122 -0
- package/src/layout/dot/ns-range.ts +228 -0
- package/src/layout/dot/ns-subtree.ts +347 -0
- package/src/layout/dot/ns.ts +506 -0
- package/src/layout/dot/ortho-adapter.ts +133 -0
- package/src/layout/dot/pack-components.ts +433 -0
- package/src/layout/dot/position-aux.ts +382 -0
- package/src/layout/dot/position-bbox.ts +221 -0
- package/src/layout/dot/position-cluster.ts +286 -0
- package/src/layout/dot/position-ycoords.ts +287 -0
- package/src/layout/dot/position.ts +194 -0
- package/src/layout/dot/rank-dot2.ts +528 -0
- package/src/layout/dot/rank.ts +547 -0
- package/src/layout/dot/sameport.ts +278 -0
- package/src/layout/dot/self-loop.ts +147 -0
- package/src/layout/dot/splines-clone.ts +121 -0
- package/src/layout/dot/splines-flat-labeled.ts +408 -0
- package/src/layout/dot/splines-flat-multi.ts +188 -0
- package/src/layout/dot/splines-flat.ts +598 -0
- package/src/layout/dot/splines-groups.ts +190 -0
- package/src/layout/dot/splines-label.ts +432 -0
- package/src/layout/dot/splines-route-type.ts +44 -0
- package/src/layout/dot/splines-route.ts +478 -0
- package/src/layout/dot/splines.ts +538 -0
- package/src/layout/dot/straight-edges.ts +332 -0
- package/src/layout/fdp/cluster-edges.ts +0 -0
- package/src/layout/fdp/comp.ts +160 -0
- package/src/layout/fdp/derive.ts +272 -0
- package/src/layout/fdp/fdp-model.ts +238 -0
- package/src/layout/fdp/grid.ts +77 -0
- package/src/layout/fdp/index.ts +113 -0
- package/src/layout/fdp/init.ts +116 -0
- package/src/layout/fdp/layout.ts +485 -0
- package/src/layout/fdp/normalize.ts +100 -0
- package/src/layout/fdp/ports.ts +161 -0
- package/src/layout/fdp/tlayout-init.ts +230 -0
- package/src/layout/fdp/tlayout-parms.ts +234 -0
- package/src/layout/fdp/tlayout.ts +317 -0
- package/src/layout/fdp/xlayout.ts +350 -0
- package/src/layout/neato/bfs.ts +131 -0
- package/src/layout/neato/cdt-surface.ts +693 -0
- package/src/layout/neato/conjgrad.ts +159 -0
- package/src/layout/neato/delaunay.ts +259 -0
- package/src/layout/neato/dijkstra.ts +296 -0
- package/src/layout/neato/fdp-adjust.ts +124 -0
- package/src/layout/neato/index.ts +310 -0
- package/src/layout/neato/init.ts +505 -0
- package/src/layout/neato/legal.ts +316 -0
- package/src/layout/neato/matrix-ops.ts +112 -0
- package/src/layout/neato/multispline-router.ts +417 -0
- package/src/layout/neato/multispline.ts +427 -0
- package/src/layout/neato/overlap-prism.ts +503 -0
- package/src/layout/neato/overlap.ts +158 -0
- package/src/layout/neato/sc-adjust.ts +206 -0
- package/src/layout/neato/sep-factor.ts +118 -0
- package/src/layout/neato/set-aspect.ts +178 -0
- package/src/layout/neato/sgd.ts +461 -0
- package/src/layout/neato/splines.ts +1014 -0
- package/src/layout/neato/stress-kernel.ts +362 -0
- package/src/layout/neato/stress.ts +420 -0
- package/src/layout/osage/index.ts +548 -0
- package/src/layout/osage/layout.ts +254 -0
- package/src/layout/osage/types.ts +31 -0
- package/src/layout/pack/array-pack.ts +254 -0
- package/src/layout/pack/index.ts +570 -0
- package/src/layout/pack/poly-pack.ts +266 -0
- package/src/layout/pack/poly-place.ts +426 -0
- package/src/layout/pack/spiral-search.ts +106 -0
- package/src/layout/pack/test-helpers.ts +46 -0
- package/src/layout/pack/types.ts +85 -0
- package/src/layout/patchwork/index.ts +441 -0
- package/src/layout/patchwork/tree-map.ts +183 -0
- package/src/layout/patchwork/tree-node.ts +120 -0
- package/src/layout/sfdp/index.ts +231 -0
- package/src/layout/sfdp/init.ts +224 -0
- package/src/layout/sfdp/multilevel.ts +262 -0
- package/src/layout/sfdp/quadtree.ts +267 -0
- package/src/layout/sfdp/sparse-matrix-multiply.ts +160 -0
- package/src/layout/sfdp/sparse-matrix.ts +367 -0
- package/src/layout/sfdp/sparse-solve.ts +122 -0
- package/src/layout/sfdp/spring-driver.ts +209 -0
- package/src/layout/sfdp/spring-electrical.ts +431 -0
- package/src/layout/twopi/circle.ts +339 -0
- package/src/layout/twopi/index.ts +78 -0
- package/src/layout/twopi/init.ts +174 -0
- package/src/layout/twopi/pipeline.ts +98 -0
- package/src/layout/twopi/twopi-test-helpers.ts +44 -0
- package/src/model/algData.ts +194 -0
- package/src/model/cgraph-ops.ts +175 -0
- package/src/model/edge.ts +104 -0
- package/src/model/edgeInfo.ts +431 -0
- package/src/model/geom.ts +204 -0
- package/src/model/graph.ts +172 -0
- package/src/model/graphInfo.ts +528 -0
- package/src/model/index.ts +10 -0
- package/src/model/layoutParams.ts +127 -0
- package/src/model/node.ts +138 -0
- package/src/model/nodeInfo.ts +424 -0
- package/src/model/rankEntry.ts +95 -0
- package/src/ortho/chan-dict.ts +236 -0
- package/src/ortho/fpq.ts +149 -0
- package/src/ortho/index.ts +206 -0
- package/src/ortho/maze-channels.ts +196 -0
- package/src/ortho/maze.ts +311 -0
- package/src/ortho/ortho-parallel.ts +254 -0
- package/src/ortho/ortho-route.ts +349 -0
- package/src/ortho/partition.ts +303 -0
- package/src/ortho/rawgraph.ts +119 -0
- package/src/ortho/sgraph.ts +283 -0
- package/src/ortho/trap-query.ts +174 -0
- package/src/ortho/trap-segment.ts +303 -0
- package/src/ortho/trap-types.ts +171 -0
- package/src/ortho/trap-update.ts +89 -0
- package/src/ortho/trapezoid.ts +120 -0
- package/src/ortho/types.ts +286 -0
- package/src/parser/__fixtures__/directed.dot +10 -0
- package/src/parser/__fixtures__/simple.dot +7 -0
- package/src/parser/__fixtures__/subgraph.dot +17 -0
- package/src/parser/ast.ts +64 -0
- package/src/parser/builder.ts +401 -0
- package/src/parser/dot.d.ts +208 -0
- package/src/parser/dot.js +3321 -0
- package/src/parser/dot.pegjs +263 -0
- package/src/parser/index.ts +353 -0
- package/src/pathplan/index.ts +9 -0
- package/src/pathplan/route.ts +284 -0
- package/src/pathplan/shortest.ts +268 -0
- package/src/pathplan/solvers.ts +65 -0
- package/src/pathplan/triang.ts +221 -0
- package/src/pathplan/types.ts +16 -0
- package/src/pathplan/visibility.ts +170 -0
- package/src/pathplan/vispath.ts +118 -0
- package/src/rbtree/index.ts +418 -0
- package/src/render/color-resolve.ts +171 -0
- package/src/render/dot.ts +1514 -0
- package/src/render/index.ts +29 -0
- package/src/render/json.ts +734 -0
- package/src/render/map-test-helpers.ts +61 -0
- package/src/render/map.ts +528 -0
- package/src/render/public.ts +131 -0
- package/src/render/svg-arrow-ops.ts +113 -0
- package/src/render/svg-cluster.ts +24 -0
- package/src/render/svg-edge-ortho-radius.ts +228 -0
- package/src/render/svg-edge-split.ts +180 -0
- package/src/render/svg-gradient.ts +185 -0
- package/src/render/svg-graph.ts +415 -0
- package/src/render/svg-helpers.ts +623 -0
- package/src/render/svg-id.ts +76 -0
- package/src/render/svg-multicolor.ts +313 -0
- package/src/render/svg-parallel-edge.ts +123 -0
- package/src/render/svg-tapered-edge.ts +56 -0
- package/src/render/svg.ts +307 -0
- package/src/render/xdot-public.ts +164 -0
- package/src/render/xml-escape.ts +56 -0
- package/src/util/agxbuf.ts +138 -0
- package/src/util/bsd-qsort.ts +251 -0
- package/src/util/index.ts +25 -0
- package/src/util/list.ts +122 -0
- package/src/util/math.ts +104 -0
- package/src/util/mt19937.ts +143 -0
- package/src/util/printf-round.ts +163 -0
- package/src/util/xml.ts +184 -0
- package/src/vpsc/Block.ts +375 -0
- package/src/vpsc/Blocks.ts +164 -0
- package/src/vpsc/Constraint.ts +94 -0
- package/src/vpsc/HeapUtils.ts +88 -0
- package/src/vpsc/Solver.ts +274 -0
- package/src/vpsc/SweepLine.ts +214 -0
- package/src/vpsc/Variable.ts +54 -0
- package/src/vpsc/index.ts +122 -0
- package/src/vpsc/sweepTypes.ts +31 -0
- package/src/xdot/index.ts +7 -0
- package/src/xdot/lex.ts +151 -0
- package/src/xdot/misc.ts +226 -0
- package/src/xdot/parse.ts +349 -0
- package/src/xdot/types.ts +158 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DtBag — ordered multiset (Dtobag) backed by a splay tree.
|
|
3
|
+
*
|
|
4
|
+
* Unlike DtSplay (DT_OSET), DtBag allows duplicate keys. On insert of a
|
|
5
|
+
* duplicate, the new node is inserted immediately to the LEFT of the
|
|
6
|
+
* matching node (mirrors C dttree.c DT_OBAG insert: new node placed in
|
|
7
|
+
* link.left, i.e. the right partition, becoming the successor of the
|
|
8
|
+
* matching group — faithfully ported from dttree.c lines 226-230).
|
|
9
|
+
*
|
|
10
|
+
* Iteration (first/next) produces ascending comparator order. Among
|
|
11
|
+
* equal-key nodes the sub-order is the deterministic order CDT's Dtobag
|
|
12
|
+
* produces (via bagInsert's integrated splay+insert) — load-bearing for the
|
|
13
|
+
* xlabel R-tree, which drains this bag to seed its Hilbert insertion order.
|
|
14
|
+
*
|
|
15
|
+
* AD4 extension: required by xlabels.ts which uses dtopen(&Hdisc, Dtobag).
|
|
16
|
+
*
|
|
17
|
+
* @see lib/cdt/dttree.c (DT_OBAG)
|
|
18
|
+
*/
|
|
19
|
+
import type { Comparator, KeyOf } from "./types.js";
|
|
20
|
+
export declare class DtBag<T, K = T> {
|
|
21
|
+
private _root;
|
|
22
|
+
private _size;
|
|
23
|
+
private readonly _keyOf;
|
|
24
|
+
private readonly _compare;
|
|
25
|
+
constructor(keyOf: KeyOf<T, K>, compare: Comparator<K>);
|
|
26
|
+
/** @see lib/cdt/dtsize.c:dtsize */
|
|
27
|
+
size(): number;
|
|
28
|
+
/**
|
|
29
|
+
* Insert obj. Duplicates ARE inserted (DT_OBAG semantics).
|
|
30
|
+
* @see lib/cdt/dttree.c:dttree DT_INSERT (DT_OBAG branch)
|
|
31
|
+
*/
|
|
32
|
+
insert(obj: T): T;
|
|
33
|
+
/**
|
|
34
|
+
* Delete one occurrence of obj by object identity.
|
|
35
|
+
* @see lib/cdt/dttree.c:dttree DT_OBAG DT_DELETE
|
|
36
|
+
*/
|
|
37
|
+
delete(obj: T): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Return the minimum element (splays to root).
|
|
40
|
+
* @see lib/cdt/dttree.c:dttree DT_FIRST
|
|
41
|
+
*/
|
|
42
|
+
first(): T | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Return the in-order successor of obj.
|
|
45
|
+
* @see lib/cdt/dttree.c:dttree DT_NEXT
|
|
46
|
+
*/
|
|
47
|
+
next(obj: T): T | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Return the maximum element (splays to root).
|
|
50
|
+
* @see lib/cdt/dttree.c:dttree DT_LAST
|
|
51
|
+
*/
|
|
52
|
+
last(): T | undefined;
|
|
53
|
+
/** Remove all elements. */
|
|
54
|
+
clear(): void;
|
|
55
|
+
/** Iterate in ascending comparator order via first() / next(). */
|
|
56
|
+
[Symbol.iterator](): Iterator<T>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=bag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bag.d.ts","sourceRoot":"","sources":["../../src/cdt/bag.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAgEpD,qBAAa,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC;IACzB,OAAO,CAAC,KAAK,CAA6B;IAC1C,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;gBAE7B,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAKtD,mCAAmC;IACnC,IAAI,IAAI,MAAM;IAEd;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;IAcjB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAevB;;;OAGG;IACH,KAAK,IAAI,CAAC,GAAG,SAAS;IAMtB;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAe3B;;;OAGG;IACH,IAAI,IAAI,CAAC,GAAG,SAAS;IAMrB,2BAA2B;IAC3B,KAAK,IAAI,IAAI;IAKb,kEAAkE;IAClE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;CAcjC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal types and resize helpers for DtHash.
|
|
3
|
+
*
|
|
4
|
+
* Ported from lib/cdt/dthash.c (Kiem-Phong Vo, 05/25/96) and
|
|
5
|
+
* lib/cdt/dthdr.h macros: HSLOT, HRESIZE, HLOAD, HINDEX.
|
|
6
|
+
*
|
|
7
|
+
* @see lib/cdt/dthash.c:dthtab
|
|
8
|
+
* @see lib/cdt/dthdr.h
|
|
9
|
+
*/
|
|
10
|
+
/** Initial number of hash slots — HSLOT from dthdr.h */
|
|
11
|
+
export declare const HSLOT = 256;
|
|
12
|
+
/** Load threshold: resize when size > HLOAD(ntab) = 2*ntab @see dthdr.h:HLOAD */
|
|
13
|
+
export declare function hload(n: number): number;
|
|
14
|
+
/** Map hash to slot index: HINDEX(n,h) = h & (n-1) @see dthdr.h:HINDEX */
|
|
15
|
+
export declare function hindex(n: number, h: number): number;
|
|
16
|
+
/** Internal chain node — analogous to Dtlink_t used in DT_SET mode. */
|
|
17
|
+
export interface HashNode<T> {
|
|
18
|
+
right: HashNode<T> | null;
|
|
19
|
+
hash: number;
|
|
20
|
+
obj: T;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Migrate one slot's chain into newSlots of size n.
|
|
24
|
+
* Nodes that map to a different slot are moved; those that stay are left
|
|
25
|
+
* in oldSlots[si] and copied to newSlots[si] at the end.
|
|
26
|
+
* @see lib/cdt/dthash.c:dthtab (inner rehash loop)
|
|
27
|
+
*/
|
|
28
|
+
export declare function migrateChain<T>(oldSlots: Array<HashNode<T> | null>, newSlots: Array<HashNode<T> | null>, si: number, n: number): void;
|
|
29
|
+
/**
|
|
30
|
+
* Compute the smallest power-of-two slot count that keeps size under load.
|
|
31
|
+
* @see lib/cdt/dthash.c:dthtab (size computation block)
|
|
32
|
+
*/
|
|
33
|
+
export declare function targetSlotCount(current: number, size: number): number;
|
|
34
|
+
/**
|
|
35
|
+
* Resize and rehash the table; returns the new slot array.
|
|
36
|
+
* No-op (returns oldSlots unchanged) when no resize is needed.
|
|
37
|
+
* @see lib/cdt/dthash.c:dthtab
|
|
38
|
+
*/
|
|
39
|
+
export declare function rehash<T>(oldSlots: Array<HashNode<T> | null>, size: number): Array<HashNode<T> | null>;
|
|
40
|
+
//# sourceMappingURL=hash-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-core.d.ts","sourceRoot":"","sources":["../../src/cdt/hash-core.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,eAAO,MAAM,KAAK,MAAM,CAAC;AAEzB,iFAAiF;AACjF,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAmB;AAE3D,0EAA0E;AAC1E,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAwB;AAE5E,uEAAuE;AACvE,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAG,MAAM,CAAC;IACd,GAAG,EAAI,CAAC,CAAC;CACV;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EACnC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EACnC,EAAE,EAAE,MAAM,EACV,CAAC,EAAE,MAAM,GACR,IAAI,CAiBN;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EACnC,IAAI,EAAE,MAAM,GACX,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAQ3B"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DtHash — unordered set (DT_SET) backed by a separate-chaining hash table.
|
|
3
|
+
*
|
|
4
|
+
* Ported faithfully from lib/cdt/dthash.c (Kiem-Phong Vo, 05/25/96).
|
|
5
|
+
*
|
|
6
|
+
* Behavioral contracts preserved from C:
|
|
7
|
+
* - Initial slot count: 256 (HSLOT)
|
|
8
|
+
* - Resize when size > 2*ntab, suppressed while loop > 0
|
|
9
|
+
* - loop counter: first() increments; next() returning undefined decrements
|
|
10
|
+
* - Move-to-front on search when loop === 0; suppressed during walk
|
|
11
|
+
*
|
|
12
|
+
* @see lib/cdt/dthash.c
|
|
13
|
+
* @see lib/cdt/dthdr.h
|
|
14
|
+
*/
|
|
15
|
+
import type { Comparator, KeyOf } from "./types.js";
|
|
16
|
+
/**
|
|
17
|
+
* DtHash — unordered set backed by a separate-chaining hash table.
|
|
18
|
+
* @see lib/cdt/dthash.c:dthash
|
|
19
|
+
*/
|
|
20
|
+
export declare class DtHash<T, K = T> {
|
|
21
|
+
private _slots;
|
|
22
|
+
private _size;
|
|
23
|
+
/** Nesting depth of active walks — suppresses resize when > 0. */
|
|
24
|
+
private _loop;
|
|
25
|
+
/** Finger: last accessed node — analogous to dt->data.here */
|
|
26
|
+
private _here;
|
|
27
|
+
private readonly _keyOf;
|
|
28
|
+
private readonly _hash;
|
|
29
|
+
private readonly _compare;
|
|
30
|
+
constructor(keyOf: KeyOf<T, K>, hash: (key: K) => number, compare: Comparator<K>);
|
|
31
|
+
/** @see lib/cdt/dtsize.c:dtsize */
|
|
32
|
+
size(): number;
|
|
33
|
+
/** Allocate the slot array on first use. */
|
|
34
|
+
private _ensureSlots;
|
|
35
|
+
/**
|
|
36
|
+
* Find a node by key.
|
|
37
|
+
* Returns [node, predecessor, slotIndex]; node is null when not found.
|
|
38
|
+
*/
|
|
39
|
+
private _find;
|
|
40
|
+
/** Resize if over load and no active walk. */
|
|
41
|
+
private _maybeResize;
|
|
42
|
+
/** End an active walk: decrement loop, possibly trigger deferred resize. */
|
|
43
|
+
private _endWalk;
|
|
44
|
+
/**
|
|
45
|
+
* Insert obj. If key already exists returns the existing object (DT_SET).
|
|
46
|
+
* @see lib/cdt/dthash.c:dthash DT_INSERT
|
|
47
|
+
*/
|
|
48
|
+
insert(obj: T): T;
|
|
49
|
+
/**
|
|
50
|
+
* Delete obj by key. Returns true if found and removed.
|
|
51
|
+
* @see lib/cdt/dthash.c:dthash DT_DELETE
|
|
52
|
+
*/
|
|
53
|
+
delete(obj: T): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Search by key. Applies move-to-front when loop === 0.
|
|
56
|
+
* @see lib/cdt/dthash.c:dthash DT_SEARCH
|
|
57
|
+
*/
|
|
58
|
+
search(key: K): T | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Return the first element; increments the walk loop counter.
|
|
61
|
+
* Scans slots from index 0 upward.
|
|
62
|
+
* @see lib/cdt/dthash.c:dthash DT_FIRST
|
|
63
|
+
*/
|
|
64
|
+
first(): T | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Return the next element; advance within chain then across slots.
|
|
67
|
+
* Decrements loop counter and triggers deferred resize when exhausted.
|
|
68
|
+
* @see lib/cdt/dthash.c:dthash DT_NEXT
|
|
69
|
+
*/
|
|
70
|
+
next(_obj: T): T | undefined;
|
|
71
|
+
/** Remove all elements. @see lib/cdt/dthash.c:dthash DT_CLEAR */
|
|
72
|
+
clear(): void;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/cdt/hash.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASpD;;;GAGG;AACH,qBAAa,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC;IAC1B,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,KAAK,CAAM;IACnB,kEAAkE;IAClE,OAAO,CAAC,KAAK,CAAM;IACnB,8DAA8D;IAC9D,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;gBAGvC,KAAK,EAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,IAAI,EAAK,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,EAC3B,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAOxB,mCAAmC;IACnC,IAAI,IAAI,MAAM;IAId,4CAA4C;IAC5C,OAAO,CAAC,YAAY;IAMpB;;;OAGG;IACH,OAAO,CAAC,KAAK;IAeb,8CAA8C;IAC9C,OAAO,CAAC,YAAY;IAOpB,4EAA4E;IAC5E,OAAO,CAAC,QAAQ;IAUhB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;IAuBjB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAcvB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAe7B;;;;OAIG;IACH,KAAK,IAAI,CAAC,GAAG,SAAS;IAWtB;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAc5B,iEAAiE;IACjE,KAAK,IAAI,IAAI;CAMd"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lib/cdt — Container Data Types public API.
|
|
3
|
+
*
|
|
4
|
+
* Exports DtSplay (DT_OSET), DtHash (DT_SET), and dtStrHash.
|
|
5
|
+
*
|
|
6
|
+
* @see lib/cdt/cdt.h
|
|
7
|
+
* @see lib/cdt/dttree.c
|
|
8
|
+
* @see lib/cdt/dthash.c
|
|
9
|
+
* @see lib/cdt/dtstrhash.c
|
|
10
|
+
*/
|
|
11
|
+
export type { Comparator, KeyOf } from "./types.js";
|
|
12
|
+
export { DtSplay } from "./splay.js";
|
|
13
|
+
export { DtBag } from "./bag.js";
|
|
14
|
+
export { DtHash } from "./hash.js";
|
|
15
|
+
export { dtStrHash } from "./strhash.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cdt/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAQ,UAAU,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAO,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal splay-tree node type and top-down splay algorithm.
|
|
3
|
+
*
|
|
4
|
+
* Ported faithfully from lib/cdt/dttree.c (Kiem-Phong Vo, 5/25/96)
|
|
5
|
+
* and lib/cdt/dthdr.h.
|
|
6
|
+
*
|
|
7
|
+
* PARTITION NAMING INVERSION (preserved from C source):
|
|
8
|
+
* The dummy `link` node uses inverted field names:
|
|
9
|
+
* link.right → head of the LEFT partition (keys < target)
|
|
10
|
+
* link.left → head of the RIGHT partition (keys > target)
|
|
11
|
+
* `l` is the tail pointer into link.right (LEFT partition).
|
|
12
|
+
* `r` is the tail pointer into link.left (RIGHT partition).
|
|
13
|
+
* llink(l, x): l = l.right = x — extends LEFT partition
|
|
14
|
+
* rlink(r, x): r = r.left = x — extends RIGHT partition
|
|
15
|
+
*
|
|
16
|
+
* @see lib/cdt/dttree.c
|
|
17
|
+
* @see lib/cdt/dthdr.h
|
|
18
|
+
*/
|
|
19
|
+
import type { Comparator, KeyOf } from "./types.js";
|
|
20
|
+
/** Internal tree node — analogous to Dtlink_t in the C source. */
|
|
21
|
+
export interface SplayNode<T> {
|
|
22
|
+
left: SplayNode<T> | null;
|
|
23
|
+
right: SplayNode<T> | null;
|
|
24
|
+
obj: T;
|
|
25
|
+
}
|
|
26
|
+
export declare function rrotate<T>(x: SplayNode<T>, y: SplayNode<T>): void;
|
|
27
|
+
export declare function lrotate<T>(x: SplayNode<T>, y: SplayNode<T>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Splay minimum of `subtree` to its root via repeated RROTATE.
|
|
30
|
+
* Returns the new root (which has no left child).
|
|
31
|
+
* Mirrors the DT_FIRST loop and the DT_NEXT subtree-min logic.
|
|
32
|
+
* @see lib/cdt/dttree.c:dttree DT_FIRST / DT_NEXT
|
|
33
|
+
*/
|
|
34
|
+
export declare function splayMin<T>(subtree: SplayNode<T>): SplayNode<T>;
|
|
35
|
+
/**
|
|
36
|
+
* Splay maximum of `subtree` to its root via repeated LROTATE.
|
|
37
|
+
* Returns the new root (which has no right child).
|
|
38
|
+
* Mirrors the DT_LAST loop and the DT_PREV subtree-max logic.
|
|
39
|
+
* @see lib/cdt/dttree.c:dttree DT_LAST / DT_PREV
|
|
40
|
+
*/
|
|
41
|
+
export declare function splayMax<T>(subtree: SplayNode<T>): SplayNode<T>;
|
|
42
|
+
/**
|
|
43
|
+
* Insert `node` as new root by splitting `oldRoot` at the given comparison
|
|
44
|
+
* result `cmp` (compare(newKey, oldRoot.key)).
|
|
45
|
+
* `cmp` must be non-zero (caller already checked for duplicate).
|
|
46
|
+
* Returns the new root.
|
|
47
|
+
* @see lib/cdt/dttree.c:dttree DT_INSERT (not-found branch)
|
|
48
|
+
*/
|
|
49
|
+
export declare function splaySplitInsert<T>(node: SplayNode<T>, oldRoot: SplayNode<T>, cmp: number): SplayNode<T>;
|
|
50
|
+
/**
|
|
51
|
+
* Integrated top-down splay + insert, faithfully mirroring CDT's
|
|
52
|
+
* `dttree.c` DT_INSERT for a Dtobag (duplicate keys allowed).
|
|
53
|
+
*
|
|
54
|
+
* This differs from `splay()` + a separate splice: CDT inserts the new node
|
|
55
|
+
* *while the tree is still partitioned* into the LEFT (keys < target) and
|
|
56
|
+
* RIGHT (keys > target) spine-trees, pushing the found equal-key node onto
|
|
57
|
+
* the head of the RIGHT partition before the new node becomes root. Splaying
|
|
58
|
+
* to reassemble a normal BST first and only then splicing produces a
|
|
59
|
+
* different equal-key sub-order — which is load-bearing for the xlabel R-tree
|
|
60
|
+
* (its Hilbert-bag drain order, and therefore the tree it builds, depends on
|
|
61
|
+
* the exact duplicate ordering; see label/xlabels.ts).
|
|
62
|
+
*
|
|
63
|
+
* The do-search loop is identical to `splay()`; only the terminal insert
|
|
64
|
+
* differs. Returns the new root (always `node`).
|
|
65
|
+
*
|
|
66
|
+
* @see lib/cdt/dttree.c:dttree DT_INSERT (do_search + DT_OBAG found/has_root)
|
|
67
|
+
*/
|
|
68
|
+
export declare function bagInsert<T, K>(root: SplayNode<T>, node: SplayNode<T>, keyOf: KeyOf<T, K>, compare: Comparator<K>): SplayNode<T>;
|
|
69
|
+
/**
|
|
70
|
+
* Top-down splay.
|
|
71
|
+
*
|
|
72
|
+
* Splays the node whose key equals `key` (or the closest node) to root.
|
|
73
|
+
* Returns the new root. Always performs structural mutations.
|
|
74
|
+
*
|
|
75
|
+
* @see lib/cdt/dttree.c:dttree (do_search loop)
|
|
76
|
+
*/
|
|
77
|
+
export declare function splay<T, K>(root: SplayNode<T>, key: K, keyOf: KeyOf<T, K>, compare: Comparator<K>): SplayNode<T>;
|
|
78
|
+
//# sourceMappingURL=splay-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splay-core.d.ts","sourceRoot":"","sources":["../../src/cdt/splay-core.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEpD,kEAAkE;AAClE,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,CAAC,CAAC;CACR;AAMD,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAGjE;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAGjE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAQ/D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAQ/D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EACrB,GAAG,EAAE,MAAM,GACV,SAAS,CAAC,CAAC,CAAC,CAad;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAClB,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GACrB,SAAS,CAAC,CAAC,CAAC,CAiDd;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EACxB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAClB,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAClB,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GACrB,SAAS,CAAC,CAAC,CAAC,CAgHd"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DtSplay — ordered set (DT_OSET) backed by a top-down splay tree.
|
|
3
|
+
*
|
|
4
|
+
* Iteration order: ascending by comparator (same as DT_OSET in the C source).
|
|
5
|
+
* Every operation is a structural mutation (splay rotation) — intentional.
|
|
6
|
+
*
|
|
7
|
+
* @see lib/cdt/dttree.c
|
|
8
|
+
*/
|
|
9
|
+
import type { Comparator, KeyOf } from "./types.js";
|
|
10
|
+
export declare class DtSplay<T, K = T> {
|
|
11
|
+
/** Current root — analogous to dt->data.here in the C source. */
|
|
12
|
+
private _root;
|
|
13
|
+
private _size;
|
|
14
|
+
private readonly _keyOf;
|
|
15
|
+
private readonly _compare;
|
|
16
|
+
constructor(keyOf: KeyOf<T, K>, compare: Comparator<K>);
|
|
17
|
+
/** @see lib/cdt/dtsize.c:dtsize */
|
|
18
|
+
size(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Insert obj. If the key already exists returns the existing object
|
|
21
|
+
* unchanged (DT_OSET: no duplicates).
|
|
22
|
+
* @see lib/cdt/dttree.c:dttree DT_INSERT
|
|
23
|
+
*/
|
|
24
|
+
insert(obj: T): T;
|
|
25
|
+
/**
|
|
26
|
+
* Delete obj by key. Returns true if found and removed.
|
|
27
|
+
* @see lib/cdt/dttree.c:dttree DT_DELETE
|
|
28
|
+
*/
|
|
29
|
+
delete(obj: T): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Search by key. Splays found node to root.
|
|
32
|
+
* @see lib/cdt/dttree.c:dttree DT_SEARCH
|
|
33
|
+
*/
|
|
34
|
+
search(key: K): T | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Return the minimum element; splays it to root.
|
|
37
|
+
* @see lib/cdt/dttree.c:dttree DT_FIRST
|
|
38
|
+
*/
|
|
39
|
+
first(): T | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Return the in-order successor of obj.
|
|
42
|
+
* @see lib/cdt/dttree.c:dttree DT_NEXT
|
|
43
|
+
*/
|
|
44
|
+
next(obj: T): T | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Return the maximum element; splays it to root.
|
|
47
|
+
* @see lib/cdt/dttree.c:dttree DT_LAST
|
|
48
|
+
*/
|
|
49
|
+
last(): T | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Return the in-order predecessor of obj.
|
|
52
|
+
* @see lib/cdt/dttree.c:dttree DT_PREV
|
|
53
|
+
*/
|
|
54
|
+
prev(obj: T): T | undefined;
|
|
55
|
+
/** Remove all elements. @see lib/cdt/dttree.c:dttree DT_CLEAR */
|
|
56
|
+
clear(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Iterate in ascending comparator order via first() / next().
|
|
59
|
+
* Each step is a structural mutation per C DT_OSET spec.
|
|
60
|
+
*/
|
|
61
|
+
[Symbol.iterator](): Iterator<T>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=splay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splay.d.ts","sourceRoot":"","sources":["../../src/cdt/splay.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAWpD,qBAAa,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC;IAC3B,iEAAiE;IACjE,OAAO,CAAC,KAAK,CAA6B;IAC1C,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;gBAE7B,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAKtD,mCAAmC;IACnC,IAAI,IAAI,MAAM;IAEd;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;IAmBjB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO;IAqBvB;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAO7B;;;OAGG;IACH,KAAK,IAAI,CAAC,GAAG,SAAS;IAMtB;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAqB3B;;;OAGG;IACH,IAAI,IAAI,CAAC,GAAG,SAAS;IAMrB;;;OAGG;IACH,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,SAAS;IAqB3B,iEAAiE;IACjE,KAAK,IAAI,IAAI;IAKb;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;CAcjC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dtStrHash — polynomial rolling hash for null-terminated strings.
|
|
3
|
+
*
|
|
4
|
+
* Exact port of dtstrhash() from lib/cdt/dtstrhash.c (Kiem-Phong Vo, 02/28/03).
|
|
5
|
+
*
|
|
6
|
+
* Algorithm (n <= 0 / string mode):
|
|
7
|
+
* Advance 2 bytes per step; if the second byte is \0, advance only 1.
|
|
8
|
+
* h = (h + (s[0] << 8) + s[1]) * DT_PRIME at each step.
|
|
9
|
+
* Add string length at the end: (h + n) * DT_PRIME.
|
|
10
|
+
*
|
|
11
|
+
* The unusual 2-byte stepping with the \0 guard is a micro-optimisation in
|
|
12
|
+
* the original C and must be preserved exactly to produce matching hash values.
|
|
13
|
+
*
|
|
14
|
+
* @see lib/cdt/dtstrhash.c:dtstrhash
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Hash a JavaScript string using the dtstrhash algorithm (n <= 0 / string mode).
|
|
18
|
+
*
|
|
19
|
+
* TypeScript strings are UTF-16; we operate on char codes directly to match
|
|
20
|
+
* the C behaviour of treating each character as one byte (ASCII / Latin-1).
|
|
21
|
+
* Callers using non-ASCII keys must ensure their comparator is consistent.
|
|
22
|
+
*
|
|
23
|
+
* @see lib/cdt/dtstrhash.c:dtstrhash
|
|
24
|
+
*/
|
|
25
|
+
export declare function dtStrHash(s: string): number;
|
|
26
|
+
//# sourceMappingURL=strhash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strhash.d.ts","sourceRoot":"","sources":["../../src/cdt/strhash.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;GAcG;AAWH;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAgB3C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions for lib/cdt.
|
|
3
|
+
* Kept in a leaf module to avoid circular imports.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/cdt/cdt.h
|
|
6
|
+
*/
|
|
7
|
+
/** Key comparator: returns negative, zero, or positive. @see Dtcompar_f */
|
|
8
|
+
export type Comparator<K> = (a: K, b: K) => number;
|
|
9
|
+
/** Extract the key from an object. @see Dtdisc_t */
|
|
10
|
+
export type KeyOf<T, K> = (obj: T) => K;
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cdt/types.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC;AAEnD,oDAAoD;AACpD,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arithmetic primitives shared with the C reference build.
|
|
3
|
+
*
|
|
4
|
+
* @see lib/common/arith.h
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* C rounding: round half **away from zero**.
|
|
8
|
+
*
|
|
9
|
+
* This is the single shared implementation of the one rounding deviation that
|
|
10
|
+
* separates this port from C. Both C spellings agree on it:
|
|
11
|
+
*
|
|
12
|
+
* - libm `round()` — "rounding halfway cases away from zero" (C99 7.12.9.6),
|
|
13
|
+
* used directly across `lib/` (e.g. `lib/dotgen/compound.c:41`,
|
|
14
|
+
* `lib/pack/pack.c:435`, `lib/dotgen/position.c:966`).
|
|
15
|
+
* - the `ROUND` macro — `((f>=0)?(int)(f + .5):(int)(f - .5))`
|
|
16
|
+
* (`lib/common/arith.h:48`), whose truncating casts also break ties away
|
|
17
|
+
* from zero. `POINTS(a_inches)` (`lib/common/geom.h:62`) is `ROUND` too.
|
|
18
|
+
*
|
|
19
|
+
* JavaScript's `Math.round` breaks ties toward +∞ (`Math.round(-4.5) === -4`,
|
|
20
|
+
* C `round(-4.5) === -5`), so it diverges by 1 on **every exact negative
|
|
21
|
+
* half-integer**. Layout coordinates are routinely negative (center-origin
|
|
22
|
+
* engines, cluster walls left of an endpoint, port offsets from a node centre)
|
|
23
|
+
* and are often exact integers or halves, so such ties are ordinary, not
|
|
24
|
+
* exotic.
|
|
25
|
+
*
|
|
26
|
+
* Use this for every site that mirrors a C `round()`/`ROUND()`/`POINTS()`,
|
|
27
|
+
* including sites whose argument happens to be non-negative today — it costs
|
|
28
|
+
* nothing and states the intent. Do **not** use it where C rounds by some
|
|
29
|
+
* other rule (`(int)` truncation, `floor`, printf `%.0f` banker's rounding).
|
|
30
|
+
*
|
|
31
|
+
* @see lib/common/arith.h:48 (ROUND)
|
|
32
|
+
* @see C99 7.12.9.6 (round)
|
|
33
|
+
*/
|
|
34
|
+
export declare function cround(v: number): number;
|
|
35
|
+
//# sourceMappingURL=arith.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arith.d.ts","sourceRoot":"","sources":["../../src/common/arith.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAExC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** ln2 high/low split. */
|
|
2
|
+
export declare const ARM_LN2HI: number[];
|
|
3
|
+
export declare const ARM_LN2LO: number[];
|
|
4
|
+
/** Log polynomial coefficients A[0..6] (pre-scaled). */
|
|
5
|
+
export declare const ARM_LOG_POLY: number[];
|
|
6
|
+
/** Log table: 128 × (invc, logc, logctail) bit patterns. */
|
|
7
|
+
export declare const ARM_LOG_TAB: number[];
|
|
8
|
+
/** Exp argument-reduction constants. */
|
|
9
|
+
export declare const ARM_INVLN2N: number[];
|
|
10
|
+
export declare const ARM_SHIFT: number[];
|
|
11
|
+
export declare const ARM_NEGLN2HIN: number[];
|
|
12
|
+
export declare const ARM_NEGLN2LON: number[];
|
|
13
|
+
/** Exp polynomial coefficients (poly[0..5]). */
|
|
14
|
+
export declare const ARM_EXP_POLY: number[];
|
|
15
|
+
/** Exp table: 256 uint64 entries (tail/sbits pairs) as [hi32, lo32]. */
|
|
16
|
+
export declare const ARM_EXP_TAB: number[];
|
|
17
|
+
//# sourceMappingURL=arm-pow-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arm-pow-data.d.ts","sourceRoot":"","sources":["../../src/common/arm-pow-data.ts"],"names":[],"mappings":"AAYA,0BAA0B;AAC1B,eAAO,MAAM,SAAS,UAA2B,CAAC;AAClD,eAAO,MAAM,SAAS,UAA2B,CAAC;AAElD,wDAAwD;AACxD,eAAO,MAAM,YAAY,EAAE,MAAM,EAGhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,WAAW,EAAE,MAAM,EAiG/B,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,WAAW,UAA2B,CAAC;AACpD,eAAO,MAAM,SAAS,UAA2B,CAAC;AAClD,eAAO,MAAM,aAAa,UAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,UAA2B,CAAC;AAEtD,gDAAgD;AAChD,eAAO,MAAM,YAAY,EAAE,MAAM,EAGhC,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,WAAW,EAAE,MAAM,EAiE/B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pow(x, y). The normal-finite fast path is the log_inline/exp_inline core;
|
|
3
|
+
* the special-case branch (x or y is 0/inf/nan, negative base, subnormal base,
|
|
4
|
+
* or extreme |y|) is ported faithfully so armPow returns exactly what libm's
|
|
5
|
+
* pow returns — including `pow(NaN, y) = NaN`. This matters for sfdp graphs
|
|
6
|
+
* whose force loop blows up to NaN under a large `repulsiveforce` (e.g. 2556,
|
|
7
|
+
* repulsiveforce=100 → the native oracle itself emits all-`nan` positions):
|
|
8
|
+
* the port must reproduce the same NaN, not throw.
|
|
9
|
+
* @see ARM optimized-routines math/pow.c:pow
|
|
10
|
+
*/
|
|
11
|
+
export declare function armPow(x: number, y: number): number;
|
|
12
|
+
//# sourceMappingURL=arm-pow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arm-pow.d.ts","sourceRoot":"","sources":["../../src/common/arm-pow.ts"],"names":[],"mappings":"AAuOA;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAsDnD"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arrow type and modifier constants, name/type tables ported from
|
|
3
|
+
* lib/common/arrows.c internal definitions.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/common/arrows.c
|
|
6
|
+
*/
|
|
7
|
+
/** @see lib/common/arrows.c:#define EPSILON */
|
|
8
|
+
export declare const EPSILON = 0.0001;
|
|
9
|
+
/** Standard arrow length in points. @see lib/common/arrows.c:#define ARROW_LENGTH */
|
|
10
|
+
export declare const ARROW_LENGTH = 10;
|
|
11
|
+
/** Number of arrow heads per flag word. @see lib/common/arrows.c:#define NUMB_OF_ARROW_HEADS */
|
|
12
|
+
export declare const NUMB_OF_ARROW_HEADS = 4;
|
|
13
|
+
/** Bits per arrow slot in the flag word. @see lib/common/arrows.c:#define BITS_PER_ARROW */
|
|
14
|
+
export declare const BITS_PER_ARROW = 8;
|
|
15
|
+
/** Bits used for the arrow type portion. @see lib/common/arrows.c:#define BITS_PER_ARROW_TYPE */
|
|
16
|
+
export declare const BITS_PER_ARROW_TYPE = 4;
|
|
17
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_NONE */
|
|
18
|
+
export declare const ARR_TYPE_NONE = 0;
|
|
19
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_NORM */
|
|
20
|
+
export declare const ARR_TYPE_NORM = 1;
|
|
21
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_CROW */
|
|
22
|
+
export declare const ARR_TYPE_CROW = 2;
|
|
23
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_TEE */
|
|
24
|
+
export declare const ARR_TYPE_TEE = 3;
|
|
25
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_BOX */
|
|
26
|
+
export declare const ARR_TYPE_BOX = 4;
|
|
27
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_DIAMOND */
|
|
28
|
+
export declare const ARR_TYPE_DIAMOND = 5;
|
|
29
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_DOT */
|
|
30
|
+
export declare const ARR_TYPE_DOT = 6;
|
|
31
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_CURVE */
|
|
32
|
+
export declare const ARR_TYPE_CURVE = 7;
|
|
33
|
+
/** @see lib/common/arrows.c:#define ARR_TYPE_GAP */
|
|
34
|
+
export declare const ARR_TYPE_GAP = 8;
|
|
35
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_NORM lenfact */
|
|
36
|
+
export declare const ARR_LENFACT_NORM = 1;
|
|
37
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_CROW lenfact */
|
|
38
|
+
export declare const ARR_LENFACT_CROW = 1;
|
|
39
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_TEE lenfact */
|
|
40
|
+
export declare const ARR_LENFACT_TEE = 0.5;
|
|
41
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_BOX lenfact */
|
|
42
|
+
export declare const ARR_LENFACT_BOX = 1;
|
|
43
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_DIAMOND lenfact */
|
|
44
|
+
export declare const ARR_LENFACT_DIAMOND = 1.2;
|
|
45
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_DOT lenfact */
|
|
46
|
+
export declare const ARR_LENFACT_DOT = 0.8;
|
|
47
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_CURVE lenfact */
|
|
48
|
+
export declare const ARR_LENFACT_CURVE = 1;
|
|
49
|
+
/** @see lib/common/arrows.c:Arrowtypes ARR_TYPE_GAP lenfact */
|
|
50
|
+
export declare const ARR_LENFACT_GAP = 0.5;
|
|
51
|
+
/**
|
|
52
|
+
* Length factor indexed by ARR_TYPE_* code. ARR_TYPE_NONE (0) has no shape;
|
|
53
|
+
* it maps to 0 so a none-arrow contributes no clip length.
|
|
54
|
+
* @see lib/common/arrows.c:Arrowtypes
|
|
55
|
+
*/
|
|
56
|
+
export declare const ARR_LENFACT_BY_TYPE: readonly number[];
|
|
57
|
+
/** Mask selecting the type-code portion (low BITS_PER_ARROW_TYPE bits). */
|
|
58
|
+
export declare const ARR_TYPE_MASK: number;
|
|
59
|
+
/** Open/outline only. @see lib/common/arrows.c:#define ARR_MOD_OPEN */
|
|
60
|
+
export declare const ARR_MOD_OPEN: number;
|
|
61
|
+
/** Inverted direction. @see lib/common/arrows.c:#define ARR_MOD_INV */
|
|
62
|
+
export declare const ARR_MOD_INV: number;
|
|
63
|
+
/** Left half only. @see lib/common/arrows.c:#define ARR_MOD_LEFT */
|
|
64
|
+
export declare const ARR_MOD_LEFT: number;
|
|
65
|
+
/** Right half only. @see lib/common/arrows.c:#define ARR_MOD_RIGHT */
|
|
66
|
+
export declare const ARR_MOD_RIGHT: number;
|
|
67
|
+
/** One entry in an arrow name/flag table. @see lib/common/arrows.c:arrowname_t */
|
|
68
|
+
export interface ArrowNameEntry {
|
|
69
|
+
readonly name: string;
|
|
70
|
+
readonly type: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Backward-compatibility synonyms for deprecated arrow names.
|
|
74
|
+
* Evaluated before Arrownames so "invempty" resolves correctly.
|
|
75
|
+
* @see lib/common/arrows.c:Arrowsynonyms
|
|
76
|
+
*/
|
|
77
|
+
export declare const ARROW_SYNONYMS: readonly ArrowNameEntry[];
|
|
78
|
+
/**
|
|
79
|
+
* Modifier prefix tokens.
|
|
80
|
+
* @see lib/common/arrows.c:Arrowmods
|
|
81
|
+
*/
|
|
82
|
+
export declare const ARROW_MODS: readonly ArrowNameEntry[];
|
|
83
|
+
/**
|
|
84
|
+
* Primary arrow shape names.
|
|
85
|
+
* @see lib/common/arrows.c:Arrownames
|
|
86
|
+
*/
|
|
87
|
+
export declare const ARROW_NAMES_TABLE: readonly ArrowNameEntry[];
|
|
88
|
+
/**
|
|
89
|
+
* Direction strings and their corresponding start/end flag values.
|
|
90
|
+
* @see lib/common/arrows.c:Arrowdirs
|
|
91
|
+
*/
|
|
92
|
+
export declare const ARROW_DIRS: readonly {
|
|
93
|
+
dir: string;
|
|
94
|
+
sflag: number;
|
|
95
|
+
eflag: number;
|
|
96
|
+
}[];
|
|
97
|
+
//# sourceMappingURL=arrows-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrows-constants.d.ts","sourceRoot":"","sources":["../../src/common/arrows-constants.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAMH,+CAA+C;AAC/C,eAAO,MAAM,OAAO,SAAS,CAAC;AAE9B,qFAAqF;AACrF,eAAO,MAAM,YAAY,KAAO,CAAC;AAEjC,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,4FAA4F;AAC5F,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,iGAAiG;AACjG,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAMrC,qDAAqD;AACrD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,qDAAqD;AACrD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,qDAAqD;AACrD,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,oDAAoD;AACpD,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,oDAAoD;AACpD,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,oDAAoD;AACpD,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,sDAAsD;AACtD,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,oDAAoD;AACpD,eAAO,MAAM,YAAY,IAAI,CAAC;AAO9B,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,IAAM,CAAC;AACpC,gEAAgE;AAChE,eAAO,MAAM,gBAAgB,IAAM,CAAC;AACpC,+DAA+D;AAC/D,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,+DAA+D;AAC/D,eAAO,MAAM,eAAe,IAAM,CAAC;AACnC,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,+DAA+D;AAC/D,eAAO,MAAM,eAAe,MAAM,CAAC;AACnC,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,IAAM,CAAC;AACrC,+DAA+D;AAC/D,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAY7C,CAAC;AAEL,2EAA2E;AAC3E,eAAO,MAAM,aAAa,QAAiC,CAAC;AAM5D,uEAAuE;AACvE,eAAO,MAAM,YAAY,QAAiC,CAAC;AAC3D,uEAAuE;AACvE,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,oEAAoE;AACpE,eAAO,MAAM,YAAY,QAAiC,CAAC;AAC3D,sEAAsE;AACtE,eAAO,MAAM,aAAa,QAAiC,CAAC;AAM5D,kFAAkF;AAClF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,cAAc,EAEnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,cAAc,EAM/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAgBtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,EAKA,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure geometry helpers for arrow rendering.
|
|
3
|
+
* Ported from the internal static functions in lib/common/arrows.c.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/common/arrows.c
|
|
6
|
+
*/
|
|
7
|
+
import type { Point } from '../model/geom.js';
|
|
8
|
+
/** @see lib/common/geomprocs.h:add_pointf */
|
|
9
|
+
export declare function addPoint(a: Point, b: Point): Point;
|
|
10
|
+
/** @see lib/common/geomprocs.h:sub_pointf */
|
|
11
|
+
export declare function subPoint(a: Point, b: Point): Point;
|
|
12
|
+
/** @see lib/common/geomprocs.h:scale */
|
|
13
|
+
export declare function scalePoint(s: number, p: Point): Point;
|
|
14
|
+
/** Euclidean distance between two points. @see lib/common/arrows.c:DIST macro */
|
|
15
|
+
export declare function dist(a: Point, b: Point): number;
|
|
16
|
+
/** Signed angle in radians from direction vector (dx, dy). */
|
|
17
|
+
export declare function signedAngle(dx: number, dy: number): number;
|
|
18
|
+
export type { Triangle } from './arrows-miter.js';
|
|
19
|
+
/**
|
|
20
|
+
* Miter (or bevel fallback) line-join shape for a stroke corner at P.
|
|
21
|
+
* @see lib/common/arrows.c:miter_shape
|
|
22
|
+
*/
|
|
23
|
+
export declare function miterShape(baseLeft: Point, P: Point, baseRight: Point, penwidth: number): import('./arrows-miter.js').Triangle;
|
|
24
|
+
//# sourceMappingURL=arrows-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrows-geometry.d.ts","sourceRoot":"","sources":["../../src/common/arrows-geometry.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAO9C,6CAA6C;AAC7C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAElD;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAElD;AAED,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,CAErD;AAED,iFAAiF;AACjF,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAE/C;AAMD,8DAA8D;AAC9D,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAI1D;AAMD,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;GAGG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAC5D,OAAO,mBAAmB,EAAE,QAAQ,CAEtC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Miter line-join shape computation, split from arrows-geometry.ts to
|
|
3
|
+
* satisfy per-function line-length limits.
|
|
4
|
+
*
|
|
5
|
+
* @see lib/common/arrows.c:miter_shape
|
|
6
|
+
*/
|
|
7
|
+
import type { Point } from '../model/geom.js';
|
|
8
|
+
/**
|
|
9
|
+
* Three points describing a line-join shape at a stroke corner.
|
|
10
|
+
* points[0] = miter tip P3 (or bevel midpoint)
|
|
11
|
+
* points[1] = P1 (left penwidth offset)
|
|
12
|
+
* points[2] = P2 (right penwidth offset)
|
|
13
|
+
*
|
|
14
|
+
* @see lib/common/arrows.c:triangle
|
|
15
|
+
*/
|
|
16
|
+
export type Triangle = {
|
|
17
|
+
readonly points: readonly [Point, Point, Point];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Miter (or bevel fallback) line-join shape for a stroke corner at P.
|
|
21
|
+
* @see lib/common/arrows.c:miter_shape
|
|
22
|
+
*/
|
|
23
|
+
export declare function miterShapeImpl(baseLeft: Point, P: Point, baseRight: Point, penwidth: number): Triangle;
|
|
24
|
+
//# sourceMappingURL=arrows-miter.d.ts.map
|