/external/guava/android/guava-tests/test/com/google/common/graph/ |
D | DefaultNetworkImplementationsTest.java | 85 assertThat(networkForTest.edgesConnecting(N1, N2)).isEmpty(); in edgesConnecting_disconnectedNodes() 93 networkForTest.edgesConnecting(N1, NODE_NOT_IN_GRAPH); in edgesConnecting_nodesNotInGraph() 99 networkForTest.edgesConnecting(NODE_NOT_IN_GRAPH, N2); in edgesConnecting_nodesNotInGraph() 105 networkForTest.edgesConnecting(NODE_NOT_IN_GRAPH, NODE_NOT_IN_GRAPH); in edgesConnecting_nodesNotInGraph() 116 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 118 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 122 assertThat(networkForTest.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 129 assertThat(networkForTest.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 131 assertThat(networkForTest.edgesConnecting(N2, N1)).isEmpty(); in edgesConnecting_oneEdge() 133 assertThat(networkForTest.edgesConnecting(N2, N1)).containsExactly(E12); in edgesConnecting_oneEdge() [all …]
|
D | AbstractNetworkTest.java | 172 assertThat(network.edgesConnecting(nodeU, nodeV)).contains(edge); in validateNetwork() 198 int selfLoopCount = network.edgesConnecting(node, node).size(); in validateNetwork() 217 Set<E> edgesConnecting = sanityCheckSet(network.edgesConnecting(node, otherNode)); in validateNetwork() local 218 switch (edgesConnecting.size()) { in validateNetwork() 225 .isEqualTo(edgesConnecting.iterator().next()); in validateNetwork() 238 boolean connected = !edgesConnecting.isEmpty(); in validateNetwork() 240 assertThat(edgesConnecting) in validateNetwork() 244 assertThat(edgesConnecting.size()).isAtMost(1); in validateNetwork() 252 for (E edge : edgesConnecting) { in validateNetwork() 265 !network.edgesConnecting(node, adjacentNode).isEmpty() in validateNetwork() [all …]
|
D | AbstractStandardUndirectedNetworkTest.java | 51 assertThat(network.edgesConnecting(node, adjacentNode)) in validateUndirectedEdges() 52 .containsExactlyElementsIn(network.edgesConnecting(adjacentNode, node)); in validateUndirectedEdges() 129 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 131 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 135 assertThat(network.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 212 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 213 assertThat(network.edgesConnecting(N2, N1)).containsExactly(E12); in edgesConnecting_oneEdge() 306 assertThat(network.edgesConnecting(N1, N1)).containsExactly(E11); in edgesConnecting_selfLoop() 308 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_selfLoop() 309 assertThat(network.edgesConnecting(N2, N1)).containsExactly(E12); in edgesConnecting_selfLoop() [all …]
|
D | AbstractStandardDirectedNetworkTest.java | 53 Set<String> edges = network.edgesConnecting(node, adjacentNode); in validateSourceAndTarget() 54 Set<String> antiParallelEdges = network.edgesConnecting(adjacentNode, node); in validateSourceAndTarget() 145 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 147 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 151 assertThat(network.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 232 Set<String> unused = network.edgesConnecting(EndpointPair.unordered(N1, N2)); in edgesConnecting_orderMismatch() 261 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 264 assertThat(network.edgesConnecting(N2, N1)).isEmpty(); in edgesConnecting_oneEdge() 395 assertThat(network.edgesConnecting(N1, N1)).containsExactly(E11); in edgesConnecting_selfLoop() 397 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_selfLoop() [all …]
|
D | ImmutableNetworkTest.java | 60 assertThat(network.edgesConnecting("A", "A")).containsExactly("AA"); in edgesConnecting_directed() 61 assertThat(network.edgesConnecting("A", "B")).containsExactly("AB"); in edgesConnecting_directed() 62 assertThat(network.edgesConnecting("B", "A")).isEmpty(); in edgesConnecting_directed() 73 assertThat(network.edgesConnecting("A", "A")).containsExactly("AA"); in edgesConnecting_undirected() 74 assertThat(network.edgesConnecting("A", "B")).containsExactly("AB"); in edgesConnecting_undirected() 75 assertThat(network.edgesConnecting("B", "A")).containsExactly("AB"); in edgesConnecting_undirected()
|
D | GraphsTest.java | 321 assertThat(transpose.edgesConnecting(N1, N2)).isEmpty(); in transpose_directedNetwork() 331 assertThat(transpose.edgesConnecting(N1, N2)).containsExactly(E21); in transpose_directedNetwork() 474 assertThat(directedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createDirected() 475 assertThat(directedGraph.edgesConnecting(N2, N1)).isEmpty(); in createDirected() 500 assertThat(undirectedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createUndirected() 501 assertThat(undirectedGraph.edgesConnecting(N2, N1)).isEqualTo(ImmutableSet.of(E12)); in createUndirected() 532 assertThat(directedMultigraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12, E12_A)); in createDirected_multigraph() 533 assertThat(directedMultigraph.edgesConnecting(N2, N1)).isEmpty(); in createDirected_multigraph() 543 assertThat(undirectedMultigraph.edgesConnecting(N1, N2)) in createUndirected_multigraph() 552 assertThat(directedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createDirected_expectedNodeCount() [all …]
|
/external/guava/guava-tests/test/com/google/common/graph/ |
D | DefaultNetworkImplementationsTest.java | 85 assertThat(networkForTest.edgesConnecting(N1, N2)).isEmpty(); in edgesConnecting_disconnectedNodes() 93 networkForTest.edgesConnecting(N1, NODE_NOT_IN_GRAPH); in edgesConnecting_nodesNotInGraph() 99 networkForTest.edgesConnecting(NODE_NOT_IN_GRAPH, N2); in edgesConnecting_nodesNotInGraph() 105 networkForTest.edgesConnecting(NODE_NOT_IN_GRAPH, NODE_NOT_IN_GRAPH); in edgesConnecting_nodesNotInGraph() 116 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 118 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 122 assertThat(networkForTest.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 129 assertThat(networkForTest.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 131 assertThat(networkForTest.edgesConnecting(N2, N1)).isEmpty(); in edgesConnecting_oneEdge() 133 assertThat(networkForTest.edgesConnecting(N2, N1)).containsExactly(E12); in edgesConnecting_oneEdge() [all …]
|
D | AbstractNetworkTest.java | 172 assertThat(network.edgesConnecting(nodeU, nodeV)).contains(edge); in validateNetwork() 198 int selfLoopCount = network.edgesConnecting(node, node).size(); in validateNetwork() 217 Set<E> edgesConnecting = sanityCheckSet(network.edgesConnecting(node, otherNode)); in validateNetwork() local 218 switch (edgesConnecting.size()) { in validateNetwork() 225 E edge = edgesConnecting.iterator().next(); in validateNetwork() 245 boolean connected = !edgesConnecting.isEmpty(); in validateNetwork() 247 assertThat(edgesConnecting) in validateNetwork() 251 assertThat(edgesConnecting.size()).isAtMost(1); in validateNetwork() 259 for (E edge : edgesConnecting) { in validateNetwork() 272 !network.edgesConnecting(node, adjacentNode).isEmpty() in validateNetwork() [all …]
|
D | AbstractStandardUndirectedNetworkTest.java | 52 assertThat(network.edgesConnecting(node, adjacentNode)) in validateUndirectedEdges() 53 .containsExactlyElementsIn(network.edgesConnecting(adjacentNode, node)); in validateUndirectedEdges() 130 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 132 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 136 assertThat(network.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 206 assertThat(network.edgesConnecting(ENDPOINTS_N2N1)).containsExactly(E12); in edgesConnecting_orderMismatch() 207 assertThat(network.edgesConnecting(ENDPOINTS_N1N2)).containsExactly(E12); in edgesConnecting_orderMismatch() 227 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 228 assertThat(network.edgesConnecting(N2, N1)).containsExactly(E12); in edgesConnecting_oneEdge() 321 assertThat(network.edgesConnecting(N1, N1)).containsExactly(E11); in edgesConnecting_selfLoop() [all …]
|
D | AbstractStandardDirectedNetworkTest.java | 54 Set<String> edges = network.edgesConnecting(node, adjacentNode); in validateSourceAndTarget() 55 Set<String> antiParallelEdges = network.edgesConnecting(adjacentNode, node); in validateSourceAndTarget() 146 Set<String> edgesConnecting = network.edgesConnecting(N1, N2); in edgesConnecting_checkReturnedSetMutability() local 148 edgesConnecting.add(E23); in edgesConnecting_checkReturnedSetMutability() 152 assertThat(network.edgesConnecting(N1, N2)).containsExactlyElementsIn(edgesConnecting); in edgesConnecting_checkReturnedSetMutability() 233 Set<String> unused = network.edgesConnecting(EndpointPair.unordered(N1, N2)); in edgesConnecting_orderMismatch() 273 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_oneEdge() 276 assertThat(network.edgesConnecting(N2, N1)).isEmpty(); in edgesConnecting_oneEdge() 407 assertThat(network.edgesConnecting(N1, N1)).containsExactly(E11); in edgesConnecting_selfLoop() 409 assertThat(network.edgesConnecting(N1, N2)).containsExactly(E12); in edgesConnecting_selfLoop() [all …]
|
D | ImmutableNetworkTest.java | 60 assertThat(network.edgesConnecting("A", "A")).containsExactly("AA"); in edgesConnecting_directed() 61 assertThat(network.edgesConnecting("A", "B")).containsExactly("AB"); in edgesConnecting_directed() 62 assertThat(network.edgesConnecting("B", "A")).isEmpty(); in edgesConnecting_directed() 73 assertThat(network.edgesConnecting("A", "A")).containsExactly("AA"); in edgesConnecting_undirected() 74 assertThat(network.edgesConnecting("A", "B")).containsExactly("AB"); in edgesConnecting_undirected() 75 assertThat(network.edgesConnecting("B", "A")).containsExactly("AB"); in edgesConnecting_undirected()
|
D | GraphsTest.java | 321 assertThat(transpose.edgesConnecting(N1, N2)).isEmpty(); in transpose_directedNetwork() 332 assertThat(transpose.edgesConnecting(N1, N2)).containsExactly(E21); in transpose_directedNetwork() 475 assertThat(directedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createDirected() 476 assertThat(directedGraph.edgesConnecting(N2, N1)).isEmpty(); in createDirected() 501 assertThat(undirectedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createUndirected() 502 assertThat(undirectedGraph.edgesConnecting(N2, N1)).isEqualTo(ImmutableSet.of(E12)); in createUndirected() 533 assertThat(directedMultigraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12, E12_A)); in createDirected_multigraph() 534 assertThat(directedMultigraph.edgesConnecting(N2, N1)).isEmpty(); in createDirected_multigraph() 544 assertThat(undirectedMultigraph.edgesConnecting(N1, N2)) in createUndirected_multigraph() 553 assertThat(directedGraph.edgesConnecting(N1, N2)).isEqualTo(ImmutableSet.of(E12)); in createDirected_expectedNodeCount() [all …]
|
/external/guava/android/guava/src/com/google/common/graph/ |
D | AbstractNetwork.java | 150 return IntMath.saturatedAdd(incidentEdges(node).size(), edgesConnecting(node, node).size()); 173 public Set<E> edgesConnecting(N nodeU, N nodeV) { 182 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { 184 return edgesConnecting(endpoints.nodeU(), endpoints.nodeV()); 199 Set<E> edgesConnecting = edgesConnecting(nodeU, nodeV); 200 switch (edgesConnecting.size()) { 204 return edgesConnecting.iterator().next();
|
D | ForwardingNetwork.java | 123 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in ForwardingNetwork 124 return delegate().edgesConnecting(nodeU, nodeV); in edgesConnecting() 128 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { in edgesConnecting() method in ForwardingNetwork 129 return delegate().edgesConnecting(endpoints); in edgesConnecting()
|
D | Network.java | 291 Set<E> edgesConnecting(N nodeU, N nodeV); in edgesConnecting() method 307 Set<E> edgesConnecting(EndpointPair<N> endpoints); in edgesConnecting() method
|
D | StandardNetwork.java | 148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in StandardNetwork 154 return connectionsU.edgesConnecting(nodeV); in edgesConnecting()
|
D | NetworkConnections.java | 48 Set<E> edgesConnecting(N node); in edgesConnecting() method
|
D | Graphs.java | 426 public Set<E> edgesConnecting(N nodeU, N nodeV) { 427 return delegate().edgesConnecting(nodeV, nodeU); // transpose 431 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { 432 return delegate().edgesConnecting(transpose(endpoints));
|
D | UndirectedNetworkConnections.java | 55 public Set<E> edgesConnecting(N node) { in edgesConnecting() method in UndirectedNetworkConnections
|
/external/guava/guava/src/com/google/common/graph/ |
D | AbstractNetwork.java | 151 return IntMath.saturatedAdd(incidentEdges(node).size(), edgesConnecting(node, node).size()); 174 public Set<E> edgesConnecting(N nodeU, N nodeV) { 183 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { 185 return edgesConnecting(endpoints.nodeU(), endpoints.nodeV()); 210 Set<E> edgesConnecting = edgesConnecting(nodeU, nodeV); 211 switch (edgesConnecting.size()) { 215 return edgesConnecting.iterator().next();
|
D | ForwardingNetwork.java | 124 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in ForwardingNetwork 125 return delegate().edgesConnecting(nodeU, nodeV); in edgesConnecting() 129 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { in edgesConnecting() method in ForwardingNetwork 130 return delegate().edgesConnecting(endpoints); in edgesConnecting()
|
D | Network.java | 292 Set<E> edgesConnecting(N nodeU, N nodeV); in edgesConnecting() method 308 Set<E> edgesConnecting(EndpointPair<N> endpoints); in edgesConnecting() method
|
D | StandardNetwork.java | 148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in StandardNetwork 154 return connectionsU.edgesConnecting(nodeV); in edgesConnecting()
|
D | NetworkConnections.java | 48 Set<E> edgesConnecting(N node); in edgesConnecting() method
|
D | Graphs.java | 432 public Set<E> edgesConnecting(N nodeU, N nodeV) { 433 return delegate().edgesConnecting(nodeV, nodeU); // transpose 437 public Set<E> edgesConnecting(EndpointPair<N> endpoints) { 438 return delegate().edgesConnecting(transpose(endpoints));
|