/guava/android/guava/src/com/google/common/graph/Graphs.java
for ( N reachableNode : reachableNodes( graph, node) ) { for ( N node : graph.nodes( ) ) {
for ( N node : graph.nodes ( ) ) { for ( N reachableNode : reachableNodes ( graph, node ) ) {
} return false; } public static <N> Graph<N> transitiveClosure(Graph<N> graph) { MutableGraph<N> transitiveClosure = GraphBuilder.from(graph).allowsSelfLoops(true).build(); if (graph.isDirected()) { <extra_id_0> transitiveClosure.putEdge(node, reachableNode); } } } else { Set<N> visitedNodes = new HashSet<N>(); for (N node : graph.nodes()) {