/** * 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); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ @Override public Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ public synchronized Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ public Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ @Override public synchronized Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ @Override public Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#getIncidentEdges(java.lang.Object) */ public Collection<E> getIncidentEdges(V vertex) { return delegate.getIncidentEdges(vertex); }
public Collection<E> getIncidentEdges(V vertex) { return graph.getIncidentEdges(vertex); } public Collection<V> getIncidentVertices(E edge) {
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; }
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; }
@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); }
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; }
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; }
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; }
public void layoutChanged(LayoutEvent<V, E> evt) { V v = evt.getVertex(); Graph<V,E> graph = evt.getGraph(); dirtyEdges.addAll(graph.getIncidentEdges(v)); } }
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(); } }});
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(); } }});
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(); } }});
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(); } }});
/** * @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; }