Remove element from the graph

@param element the element
556342
public void remove(T element) {
      lock.writeLock().lock();
      try {
         if (outgoingEdges.remove(element) != null) {
            for (Set<T> values : outgoingEdges.values()) {
               values.remove(element);
            }
         }
         if (incomingEdges.remove(element) != null) {
            for (Set<T> values : incomingEdges.values()) {
               values.remove(element);
            }
         }
      } finally {
         lock.writeLock().unlock();
      }
   }
796304
function(element) {
		Array.forEach(this._xnew.attributes, function(newatt) {
			var oldatt = this._xold.getAttribute(newatt.name);
			if (oldatt === null || oldatt !== newatt.value) {
				this._set(element, newatt.name, newatt.value);
				this._summary.push(
					"@" + newatt.name + "=\"" + newatt.value + "\"" +
					(element.id ? ' (#' + element.id + ')' : '')
				);
			}
		}, this);
		Array.forEach(this._xold.attributes, function(oldatt) {
			if (!this._xnew.hasAttribute(oldatt.name)) {
				this._del(element, oldatt.name, null);
				this._summary.push(
					"removed @" + oldatt.name +
					(element.id ? ' (#' + element.id + ')' : '')
				);
			}
		}, this);
	}
983055
public void remove(Node<E> node)
    {
        lock.writeLock().lock();
        assert node.value != null;
        node.value = null;
        try
        {
            size--;

            // go up through each level in the skip list, unlinking this node; this entails
            // simply linking each neighbour to each other, and appending the size of the
            // current level owned by this node's index to the preceding neighbour (since
            // ownership is defined as any node that you must visit through the index,
            // removal of ourselves from a level means the preceding index entry is the
            // entry point to all of the removed node's descendants)
            for (int i = 0 ; i < node.height() ; i++)
            {
                Node<E> prev = node.prev(i);
                Node<E> next = node.next(i);
                assert prev != null;
                prev.setNext(i, next);
                if (next != null)
                    next.setPrev(i, prev);
                prev.size[i] += node.size[i] - 1;
            }

            // then go up the levels, removing 1 from the size at each height above ours
            for (int i = node.height() ; i < maxHeight ; i++)
            {
                // if we're at our height limit, we backtrack at our top level until we
                // hit a neighbour with a greater height
                while (i == node.height())
                    node = node.prev(i - 1);
                node.size[i]--;
            }
        }
        finally
        {
            lock.writeLock().unlock();
        }
    }
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);
    }
1283407
public static void clearHover(Element element) {

        Element parent = element.getParentElement();
        Element sibling = element.getNextSiblingElement();
        element.removeFromParent();
        parent.insertBefore(element, sibling);
    }
609359
private void removeFromTable(Node node) {
    int last = data.size() - 1;
    table[node.index] = table[last];
    table[node.index].index = node.index;
    table[last] = null;
  }
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);
        }
    }
952757
void deleteElement(int list, int prevNode, int node) {
		if (prevNode != nullNode()) {
			assert (m_listNodes.getField(prevNode, 1) == node);
			m_listNodes.setField(prevNode, 1, m_listNodes.getField(node, 1));
			if (m_lists.getField(list, 1) == node)// deleting a tail
			{
				m_lists.setField(list, 1, prevNode);
			}
		} else {
			assert (m_lists.getField(list, 0) == node);
			m_lists.setField(list, 0, m_listNodes.getField(node, 1));
			if (m_lists.getField(list, 1) == node) {// removing last element
				assert (m_listNodes.getField(node, 1) == nullNode());
				m_lists.setField(list, 1, nullNode());
			}
		}
		freeNode_(node);
	}
140869
public void remove(int ele) {
        int idx;

        idx = ele >> SHIFT;
        if (idx < data.length) {
            data[idx] &= ~(1 << ele);
        }
    }
897093
function(element)
	{
		if (element.style != null)
		{
			element.style.cursor = '';
		}
		
		var children = element.childNodes;
		
		if (children != null)
		{
	        var childCount = children.length;
	        
	        for (var i = 0; i < childCount; i += 1)
	        {
	            mxUtils.removeCursors(children[i]);
	        }
	    }
	}
