visualize Components
Visualizes the strongly connected components (SCCs) of a graph.
This function creates a new graph where each component is represented as a cycle, connecting its nodes in a circular manner. Then the graph is visualized.
Example usage:
val graph = Graph(false)
graph.addEdge("A", "B")
graph.addEdge("B", "C")
graph.addEdge("C", "B")
val scc = graph.stronglyConnectedComponents()
scc.visualizeComponents()Content copied to clipboard