Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for trees (0.18 sec)

  1. guava-tests/test/com/google/common/graph/TraverserTest.java

        Iterable<Character> result = Traverser.forGraph(TWO_TREES).depthFirstPreOrder('a');
    
        assertEqualCharNodes(result, "ab");
      }
    
      @Test
      public void forGraph_depthFirstPreOrderIterable_twoTrees() {
        assertEqualCharNodes(Traverser.forGraph(TWO_TREES).depthFirstPreOrder(charactersOf("a")), "ab");
        assertEqualCharNodes(
            Traverser.forGraph(TWO_TREES).depthFirstPreOrder(charactersOf("ac")), "abcd");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/graph/TraverserTest.java

        Iterable<Character> result = Traverser.forGraph(TWO_TREES).depthFirstPreOrder('a');
    
        assertEqualCharNodes(result, "ab");
      }
    
      @Test
      public void forGraph_depthFirstPreOrderIterable_twoTrees() {
        assertEqualCharNodes(Traverser.forGraph(TWO_TREES).depthFirstPreOrder(charactersOf("a")), "ab");
        assertEqualCharNodes(
            Traverser.forGraph(TWO_TREES).depthFirstPreOrder(charactersOf("ac")), "abcd");
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/Traverser.java

      public static <N> Traverser<N> forTree(SuccessorsFunction<N> tree) {
        if (tree instanceof BaseGraph) {
          checkArgument(((BaseGraph<?>) tree).isDirected(), "Undirected graphs can never be trees.");
        }
        if (tree instanceof Network) {
          checkArgument(((Network<?, ?>) tree).isDirected(), "Undirected networks can never be trees.");
        }
        return new Traverser<N>(tree) {
          @Override
          Traversal<N> newTraversal() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue May 30 20:12:45 GMT 2023
    - 19.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/TreeTraverser.java

    import java.util.Deque;
    import java.util.Iterator;
    import java.util.Queue;
    import javax.annotation.CheckForNull;
    
    /**
     * Views elements of a type {@code T} as nodes in a tree, and provides methods to traverse the trees
     * induced by this traverser.
     *
     * <p>For example, the tree
     *
     * <pre>{@code
     *        h
     *      / | \
     *     /  e  \
     *    d       g
     *   /|\      |
     *  / | \     f
     * a  b  c
     * }</pre>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/collect/TreeTraverserTest.java

      static final Tree c = new Tree('c');
      static final Tree d = new Tree('d', a, b, c);
      static final Tree e = new Tree('e');
      static final Tree f = new Tree('f');
      static final Tree g = new Tree('g', f);
      static final Tree h = new Tree('h', d, e, g);
    
      static String iterationOrder(Iterable<? extends Node> iterable) {
        StringBuilder builder = new StringBuilder();
        for (Node t : iterable) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

        tree.put("tree", 3);
        assertThat(tree.keySet()).containsExactly("tree", "google").inOrder();
        assertThat(tree.get("google")).containsExactly(6, 2).inOrder();
    
        TreeMultimap<String, Integer> copy = TreeMultimap.create(tree);
        assertEquals(tree, copy);
        assertThat(copy.keySet()).containsExactly("google", "tree").inOrder();
        assertThat(copy.get("google")).containsExactly(2, 6).inOrder();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

      }
    
      private class ThreadedService extends AbstractService {
        final CountDownLatch hasConfirmedIsRunning = new CountDownLatch(1);
    
        /*
         * The main test thread tries to stop() the service shortly after
         * confirming that it is running. Meanwhile, the service itself is trying
         * to confirm that it is running. If the main thread's stop() call happens
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/Throwables.java

      }
    
      /**
       * Returns the Method that can be used to return the size of a stack, or null if that method
       * cannot be found (it is only to be found in fairly recent JDKs). Tries to test method {@link
       * sun.misc.JavaLangAccess#getStackTraceDepth(Throwable) getStackTraceDepth} prior to return it
       * (might fail some JDKs).
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Throwables.java

      }
    
      /**
       * Returns the Method that can be used to return the size of a stack, or null if that method
       * cannot be found (it is only to be found in fairly recent JDKs). Tries to test method {@link
       * sun.misc.JavaLangAccess#getStackTraceDepth(Throwable) getStackTraceDepth} prior to return it
       * (might fail some JDKs).
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/TreeMultiset.java

            if (result == 0) {
              return count(getElement());
            } else {
              return result;
            }
          }
        };
      }
    
      /** Returns the first node in the tree that is in range. */
      @CheckForNull
      private AvlNode<E> firstNode() {
        AvlNode<E> root = rootReference.get();
        if (root == null) {
          return null;
        }
        AvlNode<E> node;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
Back to top