1094741
public static void removeAllChildren(final Node node) {
        assert node != null;
        assert node.getNodeType() != Node.ATTRIBUTE_NODE;
        if (node.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
            Element documentElement = ((Document) node).getDocumentElement();
            if (documentElement != null) {
                ((Document) node).removeChild(documentElement);
            }
            return;
        }
        if (node.getNodeType() == Node.ELEMENT_NODE) {
            Element element = (Element) node;
            for (Node n = element.getFirstChild(); n != null; n = element.getFirstChild()) {
                element.removeChild(n);
            }
        }
    }
478737
public void removeElementAt(int i)
  {

    if (null == m_map)
      return;
      
    if (i >= m_firstFree)
      throw new ArrayIndexOutOfBoundsException(i + " >= " + m_firstFree);
    else if (i < 0)
      throw new ArrayIndexOutOfBoundsException(i);

    if (i < m_firstFree - 1)
      System.arraycopy(m_map, i + 1, m_map, i, m_firstFree - i - 1);

    m_firstFree--;
    m_map[m_firstFree] = null;
  }
870763
public final void removeElementsWithTag(@Nonnull String tag) {
        getElements().stream()
                .map(ElementView::getElement)
                .filter(e -> e.hasTag(tag))
                .forEach(this::removeElement);
    }
1344756
public void elementRemoved(QueryControllerEntity element) {
		if (element instanceof QueryControllerGroup) {
			QueryControllerGroup group = (QueryControllerGroup) element;
			QueryGroupTreeElement ele = new QueryGroupTreeElement(group.getID());
			Enumeration<TreeNode> groups = root.children();
			while (groups.hasMoreElements()) {
				Object temporal = groups.nextElement();
				if (!(temporal instanceof QueryGroupTreeElement)) {
					continue;
				}
				QueryGroupTreeElement groupTElement = (QueryGroupTreeElement) temporal;
				if (groupTElement.getID().equals(ele.getID())) {
					removeNodeFromParent(groupTElement);
					nodeStructureChanged(root);
					break;
				}
			}
		} else if (element instanceof QueryControllerQuery) {
			QueryControllerQuery query = (QueryControllerQuery) element;
			QueryTreeElement elementQuery = new QueryTreeElement(query.getID(), query.getQuery());
			Enumeration<TreeNode> elements = root.children();
			while (elements.hasMoreElements()) {
				TreeNode currentElement = elements.nextElement();
				if (currentElement instanceof QueryGroupTreeElement) {
					continue;
				}
				if (currentElement instanceof QueryTreeElement) {
					QueryTreeElement deleteQuery = (QueryTreeElement) currentElement;
					if (deleteQuery.getID().equals(elementQuery.getID())) {
						removeNodeFromParent(deleteQuery);
						nodeStructureChanged(root);
						break;
					}
				}
			}
		}
	}
778761
@Override
    public void remove(long key, T element) {
    	if (first.value == key && ObjectUtil.equalsOrNull(element, first.element)) {
    		removeMin();
    		return;
    	}
    	if (last.value == key && ObjectUtil.equalsOrNull(element, last.element)) {
    		removeMax();
    		return;
    	}
    	
    	// if both children of root are black, set root to red
    	if ((root.left == null || !root.left.red) && (root.right == null || !root.right.red))
            root.red = true;

        root = remove(root, key, element);
        if (root != null) root.red = false;
    }
728546
private void removeNode(Node node)
	{
		result.remove(node);

		for (Edge edge : node.getUpstream())
		{
			result.remove(edge);
		}

		for (Edge edge : node.getDownstream())
		{
			result.remove(edge);
		}
	}
1042456
public void remove (T element)
    {
        DependencyNode<T> node = _nodes.remove(element);
        _orphans.remove(element);

        // Remove ourselves as a child of our parents.
        for (DependencyNode<T> parent : node.parents) {
            parent.children.remove(node);
        }

        // Remove ourselves as a parent of our children, possibly orphaning them.
        for (DependencyNode<T> child : node.children) {
            child.parents.remove(node);
            if (child.parents.isEmpty()) {
                _orphans.add(child.content);
            }
        }
    }