UNPKG

@graphty/layout

Version:

graph layout algorithms based on networkx

14 lines (13 loc) 616 B
import type { Graph, PositionMap } from '../../types'; /** * Layout algorithm with attractive and repulsive forces (ARF). * * @param G - Graph * @param pos - Initial positions for nodes * @param scaling - Scale factor for positions * @param a - Strength of springs between connected nodes (should be > 1) * @param maxIter - Maximum number of iterations * @param seed - Random seed for initial positions * @returns Positions dictionary keyed by node */ export declare function arfLayout(G: Graph, pos?: PositionMap | null, scaling?: number, a?: number, maxIter?: number, seed?: number | null): PositionMap;