Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for ImmutableGraph (0.09 sec)

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

      @Parameters(name = "allowsSelfLoops={0}")
      public static Collection<Object[]> parameters() {
        return Arrays.asList(new Object[][] {{false}, {true}});
      }
    
      private final boolean allowsSelfLoops;
      private ImmutableGraph.Builder<Integer> graphBuilder;
    
      public StandardImmutableUndirectedGraphTest(boolean allowsSelfLoops) {
        this.allowsSelfLoops = allowsSelfLoops;
      }
    
      @Override
      public Graph<Integer> createGraph() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Mar 10 17:54:18 UTC 2020
    - 1.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/graph/ValueGraphBuilder.java

     * graph.putEdgeValue("San Jose", "San Jose", 0.0);
     * graph.putEdgeValue("San Francisco", "San Jose", 48.4);
     *
     * // Building an immutable value graph
     * ImmutableValueGraph<String, Double> immutableGraph =
     *     ValueGraphBuilder.undirected()
     *         .allowsSelfLoops(true)
     *         .<String, Double>immutable()
     *         .putEdgeValue("San Francisco", "San Francisco", 0.0)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 03 01:21:31 UTC 2022
    - 8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/graph/ImmutableValueGraph.java

        return checkNotNull(graph);
      }
    
      @Override
      public ElementOrder<N> incidentEdgeOrder() {
        return ElementOrder.stable();
      }
    
      @Override
      public ImmutableGraph<N> asGraph() {
        return new ImmutableGraph<>(this); // safe because the view is effectively immutable
      }
    
      private static <N, V> ImmutableMap<N, GraphConnections<N, V>> getNodeConnections(
          ValueGraph<N, V> graph) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 01 16:30:37 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/graph/ImmutableNetworkTest.java

        mutableNetwork.addNode("A");
        ImmutableNetwork<String, Integer> immutableNetwork = ImmutableNetwork.copyOf(mutableNetwork);
    
        assertThat(immutableNetwork.asGraph()).isInstanceOf(ImmutableGraph.class);
        assertThat(immutableNetwork).isNotInstanceOf(MutableNetwork.class);
        assertThat(immutableNetwork).isEqualTo(mutableNetwork);
    
        mutableNetwork.addNode("B");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun May 05 18:02:35 UTC 2019
    - 5.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/graph/ImmutableNetworkTest.java

        mutableNetwork.addNode("A");
        ImmutableNetwork<String, Integer> immutableNetwork = ImmutableNetwork.copyOf(mutableNetwork);
    
        assertThat(immutableNetwork.asGraph()).isInstanceOf(ImmutableGraph.class);
        assertThat(immutableNetwork).isNotInstanceOf(MutableNetwork.class);
        assertThat(immutableNetwork).isEqualTo(mutableNetwork);
    
        mutableNetwork.addNode("B");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sun May 05 18:02:35 UTC 2019
    - 5.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

        mutableValueGraph.addNode("A");
        ImmutableValueGraph<String, Integer> immutableValueGraph =
            ImmutableValueGraph.copyOf(mutableValueGraph);
    
        assertThat(immutableValueGraph.asGraph()).isInstanceOf(ImmutableGraph.class);
        assertThat(immutableValueGraph).isNotInstanceOf(MutableValueGraph.class);
        assertThat(immutableValueGraph).isEqualTo(mutableValueGraph);
    
        mutableValueGraph.addNode("B");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  7. guava/src/com/google/common/graph/Network.java

     * ImmutableNetwork}.
     *
     * <p>You can create an immutable copy of an existing {@code Network} using {@link
     * ImmutableNetwork#copyOf(Network)}:
     *
     * <pre>{@code
     * ImmutableNetwork<Integer, MyEdge> immutableGraph = ImmutableNetwork.copyOf(network);
     * }</pre>
     *
     * <p>Instances of {@link ImmutableNetwork} do not implement {@link MutableNetwork} (obviously!) and
     * are contractually guaranteed to be unmodifiable and thread-safe.
     *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 10 15:41:27 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/graph/TraverserTest.java

            return Ordering.natural().immutableSortedCopy(graphMap.get(node));
          }
        };
      }
    
      private static ImmutableGraph<Character> createSingleRootGraph() {
        MutableGraph<Character> graph = GraphBuilder.directed().build();
        graph.addNode('a');
        return ImmutableGraph.copyOf(graph);
      }
    
      private static void assertEqualCharNodes(Iterable<Character> result, String expectedCharacters) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/graph/TraverserTest.java

            return Ordering.natural().immutableSortedCopy(graphMap.get(node));
          }
        };
      }
    
      private static ImmutableGraph<Character> createSingleRootGraph() {
        MutableGraph<Character> graph = GraphBuilder.directed().build();
        graph.addNode('a');
        return ImmutableGraph.copyOf(graph);
      }
    
      private static void assertEqualCharNodes(Iterable<Character> result, String expectedCharacters) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 47.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/graph/AbstractGraphTest.java

        validateGraph(graph);
      }
    
      static <N> void validateGraph(Graph<N> graph) {
        assertStronglyEquivalent(graph, Graphs.copyOf(graph));
        assertStronglyEquivalent(graph, ImmutableGraph.copyOf(graph));
    
        String graphString = graph.toString();
        assertThat(graphString).contains("isDirected: " + graph.isDirected());
        assertThat(graphString).contains("allowsSelfLoops: " + graph.allowsSelfLoops());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 16.6K bytes
    - Viewed (0)
Back to top