Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 49 for adjacentNodes (0.24 sec)

  1. android/guava/src/com/google/common/graph/NetworkConnections.java

     * in a {@link Network}.
     *
     * @author James Sexton
     * @param <N> Node parameter type
     * @param <E> Edge parameter type
     */
    @ElementTypesAreNonnullByDefault
    interface NetworkConnections<N, E> {
    
      Set<N> adjacentNodes();
    
      Set<N> predecessors();
    
      Set<N> successors();
    
      Set<E> incidentEdges();
    
      Set<E> inEdges();
    
      Set<E> outEdges();
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/graph/ValueGraph.java

       */
      @Override
      Set<N> adjacentNodes(N node);
    
      /**
       * Returns a live view of all nodes in this graph adjacent to {@code node} which can be reached by
       * traversing {@code node}'s incoming edges <i>against</i> the direction (if any) of the edge.
       *
       * <p>In an undirected graph, this is equivalent to {@link #adjacentNodes(Object)}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 15K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/AbstractUndirectedNetworkConnections.java

        this.incidentEdgeMap = checkNotNull(incidentEdgeMap);
      }
    
      @Override
      public Set<N> predecessors() {
        return adjacentNodes();
      }
    
      @Override
      public Set<N> successors() {
        return adjacentNodes();
      }
    
      @Override
      public Set<E> incidentEdges() {
        return Collections.unmodifiableSet(incidentEdgeMap.keySet());
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

      }
    
      @Test
      public void adjacentNodes_oneEdge() {
        putEdge(N1, N2);
        assertThat(graph.adjacentNodes(N1)).containsExactly(N2);
        assertThat(graph.adjacentNodes(N2)).containsExactly(N1);
      }
    
      @Test
      public void adjacentNodes_noAdjacentNodes() {
        addNode(N1);
        assertThat(graph.adjacentNodes(N1)).isEmpty();
      }
    
      @Test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 16.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/IncidentEdgeSet.java

      public int size() {
        if (graph.isDirected()) {
          return graph.inDegree(node)
              + graph.outDegree(node)
              - (graph.successors(node).contains(node) ? 1 : 0);
        } else {
          return graph.adjacentNodes(node).size();
        }
      }
    
      @Override
      public boolean contains(@CheckForNull Object obj) {
        if (!(obj instanceof EndpointPair)) {
          return false;
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 2.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/BaseGraph.java

       */
      Set<N> adjacentNodes(N node);
    
      /**
       * Returns a live view of all nodes in this graph adjacent to {@code node} which can be reached by
       * traversing {@code node}'s incoming edges <i>against</i> the direction (if any) of the edge.
       *
       * <p>In an undirected graph, this is equivalent to {@link #adjacentNodes(Object)}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  7. 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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. 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)
  9. guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

      @Override
      @Test
      public void adjacentNodes_checkReturnedSetMutability() {
        assume().that(graphIsMutable()).isTrue();
    
        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);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/graph/StandardValueGraph.java

        return allowsSelfLoops;
      }
    
      @Override
      public ElementOrder<N> nodeOrder() {
        return nodeOrder;
      }
    
      @Override
      public Set<N> adjacentNodes(N node) {
        return nodeInvalidatableSet(checkedConnections(node).adjacentNodes(), node);
      }
    
      @Override
      public Set<N> predecessors(N node) {
        return nodeInvalidatableSet(checkedConnections(node).predecessors(), node);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top