Dear all, Is there any function to get a subset of graph that have largest connected component using Graphs.jl (version >= 1.4.1)? I only found function connected_components that return a list of connected vertices?
In function connected_components
g = SimpleGraph([0 1 0 0 0; 1 0 1 0 0; 0 1 0 0 0; 0 0 0 0 1; 0 0 0 1 0]);
connected_components(g)
2-element Array{Array{Int64,1},1}:
[1, 2, 3]
[4, 5]
What I need is a get_largest_component_graph
g = SimpleGraph([0 1 0 0 0; 1 0 1 0 0; 0 1 0 0 0; 0 0 0 0 1; 0 0 0 1 0]);
giant_component_graph = get_largest_component_graph(g)
Is there any idea to create this get_largest_component_graph? Thank you very much