@graphty/layout
Version:
graph layout algorithms based on networkx
17 lines (16 loc) • 746 B
TypeScript
/**
* Bipartite layout algorithm
*/
import { Graph, Node, PositionMap } from '../../types';
/**
* Position nodes in two straight lines (bipartite layout).
*
* @param G - Graph or list of nodes
* @param nodes - Nodes in one node set of the graph
* @param align - The alignment of nodes: 'vertical' or 'horizontal'
* @param scale - Scale factor for positions
* @param center - Coordinate pair around which to center the layout
* @param aspectRatio - The ratio of the width to the height of the layout
* @returns Positions dictionary keyed by node
*/
export declare function bipartiteLayout(G: Graph, nodes?: Node[] | null, align?: 'vertical' | 'horizontal', scale?: number, center?: number[] | null, aspectRatio?: number): PositionMap;