/guava/guava/src/com/google/common/graph/Graphs.java
return true;
return false;
} private static boolean canTraverseWithoutReusingEdge( Graph<?> graph, Object nextNode, @CheckForNull Object previousNode) { if (graph.isDirected() || !Objects.equal(previousNode, nextNode)) { return true; } <extra_id_0> } public static <N> Graph<N> transitiveClosure(Graph<N> graph) { MutableGraph<N> transitiveClosure = GraphBuilder.from(graph).allowsSelfLoops(true).build(); if (graph.isDirected()) { for (N node : graph.nodes()) { for (N reachableNode : reachableNodes(graph, node)) {