@graphty/layout
Version:
graph layout algorithms based on networkx
15 lines (14 loc) • 558 B
TypeScript
/**
* Spectral layout algorithm using eigenvectors of the graph Laplacian
*/
import { Graph, PositionMap } from '../../types';
/**
* Position nodes in a spectral layout using eigenvectors of the graph Laplacian.
*
* @param G - Graph
* @param scale - Scale factor for positions
* @param center - Coordinate pair around which to center the layout
* @param dim - Dimension of layout
* @returns Positions dictionary keyed by node
*/
export declare function spectralLayout(G: Graph, scale?: number, center?: number[] | null, dim?: number): PositionMap;