// Remove deletes a process from the graph. First it stops the process if running.
// Then it disconnects it from other processes and removes the connections from
// the graph. Then it drops the process itself.
508334
func (n *Graph) Remove(processName string) error {
	if _, exists := n.procs[processName]; !exists {
		return fmt.Errorf("Could not remove process: '%s' does not exist", processName)
	}
	delete(n.procs, processName)
	return nil
}
951572
func (m *SecureMap) Remove(key interface{}) {
	m.lock.Lock()
	delete(m.data, key)
	m.lock.Unlock()
}
1322295
func (pool *Pool) Remove(addr string) {
	pool.mutex.Lock()
	defer pool.mutex.Unlock()
	delete(pool.Clients, addr)
}
1259603
func (s *Store) Remove(id string) error {
	s.logger.Printf("received request to remove node %s", id)
	if err := s.remove(id); err != nil {
		s.logger.Printf("failed to remove node %s: %s", id, err.Error())
		return err
	}

	s.logger.Printf("node %s removed successfully", id)
	return nil
}
906494
func (n *NodeLabels) Remove(key string) (removed bool, err error) {
	if isInternalLabel(key) {
		return false, ErrLabelInternalKey
	}
	return n.node.memberlist.RemoveLocalLabels(key), nil
}
1150685
func (a *AnimationSystem) Remove(basic ecs.BasicEntity) {
	if a.entities != nil {
		delete(a.entities, basic.ID())
	}
}
820134
func (e *encoder) Remove(v Vertex) {
	if e == nil {
		return
	}
	e.Encode(marshalTransform{
		Type:         typeTransform,
		RemoveVertex: newMarshalVertex(v),
	})
}
794996
func (n *Network) Remove(ctx context.Context) error {
	if n.external {
		fmt.Printf("Network %s is external, skipping", n.fullName())
		return nil
	}
	fmt.Printf("Removing network %q\n", n.fullName())
	return n.client.NetworkRemove(ctx, n.fullName())
}
204348
func (g *Mutable) Delete(v, w int) {
	delete(g.edges[v], w)
}
1229943
func (g Gauge) Remove() {
	gm.Lock()
	defer gm.Unlock()

	delete(gauges, string(g))
	delete(inits, string(g))
}
799965
func (g *Graph) RemoveNode(remove *Node) {
	if remove.node == nil {
		return
	}
	// O(V)
	nodeExists := false
	// remove all edges that connect from a different node to this one
	for _, node := range g.nodes {
		if node == remove.node {
			nodeExists = true
			continue
		}

		// O(E)
		swapIndex := -1 // index that the edge-to-remove is at
		for i := range node.edges {
			if node.edges[i].end == remove.node {
				swapIndex = i
			}
		}
		if swapIndex > -1 {
			swapNRemoveEdge(swapIndex, &node.edges)
		}

		// deal with possible reversed edge
		swapIndex = -1
		for i := range node.reversedEdges {
			if node.reversedEdges[i].end == remove.node {
				swapIndex = i
			}
		}
		if swapIndex > -1 {
			swapNRemoveEdge(swapIndex, &node.reversedEdges)
		}
		if node.index > remove.node.index {
			node.index--
		}
	}
	if nodeExists {
		copy(g.nodes[remove.node.index:], g.nodes[remove.node.index+1:])
		g.nodes = g.nodes[:len(g.nodes)-1]
	}
	remove.node.parent = nil
	remove.node = nil
}
1000212
func (p *Ports) Remove() error {
	ports := &Ports{st: p.st, doc: p.doc}
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt > 0 {
			err := ports.Refresh()
			if errors.IsNotFound(err) {
				return nil, statetxn.ErrNoOperations
			} else if err != nil {
				return nil, errors.Trace(err)
			}
		}
		return ports.removeOps(), nil
	}
	return p.st.db().Run(buildTxn)
}
1197460
func (v List) Remove(data unsafe.Pointer) *List {
	return &List{C.g_list_remove(v.GList, C.gconstpointer(data))}
}
471874
func (d *StateDir) Remove() error {
	if err := os.Remove(d.path); err != nil && !os.IsNotExist(err) {
		return err
	}
	// If atomic delete succeeded, update own state.
	d.state.Members = nil
	return nil
}
129930
func (m *MultiMap) Remove(key interface{}, value interface{}) {
	set, found := m.m[key]
	if found {
		delete(set, value)
	}
	if len(m.m[key]) == 0 {
		delete(m.m, key)
	}
}
270557
func (i *index) Remove(ctx context.Context) error {
	req, err := i.conn.NewRequest("DELETE", path.Join(i.relPath(), i.id))
	if err != nil {
		return WithStack(err)
	}
	resp, err := i.conn.Do(ctx, req)
	if err != nil {
		return WithStack(err)
	}
	if err := resp.CheckStatus(200); err != nil {
		return WithStack(err)
	}
	return nil
}
46468
func (c *keyStringValueChanger) Remove() error {
	if c.err != nil {
		return c.err
	}
	return c.node.remove()
}