- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for breadthFirst (0.09 seconds)
-
android/guava/src/com/google/common/graph/Traverser.java
* Iterables.limit(Traverser.forGraph(graph).breadthFirst(node), maxNumberOfNodes); * } * * <p>See <a href="https://en.wikipedia.org/wiki/Breadth-first_search">Wikipedia</a> for more * info. * * @throws IllegalArgumentException if {@code startNode} is not an element of the graph */ public final Iterable<N> breadthFirst(N startNode) { return breadthFirst(ImmutableSet.of(startNode)); } /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 11 01:10:31 GMT 2026 - 19.3K bytes - Click Count (0) -
android/guava/src/com/google/common/graph/Graphs.java
switch (strategy) { case ADD_SELF_LOOPS_ALWAYS: // always include 'node' return traverser.breadthFirst(node); case ADD_SELF_LOOPS_FOR_CYCLES: // include 'node' iff there's an incident cycle // note that if 'node' has a self-loop, it will appear in its successors return traverser.breadthFirst(graph.successors(node)); } throw new IllegalArgumentException("Unrecognized strategy: " + strategy); }
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)