Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for putEdgeValue (0.16 sec)

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

          }
        }
      }
    
      @Test
      public void directedGraph() {
        graph = ValueGraphBuilder.directed().allowsSelfLoops(true).build();
        graph.putEdgeValue(1, 2, "valueA");
        graph.putEdgeValue(2, 1, "valueB");
        graph.putEdgeValue(2, 3, "valueC");
        graph.putEdgeValue(4, 4, "valueD");
    
        assertThat(graph.edgeValueOrDefault(1, 2, null)).isEqualTo("valueA");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 17.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/ValueGraphTest.java

          }
        }
      }
    
      @Test
      public void directedGraph() {
        graph = ValueGraphBuilder.directed().allowsSelfLoops(true).build();
        graph.putEdgeValue(1, 2, "valueA");
        graph.putEdgeValue(2, 1, "valueB");
        graph.putEdgeValue(2, 3, "valueC");
        graph.putEdgeValue(4, 4, "valueD");
    
        assertThat(graph.edgeValueOrDefault(1, 2, null)).isEqualTo("valueA");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 06 18:35:19 UTC 2024
    - 20K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/ImmutableValueGraph.java

       *     ValueGraphBuilder.undirected()
       *         .<City, Distance>immutable()
       *         .putEdgeValue(PARIS, BERLIN, kilometers(1060))
       *         .putEdgeValue(PARIS, BRUSSELS, kilometers(317))
       *         .putEdgeValue(BERLIN, BRUSSELS, kilometers(764))
       *         .addNode(REYKJAVIK)
       *         .build();
       * }</pre>
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

        ImmutableValueGraph<Integer, String> graph =
            ValueGraphBuilder.directed()
                .<Integer, String>immutable()
                .putEdgeValue(2, 1, "2-1")
                .putEdgeValue(2, 3, "2-3")
                .putEdgeValue(1, 2, "1-2")
                .build();
    
        assertThat(graph.incidentEdges(2))
            .containsExactly(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/graph/GraphsTest.java

        directedGraph.putEdgeValue(N1, N1, E11);
        directedGraph.putEdgeValue(N3, N4, E34);
    
        MutableValueGraph<Integer, String> expectedTranspose =
            ValueGraphBuilder.directed().allowsSelfLoops(true).build();
        expectedTranspose.putEdgeValue(N3, N1, E13);
        expectedTranspose.putEdgeValue(N1, N3, E31);
        expectedTranspose.putEdgeValue(N2, N1, E12);
        expectedTranspose.putEdgeValue(N1, N1, E11);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/ValueGraphBuilder.java

     * // Building a mutable value graph
     * MutableValueGraph<String, Double> graph =
     *     ValueGraphBuilder.undirected().allowsSelfLoops(true).build();
     * graph.putEdgeValue("San Francisco", "San Francisco", 0.0);
     * graph.putEdgeValue("San Jose", "San Jose", 0.0);
     * graph.putEdgeValue("San Francisco", "San Jose", 48.4);
     *
     * // Building an immutable value graph
     * ImmutableValueGraph<String, Double> immutableGraph =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 03 01:21:31 UTC 2022
    - 8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

        ImmutableValueGraph<Integer, String> graph =
            ValueGraphBuilder.directed()
                .<Integer, String>immutable()
                .putEdgeValue(2, 1, "2-1")
                .putEdgeValue(2, 3, "2-3")
                .putEdgeValue(1, 2, "1-2")
                .build();
    
        assertThat(graph.incidentEdges(2))
            .containsExactly(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/graph/ImmutableValueGraph.java

       *     ValueGraphBuilder.undirected()
       *         .<City, Distance>immutable()
       *         .putEdgeValue(PARIS, BERLIN, kilometers(1060))
       *         .putEdgeValue(PARIS, BRUSSELS, kilometers(317))
       *         .putEdgeValue(BERLIN, BRUSSELS, kilometers(764))
       *         .addNode(REYKJAVIK)
       *         .build();
       * }</pre>
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  9. guava/src/com/google/common/graph/MutableValueGraph.java

       * @throws IllegalArgumentException if the introduction of the edge would violate {@link
       *     #allowsSelfLoops()}
       */
      @CanIgnoreReturnValue
      @CheckForNull
      V putEdgeValue(N nodeU, N nodeV, V value);
    
      /**
       * Adds an edge connecting {@code endpoints} if one is not already present, and sets a value for
       * that edge to {@code value} (overwriting the existing value, if any).
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 4.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/graph/StandardMutableGraph.java

      }
    
      @Override
      public boolean addNode(N node) {
        return backingValueGraph.addNode(node);
      }
    
      @Override
      public boolean putEdge(N nodeU, N nodeV) {
        return backingValueGraph.putEdgeValue(nodeU, nodeV, Presence.EDGE_EXISTS) == null;
      }
    
      @Override
      public boolean putEdge(EndpointPair<N> endpoints) {
        validateEndpoints(endpoints);
        return putEdge(endpoints.nodeU(), endpoints.nodeV());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 2.4K bytes
    - Viewed (0)
Back to top