Home
last modified time | relevance | path

Searched refs:nodeU (Results 1 – 25 of 55) sorted by relevance

123

/external/guava/guava/src/com/google/common/graph/
DEndpointPair.java43 private final N nodeU; field in EndpointPair
46 private EndpointPair(N nodeU, N nodeV) { in EndpointPair() argument
47 this.nodeU = checkNotNull(nodeU); in EndpointPair()
57 public static <N> EndpointPair<N> unordered(N nodeU, N nodeV) { in unordered() argument
59 return new Unordered<N>(nodeV, nodeU); in unordered()
63 static <N> EndpointPair<N> of(Graph<?> graph, N nodeU, N nodeV) { in of() argument
64 return graph.isDirected() ? ordered(nodeU, nodeV) : unordered(nodeU, nodeV); in of()
68 static <N> EndpointPair<N> of(Network<?, ?> network, N nodeU, N nodeV) { in of() argument
69 return network.isDirected() ? ordered(nodeU, nodeV) : unordered(nodeU, nodeV); in of()
90 public final N nodeU() { in nodeU() method in EndpointPair
[all …]
DConfigurableMutableNetwork.java77 public boolean addEdge(N nodeU, N nodeV, E edge) { in addEdge() argument
78 checkNotNull(nodeU, "nodeU"); in addEdge()
84 EndpointPair<N> newIncidentNodes = EndpointPair.of(this, nodeU, nodeV); in addEdge()
93 NetworkConnections<N, E> connectionsU = nodeConnections.get(nodeU); in addEdge()
98 nodeU, in addEdge()
101 boolean isSelfLoop = nodeU.equals(nodeV); in addEdge()
103 checkArgument(!isSelfLoop, SELF_LOOPS_NOT_ALLOWED, nodeU); in addEdge()
107 connectionsU = addNodeInternal(nodeU); in addEdge()
114 connectionsV.addInEdge(edge, nodeU, isSelfLoop); in addEdge()
115 edgeToReferenceNode.put(edge, nodeU); in addEdge()
[all …]
DConfigurableMutableValueGraph.java76 public V putEdgeValue(N nodeU, N nodeV, V value) { in putEdgeValue() argument
77 checkNotNull(nodeU, "nodeU"); in putEdgeValue()
82 checkArgument(!nodeU.equals(nodeV), SELF_LOOPS_NOT_ALLOWED, nodeU); in putEdgeValue()
85 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in putEdgeValue()
87 connectionsU = addNodeInternal(nodeU); in putEdgeValue()
94 connectionsV.addPredecessor(nodeU, value); in putEdgeValue()
105 return putEdgeValue(endpoints.nodeU(), endpoints.nodeV(), value); in putEdgeValue()
143 public V removeEdge(N nodeU, N nodeV) { in removeEdge() argument
144 checkNotNull(nodeU, "nodeU"); in removeEdge()
147 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in removeEdge()
[all …]
DAbstractNetwork.java99 && nodes().contains(endpointPair.nodeU()) in asGraph()
100 && successors((N) endpointPair.nodeU()).contains(endpointPair.nodeV()); in asGraph()
162 Sets.union(incidentEdges(endpointPair.nodeU()), incidentEdges(endpointPair.nodeV()));
167 public Set<E> edgesConnecting(N nodeU, N nodeV) {
168 Set<E> outEdgesU = outEdges(nodeU);
171 ? unmodifiableSet(Sets.filter(outEdgesU, connectedPredicate(nodeU, nodeV)))
172 : unmodifiableSet(Sets.filter(inEdgesV, connectedPredicate(nodeV, nodeU)));
178 return edgesConnecting(endpoints.nodeU(), endpoints.nodeV());
191 public Optional<E> edgeConnecting(N nodeU, N nodeV) {
192 return Optional.ofNullable(edgeConnectingOrNull(nodeU, nodeV));
[all …]
DConfigurableValueGraph.java118 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
119 return hasEdgeConnecting_internal(checkNotNull(nodeU), checkNotNull(nodeV)); in hasEdgeConnecting()
126 && hasEdgeConnecting_internal(endpoints.nodeU(), endpoints.nodeV()); in hasEdgeConnecting()
130 public @Nullable V edgeValueOrDefault(N nodeU, N nodeV, @Nullable V defaultValue) { in edgeValueOrDefault() argument
131 return edgeValueOrDefault_internal(checkNotNull(nodeU), checkNotNull(nodeV), defaultValue); in edgeValueOrDefault()
137 return edgeValueOrDefault_internal(endpoints.nodeU(), endpoints.nodeV(), defaultValue); in edgeValueOrDefault()
158 protected final boolean hasEdgeConnecting_internal(N nodeU, N nodeV) { in hasEdgeConnecting_internal() argument
159 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in hasEdgeConnecting_internal()
163 protected final V edgeValueOrDefault_internal(N nodeU, N nodeV, V defaultValue) { in edgeValueOrDefault_internal() argument
164 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in edgeValueOrDefault_internal()
DAbstractBaseGraph.java94 && nodes().contains(endpointPair.nodeU()) in edges()
95 && successors((N) endpointPair.nodeU()).contains(endpointPair.nodeV()); in edges()
129 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
130 checkNotNull(nodeU);
132 return nodes().contains(nodeU) && successors(nodeU).contains(nodeV);
141 N nodeU = endpoints.nodeU();
143 return nodes().contains(nodeU) && successors(nodeU).contains(nodeV);
265 Object nodeU = endpointPair.nodeU();
268 return (node.equals(nodeV) && adjacent.contains(nodeU))
269 || (node.equals(nodeU) && adjacent.contains(nodeV));
DConfigurableMutableGraph.java50 public boolean putEdge(N nodeU, N nodeV) { in putEdge() argument
51 return backingValueGraph.putEdgeValue(nodeU, nodeV, Presence.EDGE_EXISTS) == null; in putEdge()
57 return putEdge(endpoints.nodeU(), endpoints.nodeV()); in putEdge()
66 public boolean removeEdge(N nodeU, N nodeV) { in removeEdge() argument
67 return backingValueGraph.removeEdge(nodeU, nodeV) != null; in removeEdge()
73 return removeEdge(endpoints.nodeU(), endpoints.nodeV()); in removeEdge()
DGraphs.java169 for (N nodeU : reachableNodes) { in transitiveClosure()
171 transitiveClosure.putEdge(nodeU, nodeV); in transitiveClosure()
304 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
305 return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose in hasEdgeConnecting()
349 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
350 return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose in hasEdgeConnecting()
359 public Optional<V> edgeValue(N nodeU, N nodeV) { in edgeValue() argument
360 return delegate().edgeValue(nodeV, nodeU); // transpose in edgeValue()
369 public @Nullable V edgeValueOrDefault(N nodeU, N nodeV, @Nullable V defaultValue) { in edgeValueOrDefault() argument
370 return delegate().edgeValueOrDefault(nodeV, nodeU, defaultValue); // transpose in edgeValueOrDefault()
[all …]
DForwardingNetwork.java124 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() argument
125 return delegate().edgesConnecting(nodeU, nodeV); in edgesConnecting()
134 public Optional<E> edgeConnecting(N nodeU, N nodeV) { in edgeConnecting() argument
135 return delegate().edgeConnecting(nodeU, nodeV); in edgeConnecting()
144 public E edgeConnectingOrNull(N nodeU, N nodeV) { in edgeConnectingOrNull() argument
145 return delegate().edgeConnectingOrNull(nodeU, nodeV); in edgeConnectingOrNull()
154 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
155 return delegate().hasEdgeConnecting(nodeU, nodeV); in hasEdgeConnecting()
DForwardingValueGraph.java94 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
95 return delegate().hasEdgeConnecting(nodeU, nodeV); in hasEdgeConnecting()
104 public Optional<V> edgeValue(N nodeU, N nodeV) { in edgeValue() argument
105 return delegate().edgeValue(nodeU, nodeV); in edgeValue()
114 public @Nullable V edgeValueOrDefault(N nodeU, N nodeV, @Nullable V defaultValue) { in edgeValueOrDefault() argument
115 return delegate().edgeValueOrDefault(nodeU, nodeV, defaultValue); in edgeValueOrDefault()
DConfigurableNetwork.java137 N nodeU = checkedReferenceNode(edge); in incidentNodes() local
138 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge); in incidentNodes()
139 return EndpointPair.of(this, nodeU, nodeV); in incidentNodes()
148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() argument
149 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU); in edgesConnecting()
150 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality in edgesConnecting()
DNetwork.java286 Set<E> edgesConnecting(N nodeU, N nodeV); in edgesConnecting() argument
316 Optional<E> edgeConnecting(N nodeU, N nodeV); in edgeConnecting() argument
346 E edgeConnectingOrNull(N nodeU, N nodeV); in edgeConnectingOrNull() argument
372 boolean hasEdgeConnecting(N nodeU, N nodeV); in hasEdgeConnecting() argument
DValueGraph.java246 boolean hasEdgeConnecting(N nodeU, N nodeV); in hasEdgeConnecting() argument
273 Optional<V> edgeValue(N nodeU, N nodeV); in edgeValue() argument
298 V edgeValueOrDefault(N nodeU, N nodeV, @Nullable V defaultValue); in edgeValueOrDefault() argument
/external/guava/android/guava/src/com/google/common/graph/
DEndpointPair.java43 private final N nodeU; field in EndpointPair
46 private EndpointPair(N nodeU, N nodeV) { in EndpointPair() argument
47 this.nodeU = checkNotNull(nodeU); in EndpointPair()
57 public static <N> EndpointPair<N> unordered(N nodeU, N nodeV) { in unordered() argument
59 return new Unordered<N>(nodeV, nodeU); in unordered()
63 static <N> EndpointPair<N> of(Graph<?> graph, N nodeU, N nodeV) { in of() argument
64 return graph.isDirected() ? ordered(nodeU, nodeV) : unordered(nodeU, nodeV); in of()
68 static <N> EndpointPair<N> of(Network<?, ?> network, N nodeU, N nodeV) { in of() argument
69 return network.isDirected() ? ordered(nodeU, nodeV) : unordered(nodeU, nodeV); in of()
90 public final N nodeU() { in nodeU() method in EndpointPair
[all …]
DConfigurableMutableNetwork.java77 public boolean addEdge(N nodeU, N nodeV, E edge) { in addEdge() argument
78 checkNotNull(nodeU, "nodeU"); in addEdge()
84 EndpointPair<N> newIncidentNodes = EndpointPair.of(this, nodeU, nodeV); in addEdge()
93 NetworkConnections<N, E> connectionsU = nodeConnections.get(nodeU); in addEdge()
98 nodeU, in addEdge()
101 boolean isSelfLoop = nodeU.equals(nodeV); in addEdge()
103 checkArgument(!isSelfLoop, SELF_LOOPS_NOT_ALLOWED, nodeU); in addEdge()
107 connectionsU = addNodeInternal(nodeU); in addEdge()
114 connectionsV.addInEdge(edge, nodeU, isSelfLoop); in addEdge()
115 edgeToReferenceNode.put(edge, nodeU); in addEdge()
[all …]
DConfigurableMutableValueGraph.java76 public V putEdgeValue(N nodeU, N nodeV, V value) { in putEdgeValue() argument
77 checkNotNull(nodeU, "nodeU"); in putEdgeValue()
82 checkArgument(!nodeU.equals(nodeV), SELF_LOOPS_NOT_ALLOWED, nodeU); in putEdgeValue()
85 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in putEdgeValue()
87 connectionsU = addNodeInternal(nodeU); in putEdgeValue()
94 connectionsV.addPredecessor(nodeU, value); in putEdgeValue()
105 return putEdgeValue(endpoints.nodeU(), endpoints.nodeV(), value); in putEdgeValue()
143 public V removeEdge(N nodeU, N nodeV) { in removeEdge() argument
144 checkNotNull(nodeU, "nodeU"); in removeEdge()
147 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in removeEdge()
[all …]
DAbstractNetwork.java98 && nodes().contains(endpointPair.nodeU()) in asGraph()
99 && successors((N) endpointPair.nodeU()).contains(endpointPair.nodeV()); in asGraph()
161 Sets.union(incidentEdges(endpointPair.nodeU()), incidentEdges(endpointPair.nodeV()));
166 public Set<E> edgesConnecting(N nodeU, N nodeV) {
167 Set<E> outEdgesU = outEdges(nodeU);
170 ? unmodifiableSet(Sets.filter(outEdgesU, connectedPredicate(nodeU, nodeV)))
171 : unmodifiableSet(Sets.filter(inEdgesV, connectedPredicate(nodeV, nodeU)));
177 return edgesConnecting(endpoints.nodeU(), endpoints.nodeV());
191 public E edgeConnectingOrNull(N nodeU, N nodeV) {
192 Set<E> edgesConnecting = edgesConnecting(nodeU, nodeV);
[all …]
DConfigurableValueGraph.java118 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
119 return hasEdgeConnecting_internal(checkNotNull(nodeU), checkNotNull(nodeV)); in hasEdgeConnecting()
126 && hasEdgeConnecting_internal(endpoints.nodeU(), endpoints.nodeV()); in hasEdgeConnecting()
131 public V edgeValueOrDefault(N nodeU, N nodeV, @NullableDecl V defaultValue) { in edgeValueOrDefault() argument
132 return edgeValueOrDefault_internal(checkNotNull(nodeU), checkNotNull(nodeV), defaultValue); in edgeValueOrDefault()
139 return edgeValueOrDefault_internal(endpoints.nodeU(), endpoints.nodeV(), defaultValue); in edgeValueOrDefault()
160 protected final boolean hasEdgeConnecting_internal(N nodeU, N nodeV) { in hasEdgeConnecting_internal() argument
161 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in hasEdgeConnecting_internal()
165 protected final V edgeValueOrDefault_internal(N nodeU, N nodeV, V defaultValue) { in edgeValueOrDefault_internal() argument
166 GraphConnections<N, V> connectionsU = nodeConnections.get(nodeU); in edgeValueOrDefault_internal()
DAbstractBaseGraph.java94 && nodes().contains(endpointPair.nodeU()) in edges()
95 && successors((N) endpointPair.nodeU()).contains(endpointPair.nodeV()); in edges()
129 public boolean hasEdgeConnecting(N nodeU, N nodeV) {
130 checkNotNull(nodeU);
132 return nodes().contains(nodeU) && successors(nodeU).contains(nodeV);
141 N nodeU = endpoints.nodeU();
143 return nodes().contains(nodeU) && successors(nodeU).contains(nodeV);
265 Object nodeU = endpointPair.nodeU();
268 return (node.equals(nodeV) && adjacent.contains(nodeU))
269 || (node.equals(nodeU) && adjacent.contains(nodeV));
DConfigurableMutableGraph.java50 public boolean putEdge(N nodeU, N nodeV) { in putEdge() argument
51 return backingValueGraph.putEdgeValue(nodeU, nodeV, Presence.EDGE_EXISTS) == null; in putEdge()
57 return putEdge(endpoints.nodeU(), endpoints.nodeV()); in putEdge()
66 public boolean removeEdge(N nodeU, N nodeV) { in removeEdge() argument
67 return backingValueGraph.removeEdge(nodeU, nodeV) != null; in removeEdge()
73 return removeEdge(endpoints.nodeU(), endpoints.nodeV()); in removeEdge()
DGraphs.java171 for (N nodeU : reachableNodes) { in transitiveClosure()
173 transitiveClosure.putEdge(nodeU, nodeV); in transitiveClosure()
306 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
307 return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose in hasEdgeConnecting()
351 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
352 return delegate().hasEdgeConnecting(nodeV, nodeU); // transpose in hasEdgeConnecting()
362 public V edgeValueOrDefault(N nodeU, N nodeV, @NullableDecl V defaultValue) { in edgeValueOrDefault() argument
363 return delegate().edgeValueOrDefault(nodeV, nodeU, defaultValue); // transpose in edgeValueOrDefault()
418 return EndpointPair.of(network, endpointPair.nodeV(), endpointPair.nodeU()); // transpose in incidentNodes()
422 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() argument
[all …]
DForwardingNetwork.java123 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() argument
124 return delegate().edgesConnecting(nodeU, nodeV); in edgesConnecting()
133 public E edgeConnectingOrNull(N nodeU, N nodeV) { in edgeConnectingOrNull() argument
134 return delegate().edgeConnectingOrNull(nodeU, nodeV); in edgeConnectingOrNull()
143 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
144 return delegate().hasEdgeConnecting(nodeU, nodeV); in hasEdgeConnecting()
DForwardingValueGraph.java93 public boolean hasEdgeConnecting(N nodeU, N nodeV) { in hasEdgeConnecting() argument
94 return delegate().hasEdgeConnecting(nodeU, nodeV); in hasEdgeConnecting()
104 public V edgeValueOrDefault(N nodeU, N nodeV, @NullableDecl V defaultValue) { in edgeValueOrDefault() argument
105 return delegate().edgeValueOrDefault(nodeU, nodeV, defaultValue); in edgeValueOrDefault()
DConfigurableNetwork.java137 N nodeU = checkedReferenceNode(edge); in incidentNodes() local
138 N nodeV = nodeConnections.get(nodeU).adjacentNode(edge); in incidentNodes()
139 return EndpointPair.of(this, nodeU, nodeV); in incidentNodes()
148 public Set<E> edgesConnecting(N nodeU, N nodeV) { in edgesConnecting() argument
149 NetworkConnections<N, E> connectionsU = checkedConnections(nodeU); in edgesConnecting()
150 if (!allowsSelfLoops && nodeU == nodeV) { // just an optimization, only check reference equality in edgesConnecting()
/external/dagger2/java/dagger/internal/codegen/
DDaggerGraphs.java46 public static <N> ImmutableList<N> shortestPath(SuccessorsFunction<N> graph, N nodeU, N nodeV) { in shortestPath() argument
47 if (nodeU.equals(nodeV)) { in shortestPath()
48 return ImmutableList.of(nodeU); in shortestPath()
50 Set<N> successors = ImmutableSet.copyOf(graph.successors(nodeU)); in shortestPath()
52 return ImmutableList.of(nodeU, nodeV); in shortestPath()
57 visitedNodeToPathPredecessor.put(node, nodeU); in shortestPath()
75 while (!node.equals(nodeU)) { in shortestPath()

123