本文整理了Java中edu.uci.ics.jung.graph.Graph.getOpposite()
方法的一些代码示例,展示了Graph.getOpposite()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getOpposite()
方法的具体详情如下:
包路径:edu.uci.ics.jung.graph.Graph
类名称:Graph
方法名:getOpposite
[英]Returns the vertex at the other end of edge
from vertex
. (That is, returns the vertex incident to edge
which is not vertex
.)
[中]从vertex
返回edge
另一端的顶点。(即,将顶点事件返回到edge
,而不是vertex
)
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object, java.lang.Object)
*/
public V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object,
* java.lang.Object)
*/
@Override
public synchronized V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object, java.lang.Object)
*/
public synchronized V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object,
* java.lang.Object)
*/
@Override
public V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object, java.lang.Object)
*/
public V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public V getOpposite(V vertex, E edge) {
return graph.getOpposite(vertex, edge);
}
public Collection<E> getOutEdges(V vertex) {
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Graph#getOpposite(java.lang.Object,
* java.lang.Object)
*/
@Override
public V getOpposite(V vertex, E edge) {
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Returns the other endpoint of the edge.
* @param vertex The vertex.
* @param edge The edge.
* @return The opposit.
*/
public Object getOpposite(Object vertex, Object edge)
{
return delegate.getOpposite(vertex, edge);
}
代码示例来源:origin: net.sf.jung/jung-api
protected int getIndex(Graph<V,E> graph, E e, V v) {
Collection<E> commonEdgeSet = new HashSet<E>();
for(E another : graph.getIncidentEdges(v)) {
V u = graph.getOpposite(v, another);
if(u.equals(v)) {
commonEdgeSet.add(another);
}
}
int count=0;
for(E other : commonEdgeSet) {
if(e.equals(other) == false) {
edge_index.put(other, count);
count++;
}
}
edge_index.put(e, count);
return count;
}
代码示例来源:origin: geogebra/geogebra
protected int getIndex(Graph<V, E> graph, E e, V v) {
Collection<E> commonEdgeSet = new HashSet<E>();
for (E another : graph.getIncidentEdges(v)) {
V u = graph.getOpposite(v, another);
if (u.equals(v)) {
commonEdgeSet.add(another);
}
}
int count = 0;
for (E other : commonEdgeSet) {
if (e.equals(other) == false) {
edge_index.put(other, count);
count++;
}
}
edge_index.put(e, count);
return count;
}
代码示例来源:origin: net.sf.jung/jung-visualization
protected int getIndex(Graph<V,E> graph, E e, V v) {
Collection<E> commonEdgeSet = new HashSet<E>();
for(E another : graph.getIncidentEdges(v)) {
V u = graph.getOpposite(v, another);
if(u.equals(v)) {
commonEdgeSet.add(another);
}
}
int count=0;
for(E other : commonEdgeSet) {
if(e.equals(other) == false) {
edge_index.put(other, count);
count++;
}
}
edge_index.put(e, count);
return count;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
AgentGroup u = (AgentGroup)graph.getOpposite(v, other);
if(u.equals(v))
代码示例来源:origin: net.sf.jung/jung-api
protected int getIndex(Graph<V,E> graph, E e, V v) {
Collection<E> commonEdgeSet = new HashSet<E>();
for(E another : graph.getIncidentEdges(v)) {
V u = graph.getOpposite(v, another);
if(u.equals(v)) {
commonEdgeSet.add(another);
}
}
int count=0;
for(E other : commonEdgeSet) {
if(e.equals(other) == false) {
edge_index.put(Context.<Graph<V,E>,E>getInstance(graph,other), count);
count++;
}
}
edge_index.put(Context.<Graph<V,E>,E>getInstance(graph,e), count);
return count;
}
代码示例来源:origin: geogebra/geogebra
protected int getIndex(Graph<V, E> graph, E e, V v) {
Collection<E> commonEdgeSet = new HashSet<E>();
for (E another : graph.getIncidentEdges(v)) {
V u = graph.getOpposite(v, another);
if (u.equals(v)) {
commonEdgeSet.add(another);
}
}
int count = 0;
for (E other : commonEdgeSet) {
if (e.equals(other) == false) {
edge_index.put(
Context.<Graph<V, E>, E> getInstance(graph, other),
count);
count++;
}
}
edge_index.put(Context.<Graph<V, E>, E> getInstance(graph, e), count);
return count;
}
代码示例来源:origin: geogebra/geogebra
E incoming = incomingEdges.get(current);
path.addFirst(incoming);
current = ((Graph<V, E>) g).getOpposite(current, incoming);
代码示例来源:origin: net.sf.jung/jung-algorithms
current = ((Graph<V,E>)g).getOpposite(current, incoming);
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
current = ((Graph<V,E>)g).getOpposite(current, incoming);
代码示例来源:origin: net.sf.jung/jung-algorithms
protected void updateRankings() {
for (V v : getVertices()) {
Collection<E> incomingEdges = getGraph().getInEdges(v);
double currentPageRankSum = 0;
for (E e : incomingEdges) {
double currentWeight = getEdgeWeight(e);
currentPageRankSum +=
mPreviousRankingsMap.get(getGraph().getOpposite(v,e)).doubleValue()*currentWeight;
}
setCurrentRankScore(v,currentPageRankSum);
}
}
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
protected void updateRankings() {
for (V v : getVertices()) {
Collection<E> incomingEdges = getGraph().getInEdges(v);
double currentPageRankSum = 0;
for (E e : incomingEdges) {
double currentWeight = getEdgeWeight(e);
currentPageRankSum +=
mPreviousRankingsMap.get(getGraph().getOpposite(v,e)).doubleValue()*currentWeight;
}
setCurrentRankScore(v,currentPageRankSum);
}
}
}
代码示例来源:origin: net.sf.jung/jung-3d
V v2 = getGraph().getOpposite(v1, e);
内容来源于网络,如有侵权,请联系作者删除!