Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for EndpointPair (0.08 sec)

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

    @ElementTypesAreNonnullByDefault
    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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 01 17:18:04 UTC 2021
    - 8.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java

        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(N1, N2))).isTrue();
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(N2, N1))).isTrue();
      }
    
      @Test
      public void hasEdgeConnecting_mismatch() {
        putEdge(N1, N2);
        assertThat(graph.hasEdgeConnecting(EndpointPair.ordered(N1, N2))).isFalse();
        assertThat(graph.hasEdgeConnecting(EndpointPair.ordered(N2, N1))).isFalse();
      }
    
      @Test
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jul 09 17:31:04 UTC 2021
    - 5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

          for (String inEdge : network.inEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(inEdge);
            assertThat(endpointPair.source()).isEqualTo(endpointPair.adjacentNode(node));
            assertThat(endpointPair.target()).isEqualTo(node);
          }
    
          for (String outEdge : network.outEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(outEdge);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/graph/AbstractStandardDirectedNetworkTest.java

          for (String inEdge : network.inEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(inEdge);
            assertThat(endpointPair.source()).isEqualTo(endpointPair.adjacentNode(node));
            assertThat(endpointPair.target()).isEqualTo(node);
          }
    
          for (String outEdge : network.outEdges(node)) {
            EndpointPair<Integer> endpointPair = network.incidentNodes(outEdge);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/IncidentEdgeSet.java

      public boolean contains(@CheckForNull 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 26 17:43:39 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java

        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(N1, N2))).isTrue();
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(N2, N1))).isTrue();
      }
    
      @Test
      public void hasEdgeConnecting_mismatch() {
        putEdge(N1, N2);
        assertThat(graph.hasEdgeConnecting(EndpointPair.ordered(N1, N2))).isFalse();
        assertThat(graph.hasEdgeConnecting(EndpointPair.ordered(N2, N1))).isFalse();
      }
    
      @Test
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 02 18:21:29 UTC 2024
    - 12.7K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 09 20:24:43 UTC 2020
    - 6.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/graph/DirectedGraphConnections.java

                      return EndpointPair.ordered(thisNode, connection.node);
                    } else {
                      return EndpointPair.ordered(connection.node, thisNode);
                    }
                  });
        }
    
        AtomicBoolean alreadySeenSelfLoop = new AtomicBoolean(false);
        return new AbstractIterator<EndpointPair<N>>() {
          @Override
          @CheckForNull
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 18K bytes
    - Viewed (0)
  10. guava/src/com/google/common/graph/AbstractBaseGraph.java

          // Graph<LinkedList>.
          @SuppressWarnings("unchecked")
          @Override
          public boolean contains(@CheckForNull Object obj) {
            if (!(obj instanceof EndpointPair)) {
              return false;
            }
            EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
            return isOrderingCompatible(endpointPair)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jan 22 17:29:38 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top