/** * @see edu.uci.ics.jung.graph.Hypergraph#removeVertex(java.lang.Object) */ public synchronized boolean removeVertex(V vertex) { return delegate.removeVertex(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#removeVertex(java.lang.Object) */ @Override public synchronized boolean removeVertex(V vertex) { return delegate.removeVertex(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#removeVertex(java.lang.Object) */ @Override public boolean removeVertex(V vertex) { return delegate.removeVertex(vertex); }
/** * @see edu.uci.ics.jung.graph.Hypergraph#removeVertex(java.lang.Object) */ public boolean removeVertex(V vertex) { return delegate.removeVertex(vertex); }
public boolean removeVertex(V vertex) { return graph.removeVertex(vertex); } }
/** * Removes a vertex. * @param vertex The vertex. * @return <code>true</code> if success. */ public boolean removeVertex(Object vertex) { internal_removeVertex(vertex); return delegate.removeVertex(vertex); }
/** * Remove an outer layer of the graph (i.e. any nodes with an inDegree of 0) * * <p>Returns the set of removed vertices */ public static <V, E> Set<V> removeLayer(Graph<V, E> graph) { Set<V> toRemove = new HashSet<>(); for (V v : graph.getVertices()) { if (graph.inDegree(v) == 0) { toRemove.add(v); } } for (V v : toRemove) graph.removeVertex(v); return toRemove; }
/** * Remove an outer layer of the graph (i.e. any nodes with an inDegree of 0) * * <p>Returns the set of removed vertices */ public static <V, E> Set<V> removeLayer(Graph<V, E> graph) { Set<V> toRemove = new HashSet<>(); for (V v : graph.getVertices()) { if (graph.inDegree(v) == 0) { toRemove.add(v); } } for (V v : toRemove) graph.removeVertex(v); return toRemove; }
public void actionPerformed(ActionEvent e) { pickedVertexState.pick(vertex, false); graph.removeVertex(vertex); vv.repaint(); }}); } else if(edge != null) {
/** * remove the passed node, and all nodes that are descendants of the passed * node. * * @param vertex * @return <code>true</code> iff the tree was modified * @see edu.uci.ics.jung.graph.Graph#removeVertex(java.lang.Object) */ @Override public boolean removeVertex(V vertex) { if (!delegate.containsVertex(vertex)) { return false; } for (V v : getChildren(vertex)) { removeVertex(v); vertex_depths.remove(v); } // recalculate height vertex_depths.remove(vertex); return delegate.removeVertex(vertex); }
/** * remove the passed node, and all nodes that are descendants of the * passed node. * @param vertex the vertex to remove * @return <code>true</code> iff the tree was modified * @see edu.uci.ics.jung.graph.Graph#removeVertex(java.lang.Object) */ @Override public boolean removeVertex(V vertex) { if (!delegate.containsVertex(vertex)) return false; for(V v : getChildren(vertex)) { removeVertex(v); vertex_depths.remove(v); } // recalculate height vertex_depths.remove(vertex); return delegate.removeVertex(vertex); }
public ArrayList<Vertex> drawFromDeploymentModel() { Collection<Edge> c = new ArrayList<Edge>(graph.getEdges()); for (Edge e : c) { graph.removeEdge(e); } Collection<Vertex> vs = new ArrayList<Vertex>(graph.getVertices()); for (Vertex ve : vs) { graph.removeVertex(ve); } ArrayList<Vertex> v = drawVerticesFromDeploymentModel(dmodel); drawEdgesFromDeploymentModel(dmodel, v); System.out.println(vv); return v; }
/** * Removes <code>vertex</code> from this tree. * If <code>remove_subtrees</code> is <code>true</code>, removes * the subtrees rooted at the children of <code>vertex</code>. * Otherwise, leaves these subtrees intact as new component trees of this * forest. * @param vertex the vertex to remove * @param remove_subtrees if <code>true</code>, remove the subtrees * rooted at <code>vertex</code>'s children * @return <code>true</code> iff the tree was modified */ public boolean removeVertex(V vertex, boolean remove_subtrees) { if (!delegate.containsVertex(vertex)) return false; if (remove_subtrees) for(V v : new ArrayList<V>(delegate.getSuccessors(vertex))) removeVertex(v, true); return delegate.removeVertex(vertex); }
/** * Removes <code>vertex</code> from this tree. If * <code>remove_subtrees</code> is <code>true</code>, removes the subtrees * rooted at the children of <code>vertex</code>. Otherwise, leaves these * subtrees intact as new component trees of this forest. * * @param vertex * the vertex to remove * @param remove_subtrees * if <code>true</code>, remove the subtrees rooted at * <code>vertex</code>'s children * @return <code>true</code> iff the tree was modified */ public boolean removeVertex(V vertex, boolean remove_subtrees) { if (!delegate.containsVertex(vertex)) { return false; } if (remove_subtrees) { for (V v : new ArrayList<V>(delegate.getSuccessors(vertex))) { removeVertex(v, true); } } return delegate.removeVertex(vertex); }
public void drawFromDeploymentModel(){ Collection<Edge> c = new ArrayList<Edge>(graph.getEdges()); for(Edge e : c) graph.removeEdge(e); Collection<Vertex> vs =new ArrayList<Vertex>(graph.getVertices()); for(Vertex ve : vs) graph.removeVertex(ve); ArrayList<Vertex> v = drawVerticesFromDeploymentModel(dmodel); drawEdgesFromDeploymentModel(dmodel, v); nodeTypes.removeAll(); nodeTypes.setModel(fillList()); }
/** * @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; }
/** * @return the graph for this demo */ Graph<String,Number> getGraph() { Graph<String,Number> g = new EppsteinPowerLawGenerator<String,Number>( new GraphFactory(), new VertexFactory(), new EdgeFactory(), 26, 50, 50).get(); Set<String> removeMe = new HashSet<String>(); for (String v : g.getVertices()) { if ( g.degree(v) == 0 ) { removeMe.add( v ); } } for(String v : removeMe) { g.removeVertex(v); } return g; }
@Override public void rebuildGraph() { for (GUILink gl : new ArrayList<>(g.getEdges())) g.removeEdge(gl); for (GUINode gn : new ArrayList<>(g.getVertices())) g.removeVertex(gn); for (GUINode gn : callback.getVisualizationState().getCanvasAllGUINodes()) g.addVertex(gn); for (GUILink gl : callback.getVisualizationState().getCanvasAllGUILinks(true, true)) g.addEdge(gl, gl.getOriginNode(), gl.getDestinationNode()); updateAllVerticesXYPosition(); refresh(); }
&& (topo.outDegree(src.getNode()) == 0)) { log.debug("Removing vertex {}", src); topo.removeVertex(src.getNode()); && (topo.outDegree(dst.getNode()) == 0)) { log.debug("Removing vertex {}", dst); topo.removeVertex(dst.getNode());