Package com.jgalgo
Interface BiConnectedComponentsAlgo.Result
-
- Enclosing interface:
- BiConnectedComponentsAlgo
public static interface BiConnectedComponentsAlgo.Result
A result object of aBiConnectedComponentsAlgo
computation.Each bi-connected components is labeled by an integer in range
[0, getNumberOfBiCcs())
.Note that the bi-connected components are not disjoint, namely a single vertex can be included in multiple bi-connected components, differing from the regular connected components of a graph.
- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IntCollection
getBiCcEdges(int biccIdx)
Get the edges contained in a single bi-connected component.IntCollection
getBiCcVertices(int biccIdx)
Get the vertices contained in a single bi-connected component.int
getNumberOfBiCcs()
Get the number of bi-connected components computed in the graph.IntCollection
getVertexBiCcs(int vertex)
Get the bi-connected components a vertex is contained in.
-
-
-
Method Detail
-
getVertexBiCcs
IntCollection getVertexBiCcs(int vertex)
Get the bi-connected components a vertex is contained in.- Parameters:
vertex
- a vertex in the graph- Returns:
- the labels of the bi-connected components containing the vertex
- Throws:
IndexOutOfBoundsException
- ifvertex
is not a valid vertex identifier in the graph
-
getNumberOfBiCcs
int getNumberOfBiCcs()
Get the number of bi-connected components computed in the graph.Each bi-connected component is labeled by an integer in range
[0, getNumberOfBiCcs())
.- Returns:
- the number of bi-connected components
-
getBiCcVertices
IntCollection getBiCcVertices(int biccIdx)
Get the vertices contained in a single bi-connected component.- Parameters:
biccIdx
- an index of a bi-connected component- Returns:
- all the vertices that are contained in the bi-connected component
- Throws:
IndexOutOfBoundsException
- ifbiccIdx
is not in range[0, getNumberOfBiCcs())
-
getBiCcEdges
IntCollection getBiCcEdges(int biccIdx)
Get the edges contained in a single bi-connected component.An edge \((u,v)\) is said to bi contained in a bi-connected component \(B\) if both \(u\) and \(v\) are in \(B\).
- Parameters:
biccIdx
- an index of a bi-connected component- Returns:
- all the edges that are contained in the bi-connected component
- Throws:
IndexOutOfBoundsException
- ifbiccIdx
is not in range[0, getNumberOfBiCcs())
-
-