Remove edge from the graph and disconnect it from nodes.

@param Edge $edge
@return NestedGraph
162102
public function removeEdge(Edge $edge): self
	{
		$id = $edge->getId();
		if (isset($this->edges[$id])) {
			$this->edges[$id]->disconnectNodes();
			unset($this->edges[$id]);
			$this->edgeAttrIndex->removeElement($edge);
			return $this;
		} else {
			throw new MissingEdgeException(sprintf("Edge \"%s\" not found in the graph.", $id));
		}
	}
633828
def delete_edges(self, edges: Iterable[Tuple[str, str]]):
        
        for edge in edges:
            if self.has_edge(*edge):
                self.remove_edge(*edge)
1055351
public function removeEdge( $source, $target )
	{
		if( $source->getNodeName() < $target->getNodeName() )
			$this->edgeSet->removeEdge( $source, $target );
		else
			$this->edgeSet->removeEdge( $target, $source );
	}
1327851
func (g *UndirectedGraph) RemoveEdge(e graph.Edge) {
	from, to := e.From(), e.To()
	if _, ok := g.nodes[from.ID()]; !ok {
		return
	}
	if _, ok := g.nodes[to.ID()]; !ok {
		return
	}

	g.edges[from.ID()] = g.edges[from.ID()].Delete(to.ID())
	g.edges[to.ID()] = g.edges[to.ID()].Delete(from.ID())
}
1355817
public function getEdgesTo(Vertex $vertex)
    {
        $that = $this;

        return $this->getEdges()->getEdgesMatch(function (Edge $edge) use ($that, $vertex) {
            return $edge->isConnection($that, $vertex);
        });
    }
1088846
public function removeChildNode(NodeInterface $childNode){
        $deleteIndex = -1;
        $idx=0;
        foreach($this->_childNodes as $child){
            if($child->getIdentifier() == $childNode->getIdentifier()){
                $deleteIndex = $idx;
                break;
            }
            $idx++;
        }
        if($deleteIndex != -1){
            unset($this->_childNodes[$deleteIndex]);
            $this->_childNodes = array_values($this->_childNodes);
        }
        return $this;
    }
1160163
private function checkOutEdges(array $edges)
    {
        foreach ($edges as $edge) {
            $node = $edge->getDestNode();
            $id = $node->getId();

            if (empty($this->checkedNodes[$id])) {
                // Don't check circular references for lazy edges
                if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) {
                    $searchKey = array_search($id, $this->currentPath);
                    $this->currentPath[] = $id;

                    if (false !== $searchKey) {
                        throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey));
                    }

                    $this->checkOutEdges($node->getOutEdges());
                }

                $this->checkedNodes[$id] = true;
                array_pop($this->currentPath);
            }
        }
    }
1297541
def remove(self, nodes):
        """"""
        nodes = nodes if isinstance(nodes, list) else [nodes]
        for node in nodes:
            k = self.id(node)
            self.edges = list(filter(lambda e: e[0] != k and e[1] != k, self.edges))
            del self.nodes[k]
616839
public function removeEdge(&$head, &$tail, $directed = TRUE)
    {

        if (!is_a($head, "\Platform\Graph\Node") || !is_a($tail, "\Platform\Graph\Node")) {
            throw new \Platform\Exception("Nodes used to create a new Edge must be instances of \Platform\Graph\Node", PLATFORM_ERROR);
        }
        $_nodeIds = array($head->getId(), $tail->getId());
        $edges = $this->edgeSet;
        //find all edges with these two nodes incident
        foreach ($edges as $edge):
            echo $edge->getId() . "<br />";
            if (in_array($edge->getHead()->getId(), $_nodeIds) && in_array($edge->getTail()->getId(), $_nodeIds)):
                if (!$directed):
                    unset($this->edgeSet[$edge->getId()]);
                elseif ($edge->getHead()->getId() == reset($_nodeIds) && $edge->getTail()->getId() == end($_nodeIds)):
                    //Remove the value from the arcSet array
                    $this->arcSet = array_diff($this->arcSet, array($edge->getId()));
                    unset($this->edgeSet[$edge->getId()]);
                endif;
            endif;
        endforeach;

        return true;
    }
540171
def delete_node(self, node_id):
        """"""
        node = self.get_node(node_id)

        # Remove all edges from the node
        for e in node['edges']:
            self.delete_edge_by_id(e)

        # Remove all edges to the node
        edges = [edge_id for edge_id, edge in list(self.edges.items()) if edge['vertices'][1] == node_id]
        for e in edges:
            self.delete_edge_by_id(e)

        # Remove the node from the node list
        del self.nodes[node_id]

        self._num_nodes -= 1
776013
private IEdge removeEdgeOnVertexDelete(UUID edgeId) throws BitsyException {
        // This is called from remove on adjMap, which means that the edge was added in this Tx
        BitsyEdge edge = changedEdges.remove(edgeId);
        
        // Only an edge that is present in this Tx can be removed by the IEdgeRemover
        assert (edge != null);
        
        return edge;
    }
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);
        }
    }
641858
public function removeNode( $node )
	{
		foreach( $this->getNodes() as $_node )
			$this->removeEdge( $_node, $node );									//  remove all Edges of Node
		$this->nodeSet->removeNode( $node );									//  remove Node
	}
73077
def delete_edge(self, source: str, target: str):
        
        if self.has_edge(source, target):
            self.remove_edge(source, target)
591204
public function getIndexEdge(Edge $edge)
    {
        $id = array_search($edge, $this->edges, true);
        if ($id === false) {
            throw new OutOfBoundsException('Given edge does NOT exist');
        }
        return $id;
    }
420243
public function getEdgesIn()
    {
        $that = $this;

        return $this->getEdges()->getEdgesMatch(function (Edge $edge) use ($that) {
            return $edge->hasVertexTarget($that);
        });
    }
267227
private function mergeParallelEdges(Edge $newEdge)
    {
        $parallelEdges = $newEdge->getEdgesParallel();
        if ($parallelEdges) {

            $mergedCapacity = 0;

            foreach ($parallelEdges as $parallelEdge) {
                $mergedCapacity += $parallelEdge->getCapacity();
            }

            $newEdge->setCapacity($newEdge->getCapacity() + $mergedCapacity);

            foreach ($parallelEdges as $parallelEdge) {
                $parallelEdge->destroy();
            }
        }
    }