- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for numEdges (0.26 seconds)
-
android/guava/src/com/google/common/graph/Graphs.java
*/ public static <N> boolean hasCycle(Graph<N> graph) { int numEdges = graph.edges().size(); if (numEdges == 0) { return false; // An edge-free graph is acyclic by definition. } if (!graph.isDirected() && numEdges >= graph.nodes().size()) { return true; // Optimization for the undirected case: at least one cycle must exist. }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 01:10:31 GMT 2026 - 24.4K bytes - Click Count (0)