Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for adjacentNode (0.24 sec)

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

      }
    
      @Override
      @Test
      public void adjacentNodes_checkReturnedSetMutability() {
        addNode(N1);
        Set<Integer> adjacentNodes = network.adjacentNodes(N1);
        UnsupportedOperationException e =
            assertThrows(UnsupportedOperationException.class, () -> adjacentNodes.add(N2));
        addEdge(N1, N2, E12);
        assertThat(network.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes);
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 18.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/AbstractStandardUndirectedNetworkTest.java

      }
    
      @Override
      @Test
      public void adjacentNodes_checkReturnedSetMutability() {
        addNode(N1);
        Set<Integer> adjacentNodes = network.adjacentNodes(N1);
        UnsupportedOperationException e =
            assertThrows(UnsupportedOperationException.class, () -> adjacentNodes.add(N2));
        addEdge(N1, N2, E12);
        assertThat(network.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes);
      }
    
      @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/GraphConstants.java

      static final String NOT_AVAILABLE_ON_UNDIRECTED =
          "Cannot call source()/target() on a EndpointPair from an undirected graph. Consider calling "
              + "adjacentNode(node) if you already have a node, or nodeU()/nodeV() if you don't.";
      static final String EDGE_ALREADY_EXISTS = "Edge %s already exists in the graph.";
      static final String ENDPOINTS_MISMATCH =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/StandardNetwork.java

        N nodeV = requireNonNull(nodeConnections.get(nodeU)).adjacentNode(edge);
        return EndpointPair.of(this, nodeU, nodeV);
      }
    
      @Override
      public Set<N> adjacentNodes(N node) {
        return nodeInvalidatableSet(checkedConnections(node).adjacentNodes(), node);
      }
    
      @Override
      public Set<E> edgesConnecting(N nodeU, N nodeV) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/AbstractNetwork.java

          }
    
          @Override
          public boolean allowsSelfLoops() {
            return AbstractNetwork.this.allowsSelfLoops();
          }
    
          @Override
          public Set<N> adjacentNodes(N node) {
            return AbstractNetwork.this.adjacentNodes(node);
          }
    
          @Override
          public Set<N> predecessors(N node) {
            return AbstractNetwork.this.predecessors(node);
          }
    
          @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/ImmutableNetwork.java

        return (E edge) -> network.incidentNodes(edge).target();
      }
    
      private static <N, E> Function<E, N> adjacentNodeFn(Network<N, E> network, N node) {
        return (E edge) -> network.incidentNodes(edge).adjacentNode(node);
      }
    
      /**
       * A builder for creating {@link ImmutableNetwork} instances, especially {@code static final}
       * networks. Example:
       *
       * <pre>{@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/graph/Graphs.java

        for (N node : nodes) {
          subgraph.addNode(node);
        }
        for (N node : subgraph.nodes()) {
          for (E edge : network.outEdges(node)) {
            N successorNode = network.incidentNodes(edge).adjacentNode(node);
            if (subgraph.nodes().contains(successorNode)) {
              subgraph.addEdge(node, successorNode, edge);
            }
          }
        }
        return subgraph;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/graph/UndirectedMultiNetworkConnections.java

      @Override
      public Set<N> adjacentNodes() {
        return Collections.unmodifiableSet(adjacentNodesMultiset().elementSet());
      }
    
      private Multiset<N> adjacentNodesMultiset() {
        Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
        if (adjacentNodes == null) {
          adjacentNodes = HashMultiset.create(incidentEdgeMap.values());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 3.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java

      }
    
      @Override
      @Test
      public void adjacentNodes_checkReturnedSetMutability() {
        assume().that(graphIsMutable()).isTrue();
    
        addNode(N1);
        Set<Integer> adjacentNodes = graph.adjacentNodes(N1);
        UnsupportedOperationException e =
            assertThrows(UnsupportedOperationException.class, () -> adjacentNodes.add(N2));
        putEdge(N1, N2);
        assertThat(graph.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/UndirectedGraphConnections.java

      }
    
      @Override
      public Set<N> adjacentNodes() {
        return Collections.unmodifiableSet(adjacentNodeValues.keySet());
      }
    
      @Override
      public Set<N> predecessors() {
        return adjacentNodes();
      }
    
      @Override
      public Set<N> successors() {
        return adjacentNodes();
      }
    
      @Override
      public Iterator<EndpointPair<N>> incidentEdgeIterator(N thisNode) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 3.3K bytes
    - Viewed (0)
Back to top