UNPKG

@graphty/layout

Version:

graph layout algorithms based on networkx

17 lines (16 loc) 564 B
/** * Bipartite graph generation function */ import { Graph, Node } from '../types'; /** * Create a bipartite graph with two sets of nodes * @param n1 - Number of nodes in first set * @param n2 - Number of nodes in second set * @param p - Probability of edge between nodes in different sets * @param seed - Random seed for reproducibility * @returns Graph object with bipartite structure and setA/setB properties */ export declare function bipartiteGraph(n1: number, n2: number, p: number, seed?: number): Graph & { setA: Node[]; setB: Node[]; };