You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
769 B
17 lines
769 B
|
4 months ago
|
import { GraphData, NodeConfig } from "./types";
|
||
|
|
/**
|
||
|
|
* Generate all connected components for an undirected graph
|
||
|
|
* @param graph
|
||
|
|
*/
|
||
|
|
export declare const detectConnectedComponents: (graphData: GraphData) => NodeConfig[][];
|
||
|
|
/**
|
||
|
|
* Tarjan's Algorithm 复杂度 O(|V|+|E|)
|
||
|
|
* For directed graph only
|
||
|
|
* a directed graph is said to be strongly connected if "every vertex is reachable from every other vertex".
|
||
|
|
* refer: http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
|
||
|
|
* @param graph
|
||
|
|
* @return a list of strongly connected components
|
||
|
|
*/
|
||
|
|
export declare const detectStrongConnectComponents: (graphData: GraphData) => NodeConfig[][];
|
||
|
|
export default function getConnectedComponents(graphData: GraphData, directed?: boolean): NodeConfig[][];
|