@Test public void basic() { graph = new AdjacencyListsGraph<>(vertexes(), edges()); TarjanGraphSearch<TestVertex, TestEdge> gs = new TarjanGraphSearch<>(); SccResult<TestVertex, TestEdge> result = gs.search(graph, null); validate(result, 6); }
@Override public SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) { SccResult<V, E> result = new SccResult<>(graph); for (V vertex : graph.getVertexes()) { VertexData data = result.data(vertex); if (data == null) { connect(graph, vertex, weight, result); } } return result.build(); }
TarjanGraphSearch implements GraphSearch<V, E> { @Override public SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) { SccResult<V, E> result = new SccResult<>(graph); for (V vertex : graph.getVertexes()) { VertexData data = result.data(vertex); if (data == null) { connect(graph, vertex, weight, result); } } return result.build(); } }
TarjanGraphSearch implements GraphSearch<V, E> { @Override public SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) { SccResult<V, E> result = new SccResult<>(graph); for (V vertex : graph.getVertexes()) { VertexData data = result.data(vertex); if (data == null) { connect(graph, vertex, weight, result); } } return result.build(); }  }
TarjanGraphSearch implements GraphSearch<V, E> { @Override public SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) { SccResult<V, E> result = new SccResult<>(graph); for (V vertex : graph.getVertexes()) { VertexData data = result.data(vertex); if (data == null) { connect(graph, vertex, weight, result); } } return result.build(); }  @Override SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight); }
TarjanGraphSearch implements GraphSearch<V, E> { @Override public SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight) { SccResult<V, E> result = new SccResult<>(graph); for (V vertex : graph.getVertexes()) { VertexData data = result.data(vertex); if (data == null) { connect(graph, vertex, weight, result); } } return result.build(); }  @Override SccResult<V, E> search(Graph<V, E> graph, EdgeWeight<V, E> weight);  }