Top Description Fields Constructors Methods
org.testng.internal

public Class Tarjan<T>

extends Object
Class Inheritance
Imports
java.util.ArrayDeque, .List, .Map, .Objects, org.testng.collections.Lists, .Maps

Implementation of the Tarjan algorithm to find and display a cycle in a graph.
Author
cbeust

Field Summary

Modifier and TypeField and Description
private List<T>
pack-priv int
pack-priv Map<T, Integer>
private final ArrayDeque<T>
pack-priv Map<T, Integer>

Constructor Summary

AccessConstructor and Description
public
Tarjan(Graph<T> graph, T start)

Method Summary

Modifier and TypeMethod and Description
public List<T>
private void
run(Graph<T> graph, T start)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_cycleback to summary
private List<T> m_cycle
m_indexback to summary
pack-priv int m_index
stackback to summary
private final ArrayDeque<T> stack
visitedNodesback to summary
pack-priv Map<T, Integer> visitedNodes

Constructor Detail

Tarjanback to summary
public Tarjan(Graph<T> graph, T start)

Method Detail

getCycleback to summary
public List<T> getCycle()
runback to summary
private void run(Graph<T> graph, T start)