本文整理了Java中edu.uci.ics.jung.graph.Graph.getOutEdges()
方法的一些代码示例,展示了Graph.getOutEdges()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getOutEdges()
方法的具体详情如下:
包路径:edu.uci.ics.jung.graph.Graph
类名称:Graph
方法名:getOutEdges
[英]Returns a Collection
view of the outgoing edges incident to vertex
in this graph.
[中]返回此图中与vertex
关联的传出边的Collection
视图。
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
@Override
public Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
public Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
@Override
public synchronized Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
@Override
public Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
@Override
public Collection<E> getChildEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
public synchronized Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOutEdges(java.lang.Object)
*/
public Collection<E> getOutEdges(V vertex) {
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Returns the outgoing edges of the vertex.
* @param vertex The vertx
* @return The collection of edges.
*/
public Collection getOutEdges(Object vertex)
{
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-graph-impl
public Collection<E> getChildEdges(V vertex)
{
return delegate.getOutEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public Collection<E> getOutEdges(V vertex) {
return graph.getOutEdges(vertex);
}
public int getPredecessorCount(V vertex) {
代码示例来源:origin: geogebra/geogebra
/**
* Returns the set of edges incident to <code>v</code> that should be
* tested. By default, this is the set of outgoing edges for instances of
* <code>Graph</code>, the set of incident edges for instances of
* <code>Hypergraph</code>, and is otherwise undefined.
*/
protected Collection<E> getEdgesToCheck(V v) {
if (g instanceof Graph) {
return ((Graph<V, E>) g).getOutEdges(v);
}
return g.getIncidentEdges(v);
}
代码示例来源:origin: citiususc/hipster
@Override
public Iterable<GraphEdge<V, E>> outgoingEdgesOf(V vertex) {
try {
// getOutEdges blueprints impl throws null pointer exception
final Collection<E> outEdges = graph.getOutEdges(vertex);
if (outEdges == null || outEdges.isEmpty()) {
return Collections.emptyList();
}
return adapt(outEdges);
} catch (NullPointerException e){
return Collections.emptyList();
}
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
/**
* Returns the set of edges incident to <code>v</code> that should be tested.
* By default, this is the set of outgoing edges for instances of <code>Graph</code>,
* the set of incident edges for instances of <code>Hypergraph</code>,
* and is otherwise undefined.
*/
protected Collection<E> getEdgesToCheck(V v)
{
if (g instanceof Graph)
return ((Graph<V,E>)g).getOutEdges(v);
else
return g.getIncidentEdges(v);
}
代码示例来源:origin: net.sf.jung/jung-algorithms
/**
* Returns the set of edges incident to <code>v</code> that should be tested.
* By default, this is the set of outgoing edges for instances of <code>Graph</code>,
* the set of incident edges for instances of <code>Hypergraph</code>,
* and is otherwise undefined.
* @param v the vertex whose edges are to be checked
* @return the set of edges incident to {@code v} that should be tested
*/
protected Collection<E> getEdgesToCheck(V v)
{
if (g instanceof Graph)
return ((Graph<V,E>)g).getOutEdges(v);
else
return g.getIncidentEdges(v);
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
protected void assignDefaultEdgeTransitionWeights() {
for (V currentVertex : getVertices()) {
Collection<E> outgoingEdges = mGraph.getOutEdges(currentVertex);
double numOutEdges = outgoingEdges.size();
for (E currentEdge : outgoingEdges) {
setEdgeWeight(currentEdge,1.0/numOutEdges);
}
}
}
代码示例来源:origin: net.sf.jung/jung-algorithms
protected void assignDefaultEdgeTransitionWeights() {
for (V currentVertex : getVertices()) {
Collection<E> outgoingEdges = mGraph.getOutEdges(currentVertex);
double numOutEdges = outgoingEdges.size();
for (E currentEdge : outgoingEdges) {
setEdgeWeight(currentEdge,1.0/numOutEdges);
}
}
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
protected void normalizeEdgeTransitionWeights() {
for (V currentVertex : getVertices()) {
Collection<E> outgoingEdges = mGraph.getOutEdges(currentVertex);
double totalEdgeWeight = 0;
for (E currentEdge : outgoingEdges) {
totalEdgeWeight += getEdgeWeight(currentEdge);
}
for (E currentEdge : outgoingEdges) {
setEdgeWeight(currentEdge,getEdgeWeight(currentEdge)/totalEdgeWeight);
}
}
}
代码示例来源:origin: net.sf.jung/jung-algorithms
protected void normalizeEdgeTransitionWeights() {
for (V currentVertex : getVertices()) {
Collection<E> outgoingEdges = mGraph.getOutEdges(currentVertex);
double totalEdgeWeight = 0;
for (E currentEdge : outgoingEdges) {
totalEdgeWeight += getEdgeWeight(currentEdge);
}
for (E currentEdge : outgoingEdges) {
setEdgeWeight(currentEdge,getEdgeWeight(currentEdge)/totalEdgeWeight);
}
}
}
代码示例来源:origin: uk.gov.dstl.baleen/baleen-orderers
/** Find and remove simple loops (e.g. a -> b -> a) from a Jung graph */
public static <V, E> void removeLoops(Graph<V, E> graph) {
for (V v : graph.getVertices()) {
for (E e : graph.getOutEdges(v)) {
V dest = graph.getDest(e);
E returnEdge = graph.findEdge(dest, v);
if (returnEdge != null) {
LOGGER.warn(
"Loop detected between {} and {}. Original order will be preserved.",
getName(v),
getName(dest));
graph.removeEdge(returnEdge);
}
}
}
}
代码示例来源:origin: dstl/baleen
/** Find and remove simple loops (e.g. a -> b -> a) from a Jung graph */
public static <V, E> void removeLoops(Graph<V, E> graph) {
for (V v : graph.getVertices()) {
for (E e : graph.getOutEdges(v)) {
V dest = graph.getDest(e);
E returnEdge = graph.findEdge(dest, v);
if (returnEdge != null) {
LOGGER.warn(
"Loop detected between {} and {}. Original order will be preserved.",
getName(v),
getName(dest));
graph.removeEdge(returnEdge);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!