Package edu.umd.cs.findbugs.graph
Class DepthFirstSearch<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>>
- java.lang.Object
-
- edu.umd.cs.findbugs.graph.AbstractDepthFirstSearch<GraphType,EdgeType,VertexType>
-
- edu.umd.cs.findbugs.graph.DepthFirstSearch<GraphType,EdgeType,VertexType>
-
- All Implemented Interfaces:
DFSEdgeTypes
- Direct Known Subclasses:
DepthFirstSearch
public class DepthFirstSearch<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>> extends AbstractDepthFirstSearch<GraphType,EdgeType,VertexType>
Perform a forward depth first search of a graph.- Author:
- David Hovemeyer
- See Also:
Graph
,AbstractDepthFirstSearch
-
-
Field Summary
-
Fields inherited from class edu.umd.cs.findbugs.graph.AbstractDepthFirstSearch
BLACK, DEBUG, GRAY, WHITE
-
Fields inherited from interface edu.umd.cs.findbugs.graph.DFSEdgeTypes
BACK_EDGE, CROSS_EDGE, FORWARD_EDGE, TREE_EDGE, UNKNOWN_EDGE
-
-
Constructor Summary
Constructors Constructor Description DepthFirstSearch(GraphType graph)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected VertexType
getSource(EdgeType edge)
Get "logical" source of edge.protected VertexType
getTarget(EdgeType edge)
Get "logical" target of edge.protected java.util.Iterator<EdgeType>
outgoingEdgeIterator(GraphType graph, VertexType vertex)
Get Iterator over "logical" outgoing edges.-
Methods inherited from class edu.umd.cs.findbugs.graph.AbstractDepthFirstSearch
containsCycle, getColor, getDFSEdgeType, getDiscoveryTime, getFinishTime, getFinishTimeList, getNextSearchTreeRoot, search, setSearchTreeCallback, setVertexChooser, topologicalSortIterator, unvisitedVertices, visitMe
-
-
-
-
Constructor Detail
-
DepthFirstSearch
public DepthFirstSearch(GraphType graph)
Constructor.- Parameters:
graph
- the graph to perform a depth first search of
-
-
Method Detail
-
outgoingEdgeIterator
protected java.util.Iterator<EdgeType> outgoingEdgeIterator(GraphType graph, VertexType vertex)
Description copied from class:AbstractDepthFirstSearch
Get Iterator over "logical" outgoing edges.- Specified by:
outgoingEdgeIterator
in classAbstractDepthFirstSearch<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>>
-
getTarget
protected VertexType getTarget(EdgeType edge)
Description copied from class:AbstractDepthFirstSearch
Get "logical" target of edge.- Specified by:
getTarget
in classAbstractDepthFirstSearch<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>>
-
getSource
protected VertexType getSource(EdgeType edge)
Description copied from class:AbstractDepthFirstSearch
Get "logical" source of edge.- Specified by:
getSource
in classAbstractDepthFirstSearch<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>>
-
-