public class TarjanGraphSearch<V extends Vertex,E extends Edge<V>> extends java.lang.Object implements GraphSearch<V,E>
Modifier and Type | Class and Description |
---|---|
static class |
TarjanGraphSearch.SccResult<V extends Vertex,E extends Edge<V>>
Graph search result augmented with SCC vertexData.
|
GraphSearch.Result<V extends Vertex,E extends Edge<V>>
Constructor and Description |
---|
TarjanGraphSearch() |
Modifier and Type | Method and Description |
---|---|
TarjanGraphSearch.SccResult<V,E> |
search(Graph<V,E> graph,
EdgeWeigher<V,E> weigher)
Searches the specified graph.
|
public TarjanGraphSearch.SccResult<V,E> search(Graph<V,E> graph, EdgeWeigher<V,E> weigher)
This implementation produces results augmented with information on SCCs within the graph.
To prevent traversal of an edge, the EdgeWeigher.weight(E)
should
return a negative value as an edge weigher.
search
in interface GraphSearch<V extends Vertex,E extends Edge<V>>
graph
- graph to be searchedweigher
- optional edge-weigher; if null, DefaultEdgeWeigher
will be used (assigns equal weights to all links)