Home
last modified time | relevance | path

Searched refs:edgesConnecting (Results 1 – 25 of 43) sorted by relevance

12

/external/guava/android/guava-tests/test/com/google/common/graph/
DDefaultNetworkImplementationsTest.java85 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 …]
DAbstractNetworkTest.java172 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 …]
DAbstractStandardUndirectedNetworkTest.java51 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 …]
DAbstractStandardDirectedNetworkTest.java53 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 …]
DImmutableNetworkTest.java60 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()
DGraphsTest.java321 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/
DDefaultNetworkImplementationsTest.java85 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 …]
DAbstractNetworkTest.java172 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 …]
DAbstractStandardUndirectedNetworkTest.java52 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 …]
DAbstractStandardDirectedNetworkTest.java54 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 …]
DImmutableNetworkTest.java60 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()
DGraphsTest.java321 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/
DAbstractNetwork.java150 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();
DForwardingNetwork.java123 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()
DNetwork.java291 Set<E> edgesConnecting(N nodeU, N nodeV); in edgesConnecting() method
307 Set<E> edgesConnecting(EndpointPair<N> endpoints); in edgesConnecting() method
DStandardNetwork.java148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in StandardNetwork
154 return connectionsU.edgesConnecting(nodeV); in edgesConnecting()
DNetworkConnections.java48 Set<E> edgesConnecting(N node); in edgesConnecting() method
DGraphs.java426 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));
DUndirectedNetworkConnections.java55 public Set<E> edgesConnecting(N node) { in edgesConnecting() method in UndirectedNetworkConnections
/external/guava/guava/src/com/google/common/graph/
DAbstractNetwork.java151 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();
DForwardingNetwork.java124 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()
DNetwork.java292 Set<E> edgesConnecting(N nodeU, N nodeV); in edgesConnecting() method
308 Set<E> edgesConnecting(EndpointPair<N> endpoints); in edgesConnecting() method
DStandardNetwork.java148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() method in StandardNetwork
154 return connectionsU.edgesConnecting(nodeV); in edgesConnecting()
DNetworkConnections.java48 Set<E> edgesConnecting(N node); in edgesConnecting() method
DGraphs.java432 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));

12