Home
last modified time | relevance | path

Searched refs:selfLoopCount (Results 1 – 14 of 14) sorted by relevance

/external/guava/guava/src/com/google/common/graph/
DAbstractDirectedNetworkConnections.java49 private int selfLoopCount; field in AbstractDirectedNetworkConnections
52 Map<E, N> inEdgeMap, Map<E, N> outEdgeMap, int selfLoopCount) { in AbstractDirectedNetworkConnections() argument
55 this.selfLoopCount = checkNonNegative(selfLoopCount); in AbstractDirectedNetworkConnections()
56 checkState(selfLoopCount <= inEdgeMap.size() && selfLoopCount <= outEdgeMap.size()); in AbstractDirectedNetworkConnections()
70 (selfLoopCount == 0) in incidentEdges()
78 return IntMath.saturatedAdd(inEdgeMap.size(), outEdgeMap.size() - selfLoopCount); in incidentEdges()
108 checkNonNegative(--selfLoopCount);
126 checkPositive(++selfLoopCount);
DDirectedNetworkConnections.java38 Map<E, N> inEdgeMap, Map<E, N> outEdgeMap, int selfLoopCount) { in DirectedNetworkConnections() argument
39 super(inEdgeMap, outEdgeMap, selfLoopCount); in DirectedNetworkConnections()
48 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in ofImmutable() argument
50 ImmutableBiMap.copyOf(inEdges), ImmutableBiMap.copyOf(outEdges), selfLoopCount); in ofImmutable()
DDirectedMultiNetworkConnections.java45 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in DirectedMultiNetworkConnections() argument
46 super(inEdges, outEdges, selfLoopCount); in DirectedMultiNetworkConnections()
57 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in ofImmutable() argument
59 ImmutableMap.copyOf(inEdges), ImmutableMap.copyOf(outEdges), selfLoopCount); in ofImmutable()
DImmutableNetwork.java104 int selfLoopCount = network.edgesConnecting(node, node).size(); in connectionsOf() local
106 ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount) in connectionsOf()
107 : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount); in connectionsOf()
DAbstractBaseGraph.java153 int selfLoopCount = (allowsSelfLoops() && neighbors.contains(node)) ? 1 : 0;
154 return IntMath.saturatedAdd(neighbors.size(), selfLoopCount);
/external/guava/android/guava/src/com/google/common/graph/
DAbstractDirectedNetworkConnections.java49 private int selfLoopCount; field in AbstractDirectedNetworkConnections
52 Map<E, N> inEdgeMap, Map<E, N> outEdgeMap, int selfLoopCount) { in AbstractDirectedNetworkConnections() argument
55 this.selfLoopCount = checkNonNegative(selfLoopCount); in AbstractDirectedNetworkConnections()
56 checkState(selfLoopCount <= inEdgeMap.size() && selfLoopCount <= outEdgeMap.size()); in AbstractDirectedNetworkConnections()
70 (selfLoopCount == 0) in incidentEdges()
78 return IntMath.saturatedAdd(inEdgeMap.size(), outEdgeMap.size() - selfLoopCount); in incidentEdges()
108 checkNonNegative(--selfLoopCount);
126 checkPositive(++selfLoopCount);
DDirectedNetworkConnections.java38 Map<E, N> inEdgeMap, Map<E, N> outEdgeMap, int selfLoopCount) { in DirectedNetworkConnections() argument
39 super(inEdgeMap, outEdgeMap, selfLoopCount); in DirectedNetworkConnections()
48 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in ofImmutable() argument
50 ImmutableBiMap.copyOf(inEdges), ImmutableBiMap.copyOf(outEdges), selfLoopCount); in ofImmutable()
DDirectedMultiNetworkConnections.java45 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in DirectedMultiNetworkConnections() argument
46 super(inEdges, outEdges, selfLoopCount); in DirectedMultiNetworkConnections()
57 Map<E, N> inEdges, Map<E, N> outEdges, int selfLoopCount) { in ofImmutable() argument
59 ImmutableMap.copyOf(inEdges), ImmutableMap.copyOf(outEdges), selfLoopCount); in ofImmutable()
DImmutableNetwork.java104 int selfLoopCount = network.edgesConnecting(node, node).size(); in connectionsOf() local
106 ? DirectedMultiNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount) in connectionsOf()
107 : DirectedNetworkConnections.ofImmutable(inEdgeMap, outEdgeMap, selfLoopCount); in connectionsOf()
DAbstractBaseGraph.java153 int selfLoopCount = (allowsSelfLoops() && neighbors.contains(node)) ? 1 : 0;
154 return IntMath.saturatedAdd(neighbors.size(), selfLoopCount);
/external/guava/guava-tests/test/com/google/common/graph/
DAbstractGraphTest.java132 int selfLoopCount = graph.adjacentNodes(node).contains(node) ? 1 : 0; in validateGraph() local
133 assertThat(graph.degree(node)).isEqualTo(graph.adjacentNodes(node).size() + selfLoopCount); in validateGraph()
DAbstractNetworkTest.java198 int selfLoopCount = network.edgesConnecting(node, node).size(); in validateNetwork() local
199 assertThat(network.incidentEdges(node).size() + selfLoopCount) in validateNetwork()
203 assertThat(network.incidentEdges(node).size() + selfLoopCount) in validateNetwork()
/external/guava/android/guava-tests/test/com/google/common/graph/
DAbstractGraphTest.java132 int selfLoopCount = graph.adjacentNodes(node).contains(node) ? 1 : 0; in validateGraph() local
133 assertThat(graph.degree(node)).isEqualTo(graph.adjacentNodes(node).size() + selfLoopCount); in validateGraph()
DAbstractNetworkTest.java198 int selfLoopCount = network.edgesConnecting(node, node).size(); in validateNetwork() local
199 assertThat(network.incidentEdges(node).size() + selfLoopCount) in validateNetwork()
203 assertThat(network.incidentEdges(node).size() + selfLoopCount) in validateNetwork()