Layout transitions/constraints + 4 new engines, algorithm coverage tail, pathfinding perf, docs bundle - #28
Merged
Merged
Conversation
…aints.layer (ELK partitions, dot rank=same)
…s (exports, optional peers, smoke coverage)
…/A*/bidirectional hot loops
…eline cookbook; fix JSDoc subpaths in format examples
…ing (Hopcroft–Karp), min-cut, seeded LPA, graph generators
…range ^3||^4; docs: layout guide + transitions
…s, honest routing claims), guides index
…s (148ms -> 9.7ms sweep at 100k/300k, parity with ngraph/graphology)
…evel, node data.label); read both back
…y after O(1) getDegree
Member
Author
|
Follow-ups landed in this PR after all:
|
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes out the full gap list. Three changesets (2 minor, 1 patch).
pnpm verifygreen end-to-end: typecheck, 1,682 tests in 72 files (all real engines, including WASM Graphviz and headless cytoscape), build, publint, and the package smoke test exercising all nine layout entry points against the packed tarball in a clean consumer.Visual
genLayoutTransition(from, to)— the layout-morphing primitive: yields interpolatedLayoutFrames between two layouts (drive withapplyLayoutFrame, one per rAF). Lay out with dagre, re-lay out with ELK, tween live. Layouts are plain data here, so this falls out of the model — seedocs/layout-transitions.md.translateGraph/centerGraph(mutable, hierarchy-aware: parent-relative children and container-relative edge routes are left alone via LCA check).constraints.layer— first portable, advisory layout constraint: ELK partitions, Graphvizrank=same, others ignore. Per-engine escape hatches remain.layout/forceatlas2— graphology FA2, seeded determinism, native pinning, edge weightslayout/d3-hierarchy— Reingold–Tilford tidy tree; forests; non-tree edges preserved via spanning-tree layoutlayout/webcola— constraint-based, overlap avoidance, deterministic per seed, DAG flowlayout/cytoscape— headless bridge to the whole cytoscape layout ecosystem (+ caller-registered extensions via injectablecy)seed→elk.randomSeed(was silently ignored for force/stress); dagre peer widened to^3 || ^4(devDep tests 3.x).Analytical
getCoreNumbers/getKCore, Batagelj–Zaveršnik O(m)), Katz centrality, eigenvector centrality hardened ((A+I)-shifted iteration fixes bipartite oscillation; differential-tested vs graphology),isBipartite+ Hopcroft–KarpgetMaximumBipartiteMatching,getMinCut(shares the max-flow solver;value === getMaxFlow().valueby construction), seeded label propagation, and generators (createCompleteGraph/createGridGraph/createRandomGraph, deterministic per seed).Performance (patch changeset)
genShortestPathsreconstructs a path only when yielded (verified failing-first with edge-read-counting proxies).bench/paths-lazy.ts.Docs (
docs/*.md)layout.md(full guide: contract, 8 engines, constraints matrix, worker recipes),layout-transitions.md,algorithms.md(70-function reference with complexity),benchmarks.md(honest scoreboard — includes our losses: degree sweep is 4–23× slower than ngraph/graphology, a known follow-up),migrating-from-graphlib.md(all 11alg.*functions have equivalents),react-flow-elk-pipeline.md. README synced (peers table, guides index, honest routing claims — only ELK/dagre/Graphviz route edges).Known follow-ups (not in this PR)
toXYFlowwrites edge labels todata.label, not React Flow's top-levellabelrender prop (documented workaround in the pipeline doc; candidate model-level fix)