mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
7 lines (6 loc) • 325 B
TypeScript
import type { Graph, NodeId } from './helpers.js';
/**
* Greedy local search that tries to lift nodes to reduce crossings while
* preserving acyclicity (rank(v) e= rank(u)+1 for every edge u-\>v).
*/
export declare function optimizeRanksByCrossings(g: Graph, initialRank: Record<NodeId, number>): Record<NodeId, number>;