本文整理了Java中edu.uci.ics.jung.graph.Graph.getPredecessorCount()
方法的一些代码示例,展示了Graph.getPredecessorCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getPredecessorCount()
方法的具体详情如下:
包路径:edu.uci.ics.jung.graph.Graph
类名称:Graph
方法名:getPredecessorCount
[英]Returns the number of predecessors that vertex
has in this graph. Equivalent to vertex.getPredecessors().size()
.
[中]返回vertex
在此图表中的前置数。相当于vertex.getPredecessors().size()
。
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
@Override
public int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
@Override
public int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
@Override
public synchronized int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
public int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
public synchronized int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getPredecessorCount(java.lang.Object)
*/
public int getPredecessorCount(V vertex) {
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Returns the number of vertices that have an outgoing edge to the given vertex.
* @param vertex The vertex.
* @return The predecessor count.
*/
public int getPredecessorCount(Object vertex)
{
return delegate.getPredecessorCount(vertex);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public int getPredecessorCount(V vertex) {
return graph.getPredecessorCount(vertex);
}
public Collection<V> getPredecessors(V vertex) {
代码示例来源:origin: geogebra/geogebra
/**
* Returns the root of each tree of this forest as a {@code Collection}.
*/
public Collection<V> getRoots() {
Collection<V> roots = new HashSet<V>();
for (V v : delegate.getVertices()) {
if (delegate.getPredecessorCount(v) == 0) {
roots.add(v);
}
}
return roots;
}
代码示例来源:origin: net.sf.jung/jung-graph-impl
/**
* @return the root of each tree of this forest as a {@code Collection}.
*/
public Collection<V> getRoots() {
Collection<V> roots = new HashSet<V>();
for(V v : delegate.getVertices()) {
if(delegate.getPredecessorCount(v) == 0) {
roots.add(v);
}
}
return roots;
}
代码示例来源:origin: net.sf.jung/jung-graph-impl
/**
* @return the root of the tree, or null if the tree has > 1 roots
*/
public V getRoot() {
V root = null;
for (V v : delegate.getVertices()) {
if (delegate.getPredecessorCount(v) == 0) {
if (root == null) {
root = v;
} else {
// we've found > 1 root, return null
return null;
}
}
}
return root;
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2-default
/**
* Returns list of nodes that are roots of trees in the graph.
*
* @param graph
* ONDEXJUNGGraph
* @return list of root nodes
*/
private Collection<ONDEXConcept> getRoots(
Graph<ONDEXConcept, ONDEXRelation> g) {
Set<ONDEXConcept> roots = new HashSet<ONDEXConcept>();
for (ONDEXConcept n : g.getVertices()) {
// check selection of edge direction
if (reversed && g.getSuccessorCount(n) == 0) {
roots.add(n);
}
if (!reversed && g.getPredecessorCount(n) == 0) {
roots.add(n);
}
}
return roots;
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2-default
/**
* A root is defined as having no ancestors.
*
* @param g
* ONDEXJUNGGraph to get roots from
* @return Collection<ONDEXConcept> containing all root nodes
*/
private Collection<ONDEXConcept> getRoots(
Graph<ONDEXConcept, ONDEXRelation> g) {
Set<ONDEXConcept> roots = new HashSet<ONDEXConcept>();
for (ONDEXConcept n : g.getVertices()) {
// check selection of edge direction
if (reversed && g.getSuccessorCount(n) == 0) {
roots.add(n);
}
if (!reversed && g.getPredecessorCount(n) == 0) {
roots.add(n);
}
}
return roots;
}
内容来源于网络,如有侵权,请联系作者删除!