UNPKG

@graphty/layout

Version:

graph layout algorithms based on networkx

13 lines (12 loc) 416 B
/** * Random graph generation function */ import { Graph } from '../types'; /** * Create a random graph with n nodes and given edge probability * @param n - Number of nodes * @param p - Probability of edge between any two nodes (0-1) * @param seed - Random seed for reproducibility * @returns Graph object with random edges */ export declare function randomGraph(n: number, p: number, seed?: number): Graph;