public boolean hasCycles(DirectedGraph<T> graph) { for (Vertex<T> vertex : graph.getVertices()) { if (isCycle(graph, vertex)) { return true; } } return false; }
public boolean hasCycles(DirectedGraph<T> graph) { for (Vertex<T> vertex : graph.getVertices()) { if (isCycle(graph, vertex)) { return true; } } return false; }
public boolean hasCycles(DirectedGraph<T> graph) { for (Vertex<T> vertex : graph.getVertices()) { if (isCycle(graph, vertex)) { return true; } } return false; }