(final Graph<N> graph)
| 425 | } |
| 426 | |
| 427 | private static <N> Map<N, Set<N>> nodeToAdjacentNodes(final Graph<N> graph) { |
| 428 | checkNotNull(graph, "graph"); |
| 429 | return Maps.asMap(graph.nodes(), new Function<N, Set<N>>() { |
| 430 | @Override |
| 431 | public Set<N> apply(N node) { |
| 432 | return graph.adjacentNodes(node); |
| 433 | } |
| 434 | }); |
| 435 | } |
| 436 | |
| 437 | /** |
| 438 | * Returns a function that transforms an edge into a string representation of its incident nodes |
no test coverage detected