Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 29 for adjacentNode (0.08 seconds)

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

        assume().that(graphIsMutable()).isTrue();
    
        addNode(N1);
        Set<Integer> adjacentNodes = network.adjacentNodes(N1);
        assertThrows(UnsupportedOperationException.class, () -> adjacentNodes.add(N2));
        addEdge(N1, N2, E12);
        assertThat(network.adjacentNodes(N1)).containsExactlyElementsIn(adjacentNodes);
      }
    
      @Override
      public void adjacentEdges_checkReturnedSetMutability() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 30 17:09:51 GMT 2025
    - 21.3K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/graph/AbstractStandardUndirectedNetworkTest.java

              .addEqualityGroup(
                  network.predecessors(node), network.successors(node), network.adjacentNodes(node))
              .testEquals();
    
          for (Integer adjacentNode : network.adjacentNodes(node)) {
            assertThat(network.edgesConnecting(node, adjacentNode))
                .containsExactlyElementsIn(network.edgesConnecting(adjacentNode, node));
          }
        }
      }
    
      @Override
      @Test
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 30 17:09:51 GMT 2025
    - 18.6K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

          }
    
          for (N adjacentNode : sanityCheckSet(graph.adjacentNodes(node))) {
            if (!graph.allowsSelfLoops()) {
              assertThat(node).isNotEqualTo(adjacentNode);
            }
            assertThat(
                    graph.predecessors(node).contains(adjacentNode)
                        || graph.successors(node).contains(adjacentNode))
                .isTrue();
          }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Oct 07 15:57:03 GMT 2025
    - 17.3K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/graph/AbstractBaseGraph.java

                } else {
                  return Iterators.unmodifiableIterator(
                      Iterators.transform(
                          graph.adjacentNodes(node).iterator(),
                          (N adjacentNode) -> EndpointPair.unordered(node, adjacentNode)));
                }
              }
            };
        return nodeInvalidatableSet(incident, node);
      }
    
      @Override
      public int degree(N node) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Oct 07 15:57:03 GMT 2025
    - 11.5K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/graph/EndpointPair.java

       * returns an arbitrary (but consistent) endpoint of the origin edge.
       */
      public final N nodeU() {
        return nodeU;
      }
    
      /**
       * Returns the node {@link #adjacentNode(Object) adjacent} to {@link #nodeU()} along the origin
       * edge. If this {@link EndpointPair} {@link #isOrdered()}, this is equal to {@link #target()}.
       */
      public final N nodeV() {
        return nodeV;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 8K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/graph/AbstractStandardUndirectedNetworkTest.java

              .addEqualityGroup(
                  network.predecessors(node), network.successors(node), network.adjacentNodes(node))
              .testEquals();
    
          for (Integer adjacentNode : network.adjacentNodes(node)) {
            assertThat(network.edgesConnecting(node, adjacentNode))
                .containsExactlyElementsIn(network.edgesConnecting(adjacentNode, node));
          }
        }
      }
    
      @Override
      @Test
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 30 17:09:51 GMT 2025
    - 19K bytes
    - Click Count (0)
  7. 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:
       *
       * {@snippet :
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 9.6K bytes
    - Click Count (0)
  8. 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) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Apr 02 14:49:41 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  9. 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
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 10K bytes
    - Click Count (0)
  10. 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;
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 11 01:10:31 GMT 2026
    - 24.4K bytes
    - Click Count (0)
Back to Top