Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for EndpointPair (0.2 sec)

  1. android/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) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 8.1K bytes
    - Viewed (0)
  2. android/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> {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Jul 09 17:31:04 GMT 2021
    - 5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/graph/ValueGraphTest.java

        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(1, 2))).isFalse();
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(2, 1))).isFalse();
      }
    
      @Test
      public void hasEdgeConnecting_undirected_correct() {
        graph = ValueGraphBuilder.undirected().build();
        graph.putEdgeValue(1, 2, "A");
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(1, 2))).isTrue();
      }
    
      @Test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 18:35:19 GMT 2024
    - 20K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/graph/AbstractStandardDirectedGraphTest.java

        populateStarShapedGraph();
    
        assertThat(graph.edges())
            .containsExactly(
                EndpointPair.ordered(2, 1),
                EndpointPair.ordered(1, 4),
                EndpointPair.ordered(1, 3),
                EndpointPair.ordered(1, 2),
                EndpointPair.ordered(3, 1),
                EndpointPair.ordered(5, 1))
            .inOrder();
      }
    
      @Test
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  5. 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
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/AbstractNetwork.java

              // operations only in weird cases like checking for an EndpointPair<ArrayList> in a
              // Network<LinkedList>.
              @SuppressWarnings("unchecked")
              @Override
              public boolean contains(@CheckForNull Object obj) {
                if (!(obj instanceof EndpointPair)) {
                  return false;
                }
                EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  7. 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");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  8. 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");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.4K bytes
    - Viewed (0)
  9. android/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 =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jan 09 20:24:43 GMT 2020
    - 6.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/graph/ValueGraphTest.java

        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(1, 2))).isFalse();
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(2, 1))).isFalse();
      }
    
      @Test
      public void hasEdgeConnecting_undirected_correct() {
        graph = ValueGraphBuilder.undirected().build();
        graph.putEdgeValue(1, 2, "A");
        assertThat(graph.hasEdgeConnecting(EndpointPair.unordered(1, 2))).isTrue();
      }
    
      @Test
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 17.4K bytes
    - Viewed (0)
Back to top