Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 143 for edge (0.01 sec)

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

      }
    
      // Node sets are the same, but edge sets differ.
      @Test
      public void equivalent_edgeSetsDiffer() {
        network.addEdge(N1, N2, E12);
    
        MutableNetwork<Integer, String> g2 = createNetwork(edgeType);
        g2.addEdge(N1, N2, E13);
    
        assertThat(network).isNotEqualTo(g2);
      }
    
      // Node/edge sets are the same, but node/edge connections differ due to edge type.
      @Test
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-19 18:03
    - 5.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/NetworkMutationTest.java

          // Number of edges remaining is unknown (node's incident edges have been removed).
          AbstractNetworkTest.validateNetwork(network);
    
          for (int i = numNodesToRemove; i < NUM_NODES; ++i) {
            assertThat(network.removeNode(nodeList.get(i))).isTrue();
          }
    
          assertThat(network.nodes()).isEmpty();
          assertThat(network.edges()).isEmpty(); // no edges can remain if there's no nodes
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-19 18:03
    - 4.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/UndirectedMultiNetworkConnections.java

          }
        };
      }
    
      @Override
      public @Nullable N removeInEdge(E edge, boolean isSelfLoop) {
        if (!isSelfLoop) {
          return removeOutEdge(edge);
        }
        return null;
      }
    
      @Override
      public N removeOutEdge(E edge) {
        N node = super.removeOutEdge(edge);
        Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
        if (adjacentNodes != null) {
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 3.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/graph/GraphMutationTest.java

          }
          Collections.shuffle(edgeList, gen);
          for (EndpointPair<Integer> edge : edgeList) {
            assertThat(graph.putEdge(edge.nodeU(), edge.nodeV())).isTrue();
          }
    
          assertThat(graph.nodes()).hasSize(NUM_NODES);
          assertThat(graph.edges()).hasSize(NUM_EDGES);
          AbstractGraphTest.validateGraph(graph);
        }
      }
    
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-19 18:03
    - 4.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/NetworkConnections.java

       *
       * <p>In the undirected case, returns {@code null} if {@code isSelfLoop} is true.
       */
      @CanIgnoreReturnValue
      @Nullable N removeInEdge(E edge, boolean isSelfLoop);
    
      /** Remove {@code edge} from the set of outgoing edges. Returns the former successor node. */
      @CanIgnoreReturnValue
      N removeOutEdge(E edge);
    
      /**
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 2.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/AbstractDirectedNetworkConnections.java

      }
    
      @Override
      public N adjacentNode(E edge) {
        // Since the reference node is defined to be 'source' for directed graphs,
        // we can assume this edge lives in the set of outgoing edges.
        // (We're relying on callers to call this method only with an edge that's in the graph.)
        return requireNonNull(outEdgeMap.get(edge));
      }
    
      @Override
      public N removeInEdge(E edge, boolean isSelfLoop) {
        if (isSelfLoop) {
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 4.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/graph/AbstractUndirectedNetworkConnections.java

        N previousNode = incidentEdgeMap.remove(edge);
        // We're relying on callers to call this method only with an edge that's in the graph.
        return requireNonNull(previousNode);
      }
    
      @Override
      public void addInEdge(E edge, N node, boolean isSelfLoop) {
        if (!isSelfLoop) {
          addOutEdge(edge, node);
        }
      }
    
      @Override
      public void addOutEdge(E edge, N node) {
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 2.7K bytes
    - Viewed (0)
  8. guava/src/com/google/common/graph/Network.java

      /**
       * Returns the nodes which are the endpoints of {@code edge} in this network.
       *
       * @throws IllegalArgumentException if {@code edge} is not an element of this network
       */
      EndpointPair<N> incidentNodes(E edge);
    
      /**
       * Returns a live view of the edges which have an {@link #incidentNodes(Object) incident node} in
       * common with {@code edge}. An edge is not considered adjacent to itself.
       *
    Registered: 2025-05-30 12:43
    - Last Modified: 2025-03-17 20:26
    - 22.3K bytes
    - Viewed (0)
  9. guava/src/com/google/common/graph/MutableValueGraph.java

       *
       * @return the value previously associated with the edge connecting {@code nodeU} to {@code
       *     nodeV}, or null if there was no such edge.
       * @throws IllegalArgumentException if the introduction of the edge would violate {@link
       *     #allowsSelfLoops()}
       */
      @CanIgnoreReturnValue
      @Nullable V putEdgeValue(N nodeU, N nodeV, V value);
    
      /**
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 4.3K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/AbstractUndirectedNetworkConnections.java

        N previousNode = incidentEdgeMap.remove(edge);
        // We're relying on callers to call this method only with an edge that's in the graph.
        return requireNonNull(previousNode);
      }
    
      @Override
      public void addInEdge(E edge, N node, boolean isSelfLoop) {
        if (!isSelfLoop) {
          addOutEdge(edge, node);
        }
      }
    
      @Override
      public void addOutEdge(E edge, N node) {
    Registered: 2025-05-30 12:43
    - Last Modified: 2024-12-22 03:38
    - 2.7K bytes
    - Viewed (0)
Back to top