NODE
- identifier for a node in the graphpublic abstract class AbstractTarjan<NODE> extends Object implements Tarjan<NODE>
Adjacency
.Modifier | Constructor and Description |
---|---|
protected |
AbstractTarjan(boolean ignoreSingleton) |
Modifier and Type | Method and Description |
---|---|
List<List<NODE>> |
executeTarjan(Adjacency<NODE> graph)
Create the strongly connected components for the given graph.
|
protected abstract int |
getIndex(NODE n) |
protected abstract int |
getLowlink(NODE n) |
protected boolean |
isInStack(Stack<NODE> stack,
NODE n)
Check: is the NODE n in the given stack
WARNING: This is currently an inefficient implementation. |
protected abstract boolean |
notEquals(NODE n1,
NODE n2) |
protected abstract void |
setIndex(NODE n,
int index) |
protected abstract void |
setLowlink(NODE n,
int lowlink) |
protected AbstractTarjan(boolean ignoreSingleton)
ignoreSingleton
- public final List<List<NODE>> executeTarjan(Adjacency<NODE> graph)
Tarjan
executeTarjan
in interface Tarjan<NODE>
protected abstract void setIndex(NODE n, int index)
protected abstract int getIndex(NODE n)
protected abstract void setLowlink(NODE n, int lowlink)
protected abstract int getLowlink(NODE n)
Copyright © 2010–2016. All rights reserved.