本文整理了Java中edu.uci.ics.jung.graph.Graph.getIncidentEdges()
方法的一些代码示例,展示了Graph.getIncidentEdges()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getIncidentEdges()
方法的具体详情如下:
包路径:edu.uci.ics.jung.graph.Graph
类名称:Graph
方法名:getIncidentEdges
暂无
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Returns the incident edges of the vertex.
* @param vertex The vertex.
* @return The collection of edges.
*/
public Collection getIncidentEdges(Object vertex)
{
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
@Override
public Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
public synchronized Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
public Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
@Override
public synchronized Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: geogebra/geogebra
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
@Override
public Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object)
*/
public Collection<E> getIncidentEdges(V vertex) {
return delegate.getIncidentEdges(vertex);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public Collection<E> getIncidentEdges(V vertex) {
return graph.getIncidentEdges(vertex);
}
public Collection<V> getIncidentVertices(E edge) {
代码示例来源:origin: geogebra/geogebra
protected int getIndex(Graph<V, E> graph, E e, V u, V v) {
Collection<E> commonEdgeSet = new HashSet<E>(graph.getIncidentEdges(u));
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-api
protected int getIndex(Graph<V,E> graph, E e, V u, V v) {
Collection<E> commonEdgeSet = new HashSet<E>(graph.getIncidentEdges(u));
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: citiususc/hipster
@Override
public Iterable<GraphEdge<V, E>> edgesOf(V vertex) {
final Collection<E> edges = graph.getIncidentEdges(vertex);
if (edges == null || edges.isEmpty()){
return Collections.emptyList();
}
return adapt(edges);
}
代码示例来源: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-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: 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.sf.jung/jung-visualization
public void layoutChanged(LayoutEvent<V, E> evt) {
V v = evt.getVertex();
Graph<V,E> graph = evt.getGraph();
dirtyEdges.addAll(graph.getIncidentEdges(v));
}
}
代码示例来源:origin: net.sf.jung/jung-samples
public void actionPerformed(ActionEvent e) {
Collection picked = vv.getPickedVertexState().getPicked();
if(picked.size() == 2) {
Pair pair = new Pair(picked);
Graph graph = layout.getGraph();
Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
exclusions.addAll(edges);
vv.repaint();
}
}});
代码示例来源:origin: net.sf.jung/jung-samples
public void actionPerformed(ActionEvent e) {
Collection picked = vv.getPickedVertexState().getPicked();
if(picked.size() == 2) {
Pair pair = new Pair(picked);
Graph graph = layout.getGraph();
Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
exclusions.removeAll(edges);
vv.repaint();
}
}});
代码示例来源:origin: net.sf.jung/jung-samples
public void actionPerformed(ActionEvent e) {
Collection picked = vv.getPickedVertexState().getPicked();
if(picked.size() == 2) {
Pair pair = new Pair(picked);
Graph graph = layout.getGraph();
Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
exclusions.addAll(edges);
vv.repaint();
}
}});
代码示例来源:origin: net.sf.jung/jung-samples
public void actionPerformed(ActionEvent e) {
Collection picked = vv.getPickedVertexState().getPicked();
if(picked.size() == 2) {
Pair pair = new Pair(picked);
Graph graph = layout.getGraph();
Collection edges = new HashSet(graph.getIncidentEdges(pair.getFirst()));
edges.retainAll(graph.getIncidentEdges(pair.getSecond()));
exclusions.removeAll(edges);
vv.repaint();
}
}});
代码示例来源:origin: net.sf.jung/jung-api
/**
* @see edu.uci.ics.jung.graph.Hypergraph#removeVertex(java.lang.Object)
*/
@Override
public boolean removeVertex(V vertex) {
// remove all incident edges first, so that the appropriate events will
// be fired (otherwise they'll be removed inside {@code delegate.removeVertex}
// and the events will not be fired)
Collection<E> incident_edges = new ArrayList<E>(delegate.getIncidentEdges(vertex));
for (E e : incident_edges)
this.removeEdge(e);
boolean state = delegate.removeVertex(vertex);
if(state) {
GraphEvent<V,E> evt = new GraphEvent.Vertex<V,E>(delegate, GraphEvent.Type.VERTEX_REMOVED, vertex);
fireGraphEvent(evt);
}
return state;
}
内容来源于网络,如有侵权,请联系作者删除!