Removes the given vertex and its edges from the graph.

@param vertex the vertex to remove
@return the new graph containing the existing vertices and edges without
the removed vertex and its edges
770240
public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) {

		List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>();
		vertexToBeRemoved.add(vertex);

		return removeVertices(vertexToBeRemoved);
	}
940875
public void addVertex(Vertex vertex)
	{
		if (!name.equals(vertex.baseName()))
			return;

		vertexes.add(vertex);
	}
437271
public void removeNode(N node)
    {
        Pair<HashSet<N>, HashSet<N>> p = nodes.remove(node);
        if(p == null)
            return;
        //Outgoing edges we can ignore removint he node drops them. We need to avoid dangling incoming edges to this node we have removed
        HashSet<N> incomingNodes = p.getIncoming();
        for(N incomingNode : incomingNodes)
            nodes.get(incomingNode).getOutgoing().remove(node);
    }
527179
public OGraphVertex unlink(final OGraphVertex iTargetVertex) {
		if (iTargetVertex == null)
			throw new IllegalArgumentException("Missed the target vertex");

		unlink(database, document, iTargetVertex.getDocument());

		return this;
	}
1053316
public Graph<K, VV, EV> addVertex(final Vertex<K, VV> vertex) {
		List<Vertex<K, VV>> newVertex = new ArrayList<>();
		newVertex.add(vertex);

		return addVertices(newVertex);
	}
1062365
public static Vertex newB()
    {
        return new Vertex(Predefine.TAG_BIGIN, " ", new CoreDictionary.Attribute(Nature.begin, Predefine.MAX_FREQUENCY / 10), CoreDictionary.getWordID(Predefine.TAG_BIGIN));
    }
1085646
def make_subgraph(graph, vertices, edges):
    """"""
    # Copy the entire graph
    local_graph = copy.deepcopy(graph)

    # Remove all the edges that aren't in the list
    edges_to_delete = [x for x in local_graph.get_all_edge_ids() if x not in edges]
    for e in edges_to_delete:
        local_graph.delete_edge_by_id(e)

    # Remove all the vertices that aren't in the list
    nodes_to_delete = [x for x in local_graph.get_all_node_ids() if x not in vertices]
    for n in nodes_to_delete:
        local_graph.delete_node(n)

    return local_graph
994962
public void clear() {
        vertices.clear();
        vertexModCount++;
        Arrays.matrixFill(edges, null);
        edgeCount = 0;
        edgesArr = null;
        edgeModCount++;
        freeList.clear();
        for (int row = capacity - 1; row >= 0; row--) {
            freeList.add(row);
        }
    }
842361
protected void removeEdgeWithoutCallback(EdgeBean eBean) {
        if (eBean == null) {
            return;
        }

        // Update in and out vertices
        VertexBean outV = eBean.outVertex;
        VertexBean inV = eBean.inVertex;

        outV.outEdges = removeEdgeFromAdjList(outV.outEdges, eBean); // CompactSet.<EdgeBean>remove(outV.outEdges, eBean);
        inV.inEdges = removeEdgeFromAdjList(inV.inEdges, eBean);; // CompactSet.<EdgeBean>remove(inV.inEdges, eBean);
    }
971681
def unshift_edge(edge)
	    @vertices.unshift(edge.last) unless edge.last == @edges.first.first
	    @vertices.unshift(edge.first) # unless edge.first == @edges.last.last
	    @vertices.pop if @vertices.last == @vertices.first
	    @edges.unshift(edge)
	end
590563
public Model deleteVertex(Vertex vertex) {
    edges.removeIf(edge -> vertex.equals(edge.getSourceVertex()) || vertex.equals(edge.getTargetVertex()));
    vertices.remove(vertex);
    return this;
  }
1297276
void removeVertexLabel(VertexLabel vertexLabel, boolean preserveData) {
        getTopology().lock();
        String fn = this.name + "." + VERTEX_PREFIX + vertexLabel.getName();
        if (!uncommittedRemovedVertexLabels.contains(fn)) {
            uncommittedRemovedVertexLabels.add(fn);
            TopologyManager.removeVertexLabel(this.sqlgGraph, vertexLabel);
            for (EdgeRole er : vertexLabel.getOutEdgeRoles().values()) {
                er.remove(preserveData);
            }
            for (EdgeRole er : vertexLabel.getInEdgeRoles().values()) {
                er.remove(preserveData);
            }
            if (!preserveData) {
                vertexLabel.delete();
            }
            getTopology().fire(vertexLabel, "", TopologyChangeAction.DELETE);
        }

    }
1091268
protected Node removeNode( Node node )
    {
        // Remove node.
        node.previous.next = node.next;
        node.next.previous = node.previous;
        node.removed = true;
        return node;
    }
281300
public void removeEdge(AtlasEdge edge) {
        String edgeString = null;

        if (LOG.isDebugEnabled()) {
            edgeString = string(edge);

            LOG.debug("Removing {}", edgeString);
        }

        graph.removeEdge(edge);

        if (LOG.isDebugEnabled()) {
            LOG.info("Removed {}", edgeString);
        }
    }
384686
public Graph<K, VV, EV> union(Graph<K, VV, EV> graph) {
		DataSet<Vertex<K, VV>> unionedVertices = graph
			.getVertices()
			.union(this.getVertices())
				.name("Vertices")
			.distinct()
				.name("Vertices");

		DataSet<Edge<K, EV>> unionedEdges = graph
			.getEdges()
			.union(this.getEdges())
				.name("Edges");

		return new Graph<>(unionedVertices, unionedEdges, this.context);
	}
455033
def unlink(self, node, hyperedge):
        
        self.node_links[node].remove(hyperedge)
        self.edge_links[hyperedge].remove(node)
        self.graph.del_edge(((node,'n'), (hyperedge,'h')))
1103241
def remove_vertex(self, vertex):
        
        try:
            self.vertices.pop(vertex)
            self.succ.pop(vertex)
        except KeyError:
            raise GraphInsertError("Vertex %s doesn't exist." % (vertex,))
        if vertex in self.nodes:
            self.nodes.pop(vertex)
        for element in self.vertices:
            if vertex in self.vertices[element]:
                self.vertices[element].remove(vertex)
        edges = []  # List for edges that include vertex
        for element in self.edges:
            if vertex in element:
                edges.append(element)
        for element in edges:
            del self.edges[element]
        for element in self.pred:
            if vertex in self.pred[element]:
                self.pred[element].remove(vertex)
        for element in self.succ:
            if vertex in self.succ[element]:
                self.succ[element].remove(vertex)