import { NodeId, Connection } from '../../../../../types/core'; import { AdjacencyMap } from './types'; /** * Build bidirectional adjacency map from connections */ export declare function buildBidirectionalAdjacency(connections: Connection[]): AdjacencyMap; /** * Order a layer based on positions in fixed layer using barycentric method */ export declare function orderLayerByBarycenter(layer: NodeId[], fixedLayer: NodeId[], adjacency: AdjacencyMap): NodeId[]; /** * Order a layer based on positions in fixed layer using median method */ export declare function orderLayerByMedian(layer: NodeId[], fixedLayer: NodeId[], adjacency: AdjacencyMap): NodeId[]; /** * Count edge crossings between two adjacent layers */ export declare function countCrossings(upperLayer: NodeId[], lowerLayer: NodeId[], adjacency: AdjacencyMap): number; /** * Count total edge crossings in entire layered graph */ export declare function countTotalCrossings(layers: NodeId[][], adjacency: AdjacencyMap): number; /** * Reduce edge crossings using barycentric method * Performs multiple forward and backward sweeps */ export declare function reduceCrossingsBarycentric(layers: NodeId[][], connections: Connection[], iterations: number): NodeId[][]; /** * Reduce edge crossings using median method */ export declare function reduceCrossingsMedian(layers: NodeId[][], connections: Connection[], iterations: number): NodeId[][];