Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for MutableValueGraph (0.06 sec)

  1. guava/src/com/google/common/graph/MutableValueGraph.java

     * users should prefer the {@link ValueGraph} interface.
     *
     * @author James Sexton
     * @param <N> Node parameter type
     * @param <V> Value parameter type
     * @since 20.0
     */
    @Beta
    public interface MutableValueGraph<N, V> extends ValueGraph<N, V> {
    
      /**
       * Adds {@code node} if it is not already present.
       *
       * <p><b>Nodes must be unique</b>, just as {@code Map} keys must be. They must also be non-null.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

    @NullUnmarked
    public class ImmutableValueGraphTest {
    
      @Test
      public void immutableValueGraph() {
        MutableValueGraph<String, Integer> mutableValueGraph = ValueGraphBuilder.directed().build();
        mutableValueGraph.addNode("A");
        ImmutableValueGraph<String, Integer> immutableValueGraph =
            ImmutableValueGraph.copyOf(mutableValueGraph);
    
        assertThat(immutableValueGraph.asGraph()).isInstanceOf(ImmutableGraph.class);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/graph/ValueGraphBuilder.java

        newBuilder.incidentEdgeOrder = checkNotNull(incidentEdgeOrder);
        return newBuilder;
      }
    
      /**
       * Returns an empty {@link MutableValueGraph} with the properties of this {@link
       * ValueGraphBuilder}.
       */
      public <N1 extends N, V1 extends V> MutableValueGraph<N1, V1> build() {
        return new StandardMutableValueGraph<>(this);
      }
    
      ValueGraphBuilder<N, V> copy() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/ImmutableValueGraph.java

       */
      public static class Builder<N, V> {
    
        private final MutableValueGraph<N, V> mutableValueGraph;
    
        Builder(ValueGraphBuilder<N, V> graphBuilder) {
          // The incidentEdgeOrder for immutable graphs is always stable. However, we don't want to
          // modify this builder, so we make a copy instead.
          this.mutableValueGraph =
              graphBuilder.copy().incidentEdgeOrder(ElementOrder.<N>stable()).build();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/graph/GraphsTest.java

      @Test
      public void transpose_undirectedValueGraph() {
        MutableValueGraph<Integer, String> undirectedGraph = ValueGraphBuilder.undirected().build();
        undirectedGraph.putEdgeValue(N1, N2, E12);
    
        assertThat(transpose(undirectedGraph)).isSameInstanceAs(undirectedGraph);
      }
    
      @Test
      public void transpose_directedValueGraph() {
        MutableValueGraph<Integer, String> directedGraph =
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/graph/ValueGraphBuilder.java

        newBuilder.incidentEdgeOrder = checkNotNull(incidentEdgeOrder);
        return newBuilder;
      }
    
      /**
       * Returns an empty {@link MutableValueGraph} with the properties of this {@link
       * ValueGraphBuilder}.
       */
      public <N1 extends N, V1 extends V> MutableValueGraph<N1, V1> build() {
        return new StandardMutableValueGraph<>(this);
      }
    
      ValueGraphBuilder<N, V> copy() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/graph/StandardMutableGraph.java

     *
     * @author James Sexton
     * @param <N> Node parameter type
     */
    final class StandardMutableGraph<N> extends ForwardingGraph<N> implements MutableGraph<N> {
      private final MutableValueGraph<N, Presence> backingValueGraph;
    
      /** Constructs a {@link MutableGraph} with the properties specified in {@code builder}. */
      StandardMutableGraph(AbstractGraphBuilder<? super N> builder) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/graph/StandardMutableGraph.java

     *
     * @author James Sexton
     * @param <N> Node parameter type
     */
    final class StandardMutableGraph<N> extends ForwardingGraph<N> implements MutableGraph<N> {
      private final MutableValueGraph<N, Presence> backingValueGraph;
    
      /** Constructs a {@link MutableGraph} with the properties specified in {@code builder}. */
      StandardMutableGraph(AbstractGraphBuilder<? super N> builder) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/graph/Graphs.java

       * nodes}.
       *
       * @throws IllegalArgumentException if any element in {@code nodes} is not a node in the graph
       */
      public static <N, V> MutableValueGraph<N, V> inducedSubgraph(
          ValueGraph<N, V> graph, Iterable<? extends N> nodes) {
        MutableValueGraph<N, V> subgraph =
            (nodes instanceof Collection)
                ? ValueGraphBuilder.from(graph).expectedNodeCount(((Collection) nodes).size()).build()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 01 00:26:14 UTC 2025
    - 22.7K bytes
    - Viewed (0)
  10. guava/src/com/google/common/graph/Graphs.java

       * nodes}.
       *
       * @throws IllegalArgumentException if any element in {@code nodes} is not a node in the graph
       */
      public static <N, V> MutableValueGraph<N, V> inducedSubgraph(
          ValueGraph<N, V> graph, Iterable<? extends N> nodes) {
        MutableValueGraph<N, V> subgraph =
            (nodes instanceof Collection)
                ? ValueGraphBuilder.from(graph).expectedNodeCount(((Collection) nodes).size()).build()
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 01 00:26:14 UTC 2025
    - 23.3K bytes
    - Viewed (0)
Back to top