Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for putEdge (0.11 sec)

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

       * <p>Note that the edges are added in a shuffled order to properly test the effect of the
       * insertion order.
       */
      private void populateTShapedGraph() {
        putEdge(2, 1);
        putEdge(1, 4);
        putEdge(1, 3);
        putEdge(1, 2); // Duplicate
        putEdge(4, 5);
      }
    
      // Element Mutation
    
      @Test
      public void putEdge_existingNodes() {
        assume().that(graphIsMutable()).isTrue();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/GraphsTest.java

        undirectedGraph.putEdge(N2, N3);
        undirectedGraph.putEdge(N3, N4);
    
        MutableGraph<Integer> expectedClosure = GraphBuilder.undirected().allowsSelfLoops(true).build();
        expectedClosure.putEdge(N1, N1);
        expectedClosure.putEdge(N1, N2);
        expectedClosure.putEdge(N1, N3);
        expectedClosure.putEdge(N1, N4);
        expectedClosure.putEdge(N2, N2);
        expectedClosure.putEdge(N2, N3);
        expectedClosure.putEdge(N2, N4);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java

       * <p>Note that the edges are added in a shuffled order to properly test the effect of the
       * insertion order.
       */
      private void populateTShapedGraph() {
        putEdge(2, 1);
        putEdge(1, 4);
        putEdge(1, 3);
        putEdge(1, 2); // Duplicate
        putEdge(4, 5);
      }
    
      // Element Mutation
    
      @Test
      public void putEdge_existingNodes() {
        assume().that(graphIsMutable()).isTrue();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

        assume().that(graphIsMutable()).isTrue();
    
        putEdge(N1, N2);
        putEdge(N1, N3);
        putEdge(N1, N4);
        assertThat(graphAsMutableGraph.removeEdge(N1, N3)).isTrue();
        assertThat(graph.adjacentNodes(N1)).containsExactly(N2, N4);
      }
    
      @Test
      public void removeEdge_nodeNotPresent() {
        assume().that(graphIsMutable()).isTrue();
    
        putEdge(N1, N2);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/graph/TraverserTest.java

        MutableGraph<String> graph = GraphBuilder.directed().build();
        graph.putEdge("a", "b");
    
        Traverser.forTree(graph); // Does not throw
      }
    
      @Test
      public void forTree_withUndirectedGraph_throws() throws Exception {
        MutableGraph<String> graph = GraphBuilder.undirected().build();
        graph.putEdge("a", "b");
    
        assertThrows(IllegalArgumentException.class, () -> Traverser.forTree(graph));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/graph/TraverserTest.java

        MutableGraph<String> graph = GraphBuilder.directed().build();
        graph.putEdge("a", "b");
    
        Traverser.forTree(graph); // Does not throw
      }
    
      @Test
      public void forTree_withUndirectedGraph_throws() throws Exception {
        MutableGraph<String> graph = GraphBuilder.undirected().build();
        graph.putEdge("a", "b");
    
        assertThrows(IllegalArgumentException.class, () -> Traverser.forTree(graph));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/AbstractNetworkTest.java

            }
          }
    
          for (E outEdge : sanityCheckSet(network.outEdges(node))) {
            assertThat(network.incidentEdges(node)).contains(outEdge);
            assertThat(network.inEdges(network.incidentNodes(outEdge).adjacentNode(node)))
                .contains(outEdge);
            if (network.isDirected()) {
              assertThat(network.incidentNodes(outEdge).source()).isEqualTo(node);
            }
          }
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 32.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

            assertThat(endpointPair.source()).isEqualTo(endpointPair.adjacentNode(node));
            assertThat(endpointPair.target()).isEqualTo(node);
          }
    
          for (String outEdge : network.outEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(outEdge);
            assertThat(endpointPair.source()).isEqualTo(node);
            assertThat(endpointPair.target()).isEqualTo(endpointPair.adjacentNode(node));
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

            assertThat(endpointPair.source()).isEqualTo(endpointPair.adjacentNode(node));
            assertThat(endpointPair.target()).isEqualTo(node);
          }
    
          for (String outEdge : network.outEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(outEdge);
            assertThat(endpointPair.source()).isEqualTo(node);
            assertThat(endpointPair.target()).isEqualTo(endpointPair.adjacentNode(node));
          }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

            }
    
            orderedNodeConnectionsBuilder.add(new NodeConnection.Pred<>(predecessor));
            predecessorCount++;
          } else { // incidentEdge is an outEdge
            checkArgument(incidentEdge.nodeU().equals(thisNode));
    
            N successor = incidentEdge.nodeV();
            V value = successorNodeToValueFn.apply(successor);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 18K bytes
    - Viewed (0)
Back to top