V - the graph vertex typeE - the graph edge typepublic class UndirectedSubgraph<V,E> extends Subgraph<V,E,UndirectedGraph<V,E>> implements UndirectedGraph<V,E>
Subgraph,
Serialized Form| Constructor and Description |
|---|
UndirectedSubgraph(UndirectedGraph<V,E> base)
Creates a new undirected induced subgraph with all vertices included.
|
UndirectedSubgraph(UndirectedGraph<V,E> base,
Set<? extends V> vertexSubset)
Creates a new undirected induced subgraph.
|
UndirectedSubgraph(UndirectedGraph<V,E> base,
Set<? extends V> vertexSubset,
Set<? extends E> edgeSubset)
Creates a new undirected subgraph.
|
| Modifier and Type | Method and Description |
|---|---|
int |
degreeOf(V vertex)
Returns the degree of the specified vertex.
|
addEdge, addEdge, addVertex, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getBase, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSetassertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSetpublic UndirectedSubgraph(UndirectedGraph<V,E> base, Set<? extends V> vertexSubset, Set<? extends E> edgeSubset)
base - the base (backing) graph on which the subgraph will be based.vertexSubset - vertices to include in the subgraph. If null then all
vertices are included.edgeSubset - edges to in include in the subgraph. If null then all the
edges whose vertices found in the graph are included.public UndirectedSubgraph(UndirectedGraph<V,E> base, Set<? extends V> vertexSubset)
base - the base (backing) graph on which the subgraph will be based.vertexSubset - vertices to include in the subgraph. If null then all
vertices are included.public UndirectedSubgraph(UndirectedGraph<V,E> base)
base - the base (backing) graph on which the subgraph will be based.public int degreeOf(V vertex)
degreeOf in interface UndirectedGraph<V,E>vertex - vertex whose degree is to be calculated.Copyright © 2017. All rights reserved.