Package org.jgrapht.graph
Class DirectedWeightedSubgraph<V,E>
- java.lang.Object
-
- org.jgrapht.graph.AbstractGraph<V,E>
-
- org.jgrapht.graph.Subgraph<V,E,DirectedGraph<V,E>>
-
- org.jgrapht.graph.DirectedSubgraph<V,E>
-
- org.jgrapht.graph.DirectedWeightedSubgraph<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
java.io.Serializable
,DirectedGraph<V,E>
,Graph<V,E>
,WeightedGraph<V,E>
public class DirectedWeightedSubgraph<V,E> extends DirectedSubgraph<V,E> implements WeightedGraph<V,E>
A directed weighted graph that is a subgraph of another graph.- See Also:
Subgraph
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Fields inherited from interface org.jgrapht.WeightedGraph
DEFAULT_EDGE_WEIGHT
-
-
Constructor Summary
Constructors Constructor Description DirectedWeightedSubgraph(WeightedGraph<V,E> base)
Creates a new weighted directed induced subgraph with all vertices included.DirectedWeightedSubgraph(WeightedGraph<V,E> base, java.util.Set<? extends V> vertexSubset)
Creates a new weighted directed induced subgraph.DirectedWeightedSubgraph(WeightedGraph<V,E> base, java.util.Set<? extends V> vertexSubset, java.util.Set<? extends E> edgeSubset)
Creates a new weighted directed subgraph.
-
Method Summary
-
Methods inherited from class org.jgrapht.graph.DirectedSubgraph
incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf
-
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, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
Methods inherited from interface org.jgrapht.WeightedGraph
setEdgeWeight
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DirectedWeightedSubgraph
public DirectedWeightedSubgraph(WeightedGraph<V,E> base, java.util.Set<? extends V> vertexSubset, java.util.Set<? extends E> edgeSubset)
Creates a new weighted directed subgraph.- Parameters:
base
- the base (backing) graph on which the subgraph will be based.vertexSubset
- vertices to include in the subgraph. Ifnull
then all vertices are included.edgeSubset
- edges to in include in the subgraph. Ifnull
then all the edges whose vertices found in the graph are included.
-
DirectedWeightedSubgraph
public DirectedWeightedSubgraph(WeightedGraph<V,E> base, java.util.Set<? extends V> vertexSubset)
Creates a new weighted directed induced subgraph.- Parameters:
base
- the base (backing) graph on which the subgraph will be based.vertexSubset
- vertices to include in the subgraph. Ifnull
then all vertices are included.
-
DirectedWeightedSubgraph
public DirectedWeightedSubgraph(WeightedGraph<V,E> base)
Creates a new weighted directed induced subgraph with all vertices included.- Parameters:
base
- the base (backing) graph on which the subgraph will be based.
-
-