V
- the graph vertex typeE
- the graph edge typepublic class BlockCutpointGraph<V,E> extends SimpleGraph<UndirectedGraph<V,E>,DefaultEdge>
Constructor and Description |
---|
BlockCutpointGraph(UndirectedGraph<V,E> graph)
Running time = O(m) where m is the number of edges.
|
Modifier and Type | Method and Description |
---|---|
UndirectedGraph<V,E> |
getBlock(V vertex)
Returns the vertex if vertex is a cutpoint, and otherwise returns the block (biconnected
component) containing the vertex.
|
Set<V> |
getCutpoints()
Returns the cutpoints of the initial graph.
|
boolean |
isCutpoint(V vertex)
Returns
true if the vertex is a cutpoint, false otherwise. |
builder, builder
addEdge, addEdge, addVertex, clone, containsEdge, containsVertex, createDirectedSpecifics, createSpecifics, createUndirectedSpecifics, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, incomingEdgesOf, inDegreeOf, isAllowingLoops, isAllowingMultipleEdges, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSet
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
finalize, getClass, notify, notifyAll, wait, wait, wait
degreeOf
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
public BlockCutpointGraph(UndirectedGraph<V,E> graph)
graph
- the input graphpublic UndirectedGraph<V,E> getBlock(V vertex)
vertex
- vertex in the initial graph.public Set<V> getCutpoints()
public boolean isCutpoint(V vertex)
true
if the vertex is a cutpoint, false
otherwise.vertex
- vertex in the initial graph.true
if the vertex is a cutpoint, false
otherwise.Copyright © 2017. All rights reserved.