Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 69 for allowsSelfLoops (0.3 sec)

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

        Random gen = new Random(42); // Fixed seed so test results are deterministic.
    
        for (int trial = 0; trial < NUM_TRIALS; ++trial) {
          MutableGraph<Integer> graph = graphBuilder.allowsSelfLoops(true).build();
    
          assertThat(graph.nodes()).isEmpty();
          assertThat(graph.edges()).isEmpty();
          AbstractGraphTest.validateGraph(graph);
    
          while (graph.nodes().size() < NUM_NODES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 18 16:17:46 UTC 2017
    - 4.2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/graph/AbstractGraphBuilder.java

     *
     * @author James Sexton
     */
    @ElementTypesAreNonnullByDefault
    abstract class AbstractGraphBuilder<N> {
      final boolean directed;
      boolean allowsSelfLoops = false;
      ElementOrder<N> nodeOrder = ElementOrder.insertion();
      ElementOrder<N> incidentEdgeOrder = ElementOrder.unordered();
    
      Optional<Integer> expectedNodeCount = Optional.absent();
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 1.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/graph/ImmutableGraph.java

         *
         * @return this {@code Builder} object
         * @throws IllegalArgumentException if the introduction of the edge would violate {@link
         *     #allowsSelfLoops()}
         */
        @CanIgnoreReturnValue
        public Builder<N> putEdge(N nodeU, N nodeV) {
          mutableGraph.putEdge(nodeU, nodeV);
          return this;
        }
    
        /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/ImmutableValueGraph.java

         *
         * @return this {@code Builder} object
         * @throws IllegalArgumentException if the introduction of the edge would violate {@link
         *     #allowsSelfLoops()}
         */
        @CanIgnoreReturnValue
        public ImmutableValueGraph.Builder<N, V> putEdgeValue(N nodeU, N nodeV, V value) {
          mutableValueGraph.putEdgeValue(nodeU, nodeV, value);
          return this;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/MutableNetwork.java

       *     connect {@code nodeU} to {@code nodeV}
       * @throws IllegalArgumentException if the introduction of the edge would violate {@link
       *     #allowsParallelEdges()} or {@link #allowsSelfLoops()}
       */
      @CanIgnoreReturnValue
      boolean addEdge(N nodeU, N nodeV, E edge);
    
      /**
       * Adds {@code edge} connecting {@code endpoints}. In an undirected network, {@code edge} will
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/StandardMutableNetwork.java

              PARALLEL_EDGES_NOT_ALLOWED,
              nodeU,
              nodeV);
        }
        boolean isSelfLoop = nodeU.equals(nodeV);
        if (!allowsSelfLoops()) {
          checkArgument(!isSelfLoop, SELF_LOOPS_NOT_ALLOWED, nodeU);
        }
    
        if (connectionsU == null) {
          connectionsU = addNodeInternal(nodeU);
        }
        connectionsU.addOutEdge(edge, nodeV);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/ValueGraphTest.java

        assertThat(graph.incidentEdgeOrder()).isEqualTo(asGraph.incidentEdgeOrder());
        assertThat(graph.isDirected()).isEqualTo(asGraph.isDirected());
        assertThat(graph.allowsSelfLoops()).isEqualTo(asGraph.allowsSelfLoops());
    
        for (Integer node : graph.nodes()) {
          assertThat(graph.adjacentNodes(node)).isEqualTo(asGraph.adjacentNodes(node));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 17.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/ValueGraphTest.java

        assertThat(graph.incidentEdgeOrder()).isEqualTo(asGraph.incidentEdgeOrder());
        assertThat(graph.isDirected()).isEqualTo(asGraph.isDirected());
        assertThat(graph.allowsSelfLoops()).isEqualTo(asGraph.allowsSelfLoops());
    
        for (Integer node : graph.nodes()) {
          assertThat(graph.adjacentNodes(node)).isEqualTo(asGraph.adjacentNodes(node));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 06 18:35:19 UTC 2024
    - 20K bytes
    - Viewed (0)
  9. guava/src/com/google/common/graph/GraphConstants.java

      static final String SELF_LOOPS_NOT_ALLOWED =
          "Cannot add self-loop edge on node %s, as self-loops are not allowed. To construct a graph "
              + "that allows self-loops, call allowsSelfLoops(true) on the Builder.";
      static final String NOT_AVAILABLE_ON_UNDIRECTED =
          "Cannot call source()/target() on a EndpointPair from an undirected graph. Consider calling "
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/graph/GraphMutationTest.java

        Random gen = new Random(42); // Fixed seed so test results are deterministic.
    
        for (int trial = 0; trial < NUM_TRIALS; ++trial) {
          MutableGraph<Integer> graph = graphBuilder.allowsSelfLoops(true).build();
    
          assertThat(graph.nodes()).isEmpty();
          assertThat(graph.edges()).isEmpty();
          AbstractGraphTest.validateGraph(graph);
    
          while (graph.nodes().size() < NUM_NODES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 18 16:17:46 UTC 2017
    - 4.2K bytes
    - Viewed (0)
Back to top