Skip to content
Permalink
Browse files

[JENKINS-17247] Not sure why the compilation is failing but this seem…

…s to work

(cherry picked from commit 0ee7a5e)
  • Loading branch information...
kohsuke authored and olivergondza committed Jun 20, 2013
1 parent 91cf8bc commit 8097aac90687990d1ddd4f0b2ab85d61de92a808
Showing with 26 additions and 26 deletions.
  1. +26 −26 core/src/main/java/jenkins/util/DirectedGraph.java
@@ -62,38 +62,38 @@ public int size() {
}

/**
* Performs the Tarjan's algorithm and computes strongly-connected components from the
* sink to source order.
*
* See http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm
* Node of the cyclic graph, which is primarily {@link N} but with additional
* data structures needed for the Tarjan's algorithm.
*/
public List<SCC<N>> getStronglyConnectedComponents() {
class Node {
final N n;
/**
* Node of the cyclic graph, which is primarily {@link N} but with additional
* data structures needed for the Tarjan's algorithm.
* DFS visit order.
*/
class Node {
final N n;
/**
* DFS visit order.
*/
int index = -1;
/**
* The smallest index of any nodes reachable from this node transitively.
*/
int lowlink;
int index = -1;
/**
* The smallest index of any nodes reachable from this node transitively.
*/
int lowlink;

SCC scc;
SCC scc;

Node(N n) {
this.n = n;
}

Collection<N> edges() {
return forward(n);
}
Node(N n) {
this.n = n;
}

Collection<N> edges() {
return forward(n);
}

}

/**
* Performs the Tarjan's algorithm and computes strongly-connected components from the
* sink to source order.
*
* See http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm
*/
public List<SCC<N>> getStronglyConnectedComponents() {
final Map<N, Node> nodes = new HashMap<N, Node>();
for (N n : nodes()) {
nodes.put(n,new Node(n));

0 comments on commit 8097aac

Please sign in to comment.
You can’t perform that action at this time.