Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for inducedSubgraph (0.22 seconds)

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

        expectedSubgraph.addEdge(N4, N4, E44);
    
        assertThat(inducedSubgraph(directedGraph, nodeSubset)).isEqualTo(expectedSubgraph);
      }
    
      @Test
      public void inducedSubgraph_nodeNotInGraph() {
        MutableNetwork<Integer, String> undirectedGraph = NetworkBuilder.undirected().build();
    
        assertThrows(
            IllegalArgumentException.class,
            () -> inducedSubgraph(undirectedGraph, ImmutableSet.of(N1)));
      }
    
      @Test
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Jan 09 23:46:06 GMT 2026
    - 30.1K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/graph/Graphs.java

       * from {@code graph} for which both nodes are contained by {@code nodes}.
       *
       * @throws IllegalArgumentException if any element in {@code nodes} is not a node in the graph
       */
      public static <N> MutableGraph<N> inducedSubgraph(Graph<N> graph, Iterable<? extends N> nodes) {
        MutableGraph<N> subgraph =
            (nodes instanceof Collection)
                ? GraphBuilder.from(graph).expectedNodeCount(((Collection) nodes).size()).build()
    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