|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgrapht.graph.AbstractGraph<V,E>
org.jgrapht.graph.Subgraph<V,E,DirectedGraph<V,E>>
org.jgrapht.graph.DirectedSubgraph<V,E>
public class DirectedSubgraph<V,E>
A directed graph that is a subgraph on other graph.
Subgraph
,
Serialized FormConstructor Summary | |
---|---|
DirectedSubgraph(DirectedGraph<V,E> base,
java.util.Set<V> vertexSubset,
java.util.Set<E> edgeSubset)
Creates a new directed subgraph. |
Method Summary | |
---|---|
java.util.Set<E> |
incomingEdgesOf(V vertex)
Returns a set of all edges incoming into the specified vertex. |
int |
inDegreeOf(V vertex)
Returns the "in degree" of the specified vertex. |
int |
outDegreeOf(V vertex)
Returns the "out degree" of the specified vertex. |
java.util.Set<E> |
outgoingEdgesOf(V vertex)
Returns a set of all edges outgoing from the specified vertex. |
Methods inherited from class org.jgrapht.graph.Subgraph |
---|
addEdge, addEdge, addVertex, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getBase, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeEdge, removeEdge, removeVertex, setEdgeWeight, vertexSet |
Methods inherited from class org.jgrapht.graph.AbstractGraph |
---|
assertVertexExist, containsEdge, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jgrapht.Graph |
---|
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet |
Constructor Detail |
---|
public DirectedSubgraph(DirectedGraph<V,E> base, java.util.Set<V> vertexSubset, java.util.Set<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.Method Detail |
---|
public int inDegreeOf(V vertex)
DirectedGraph
inDegreeOf
in interface DirectedGraph<V,E>
vertex
- vertex whose degree is to be calculated.
DirectedGraph.inDegreeOf(Object)
public java.util.Set<E> incomingEdgesOf(V vertex)
DirectedGraph
incomingEdgesOf
in interface DirectedGraph<V,E>
vertex
- the vertex for which the list of incoming edges to be
returned.
DirectedGraph.incomingEdgesOf(Object)
public int outDegreeOf(V vertex)
DirectedGraph
outDegreeOf
in interface DirectedGraph<V,E>
vertex
- vertex whose degree is to be calculated.
DirectedGraph.outDegreeOf(Object)
public java.util.Set<E> outgoingEdgesOf(V vertex)
DirectedGraph
outgoingEdgesOf
in interface DirectedGraph<V,E>
vertex
- the vertex for which the list of outgoing edges to be
returned.
DirectedGraph.outgoingEdgesOf(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |