本文整理了Java中com.google.common.graph.Network.successors()
方法的一些代码示例,展示了Network.successors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.successors()
方法的具体详情如下:
包路径:com.google.common.graph.Network
类名称:Network
方法名:successors
暂无
代码示例来源:origin: google/guava
@Override
public Set<N> successors(N node) {
return network.successors(node);
}
代码示例来源:origin: google/guava
@Override
public Set<N> predecessors(N node) {
return delegate().successors(node); // transpose
}
代码示例来源:origin: google/guava
@Override
public Set<N> successors(N node) {
return delegate().successors(node);
}
代码示例来源:origin: google/j2objc
@Override
public Set<N> successors(N node) {
return delegate().successors(node);
}
代码示例来源:origin: google/j2objc
@Override
public Set<N> predecessors(N node) {
return delegate().successors(node); // transpose
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<N> predecessors(N node) {
return delegate().successors(node); // transpose
}
代码示例来源:origin: wildfly/wildfly
@Override
public Set<N> successors(N node) {
return delegate().successors(node);
}
代码示例来源:origin: google/guava
assertThat(asGraph.edges()).contains(EndpointPair.of(network, nodeU, nodeV));
assertThat(network.edgesConnecting(nodeU, nodeV)).contains(edge);
assertThat(network.successors(nodeU)).contains(nodeV);
assertThat(network.adjacentNodes(nodeU)).contains(nodeV);
assertThat(network.outEdges(nodeU)).contains(edge);
assertThat(network.successors(node)).isEqualTo(asGraph.successors(node));
} else {
assertThat(network.predecessors(node)).isEqualTo(network.adjacentNodes(node));
assertThat(network.successors(node)).isEqualTo(network.adjacentNodes(node));
assertThat(network.inEdges(node)).isEqualTo(network.incidentEdges(node));
assertThat(network.outEdges(node)).isEqualTo(network.incidentEdges(node));
assertThat(network.successors(node).contains(otherNode)).isEqualTo(connected);
assertThat(network.predecessors(otherNode).contains(node)).isEqualTo(connected);
for (E edge : edgesConnecting) {
assertTrue(
network.predecessors(node).contains(adjacentNode)
|| network.successors(node).contains(adjacentNode));
assertTrue(
!network.edgesConnecting(node, adjacentNode).isEmpty()
assertThat(network.successors(predecessor)).contains(node);
assertThat(network.edgesConnecting(predecessor, node)).isNotEmpty();
for (N successor : sanityCheckSet(network.successors(node))) {
assertThat(network.predecessors(successor)).contains(node);
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public Set<N> successors(N node) {
return delegate().successors(node);
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public Set<N> predecessors(N node) {
return delegate().successors(node); // transpose
}
代码示例来源:origin: com.google.guava/guava-tests
@Override
public Set<N> successors(N node) {
return network.successors(node);
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public Set<N> predecessors(N node) {
return delegate().successors(node); // transpose
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public Set<N> successors(N node) {
return delegate().successors(node);
}
代码示例来源:origin: jrtom/jung
for (N w : g.successors(v)) {
for (E e : g.edgesConnecting(v, w)) {
if (!sd.distances.containsKey(w)) {
代码示例来源:origin: jrtom/jung
/** Updates the value for this node. */
@Override
protected double update(N v) {
collectDisappearingPotential(v);
double v_auth = 0;
for (N u : graph.predecessors(v)) {
for (E e : graph.edgesConnecting(u, v)) {
v_auth += (getCurrentValue(u).hub * getEdgeWeight(u, e).doubleValue());
}
}
double v_hub = 0;
for (N w : graph.successors(v)) {
for (E e : graph.edgesConnecting(v, w)) {
v_hub += (getCurrentValue(w).authority * getEdgeWeight(w, e).doubleValue());
}
}
// modify total_input according to alpha
if (alpha > 0) {
v_auth = v_auth * (1 - alpha) + getNodePrior(v).authority * alpha;
v_hub = v_hub * (1 - alpha) + getNodePrior(v).hub * alpha;
}
setOutputValue(v, new HITS.Scores(v_hub, v_auth));
return Math.max(
Math.abs(getCurrentValue(v).hub - v_hub), Math.abs(getCurrentValue(v).authority - v_auth));
}
代码示例来源:origin: com.google.guava/guava-tests
assertThat(asGraph.edges()).contains(EndpointPair.of(network, nodeU, nodeV));
assertThat(network.edgesConnecting(nodeU, nodeV)).contains(edge);
assertThat(network.successors(nodeU)).contains(nodeV);
assertThat(network.adjacentNodes(nodeU)).contains(nodeV);
assertThat(network.outEdges(nodeU)).contains(edge);
assertThat(network.successors(node)).isEqualTo(asGraph.successors(node));
} else {
assertThat(network.predecessors(node)).isEqualTo(network.adjacentNodes(node));
assertThat(network.successors(node)).isEqualTo(network.adjacentNodes(node));
assertThat(network.inEdges(node)).isEqualTo(network.incidentEdges(node));
assertThat(network.outEdges(node)).isEqualTo(network.incidentEdges(node));
assertThat(network.successors(node).contains(otherNode)).isEqualTo(connected);
assertThat(network.predecessors(otherNode).contains(node)).isEqualTo(connected);
for (E edge : edgesConnecting) {
assertTrue(
network.predecessors(node).contains(adjacentNode)
|| network.successors(node).contains(adjacentNode));
assertTrue(
!network.edgesConnecting(node, adjacentNode).isEmpty()
assertThat(network.successors(predecessor)).contains(node);
assertThat(network.edgesConnecting(predecessor, node)).isNotEmpty();
for (N successor : sanityCheckSet(network.successors(node))) {
assertThat(network.predecessors(successor)).contains(node);
内容来源于网络,如有侵权,请联系作者删除!