Skip to content

Commit

Permalink
[JENKINS-17247] Not sure why the compilation is failing but this seem…
Browse files Browse the repository at this point in the history
…s to work

(cherry picked from commit 0ee7a5e)
  • Loading branch information
kohsuke authored and olivergondza committed Sep 23, 2013
1 parent 91cf8bc commit 8097aac
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions core/src/main/java/jenkins/util/DirectedGraph.java
Expand Up @@ -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));
Expand Down

0 comments on commit 8097aac

Please sign in to comment.