Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for EndpointPair (0.07 sec)

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

    @Immutable(containerOf = {"N"})
    public abstract class EndpointPair<N> implements Iterable<N> {
      private final N nodeU;
      private final N nodeV;
    
      private EndpointPair(N nodeU, N nodeV) {
        this.nodeU = checkNotNull(nodeU);
        this.nodeV = checkNotNull(nodeV);
      }
    
      /** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */
      public static <N> EndpointPair<N> ordered(N source, N target) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/graph/EndpointPair.java

    @Immutable(containerOf = {"N"})
    public abstract class EndpointPair<N> implements Iterable<N> {
      private final N nodeU;
      private final N nodeV;
    
      private EndpointPair(N nodeU, N nodeV) {
        this.nodeU = checkNotNull(nodeU);
        this.nodeV = checkNotNull(nodeV);
      }
    
      /** Returns an {@link EndpointPair} representing the endpoints of a directed edge. */
      public static <N> EndpointPair<N> ordered(N source, N target) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 08 18:32:10 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/graph/EndpointPairTest.java

          network.addEdge(1, 2, "1-2");
          EndpointPair<Integer> endpointPair = network.incidentNodes("1-2");
          assertThrows(IllegalArgumentException.class, () -> endpointPair.adjacentNode(3));
        }
      }
    
      @Test
      public void testEquals() {
        EndpointPair<String> ordered = EndpointPair.ordered("a", "b");
        EndpointPair<String> orderedMirror = EndpointPair.ordered("b", "a");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/graph/AbstractBaseGraph.java

          // Graph<LinkedList>.
          @SuppressWarnings("unchecked")
          @Override
          public boolean contains(@Nullable Object obj) {
            if (!(obj instanceof EndpointPair)) {
              return false;
            }
            EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
            return isOrderingCompatible(endpointPair)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/IncidentEdgeSet.java

      public boolean contains(@Nullable Object obj) {
        if (!(obj instanceof EndpointPair)) {
          return false;
        }
        EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
    
        if (graph.isDirected()) {
          if (!endpointPair.isOrdered()) {
            return false;
          }
    
          Object source = endpointPair.source();
          Object target = endpointPair.target();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/graph/EndpointPairIterator.java

       * Visited Nodes = {N1}
       * EndpointPair [N2, N1] - skip
       * EndpointPair [N2, N3] - return
       * Visited Nodes = {N1, N2}
       * EndpointPair [N3, N1] - skip
       * EndpointPair [N3, N2] - skip
       * Visited Nodes = {N1, N2, N3}
       * EndpointPair [N4, N4] - return
       * Visited Nodes = {N1, N2, N3, N4}
       * </pre>
       */
      private static final class Undirected<N> extends EndpointPairIterator<N> {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/graph/ForwardingNetwork.java

      }
    
      @Override
      public Set<E> edgesConnecting(EndpointPair<N> endpoints) {
        return delegate().edgesConnecting(endpoints);
      }
    
      @Override
      public @Nullable E edgeConnectingOrNull(N nodeU, N nodeV) {
        return delegate().edgeConnectingOrNull(nodeU, nodeV);
      }
    
      @Override
      public @Nullable E edgeConnectingOrNull(EndpointPair<N> endpoints) {
        return delegate().edgeConnectingOrNull(endpoints);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/graph/ImmutableValueGraphTest.java

                .putEdgeValue(2, 3, "2-3")
                .putEdgeValue(1, 2, "1-2")
                .build();
    
        assertThat(graph.incidentEdges(2))
            .containsExactly(
                EndpointPair.ordered(2, 1), EndpointPair.ordered(2, 3), EndpointPair.ordered(1, 2))
            .inOrder();
      }
    
      @Test
      public void immutableValueGraphBuilder_incidentEdgeOrder_stable() {
        ImmutableValueGraph<Integer, String> graph =
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/graph/ForwardingValueGraph.java

      }
    
      @Override
      public boolean hasEdgeConnecting(EndpointPair<N> endpoints) {
        return delegate().hasEdgeConnecting(endpoints);
      }
    
      @Override
      public Optional<V> edgeValue(N nodeU, N nodeV) {
        return delegate().edgeValue(nodeU, nodeV);
      }
    
      @Override
      public Optional<V> edgeValue(EndpointPair<N> endpoints) {
        return delegate().edgeValue(endpoints);
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/graph/StandardImmutableGraphAdditionalTest.java

        assertThat(graph.nodes()).containsExactly("A", "B");
        assertThat(graph.edges()).containsExactly(EndpointPair.ordered("A", "B"));
      }
    
      @Test
      public void immutableGraphBuilder_putEdgeFromEndpointPair() {
        ImmutableGraph<String> graph =
            GraphBuilder.directed().<String>immutable().putEdge(EndpointPair.ordered("A", "B")).build();
    
        assertThat(graph.nodes()).containsExactly("A", "B");
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top