delete a solution from the most crowded subregion (this function happens when: it should delete
the solution in the 'parentLocation' subregion, but since this subregion only has one solution,
it should be kept)
488879
public void deleteCrowdRegion2(S indiv, int location) {

    double indivFitness = fitnessFunction(indiv, lambda[location]);

    // find the most crowded subregion, if there are more than one, keep them in crowdList
    ArrayList<Integer> crowdList = new ArrayList<>();
    int crowdIdx;
    int nicheCount = countOnes(0);
    if (location == 0) {
      nicheCount++;
    }
    crowdList.add(0);
    for (int i = 1; i < populationSize; i++) {
      int curSize = countOnes(i);
      if (location == i) {
        curSize++;
      }
      if (curSize > nicheCount) {
        crowdList.clear();
        nicheCount = curSize;
        crowdList.add(i);
      } else if (curSize == nicheCount) {
        crowdList.add(i);
      }
    }
    // determine the index of the crowded subregion
    if (crowdList.size() == 1) {
      crowdIdx = crowdList.get(0);
    } else {
      int listLength = crowdList.size();
      crowdIdx = crowdList.get(0);
      double sumFitness = sumFitness(crowdIdx);
      if (crowdIdx == location) {
        sumFitness = sumFitness + indivFitness;
      }
      for (int i = 1; i < listLength; i++) {
        int curIdx = crowdList.get(i);
        double curFitness = sumFitness(curIdx);
        if (curIdx == location) {
          curFitness = curFitness + indivFitness;
        }
        if (curFitness > sumFitness) {
          crowdIdx = curIdx;
          sumFitness = curFitness;
        }
      }
    }

    // find the solution indices within the 'crowdIdx' subregion
    ArrayList<Integer> indList = new ArrayList<>();
    for (int i = 0; i < populationSize; i++) {
      if (subregionIdx[crowdIdx][i] == 1) {
        indList.add(i);
      }
    }
    if (crowdIdx == location) {
      int temp = -1;
      indList.add(temp);
    }

    // find the solution with the largest rank
    ArrayList<Integer> maxRankList = new ArrayList<>();
    //int maxRank = ((DoubleSolution) population.get(indList.get(0))).getRank();
    int maxRank = (int) population.get(indList.get(0)).getAttribute(ranking.getAttributeIdentifier());
    maxRankList.add(indList.get(0));
    for (int i = 1; i < indList.size(); i++) {
      int curRank;
      if (indList.get(i) == -1) {
        //curRank = indiv.getRank();
        curRank = (int) indiv.getAttribute(ranking.getAttributeIdentifier());
      } else {
        //curRank = ((DoubleSolution) population.get(indList.get(i))).getRank();
        curRank = (int) population.get(indList.get(i)).getAttribute(ranking.getAttributeIdentifier());
      }

      if (curRank > maxRank) {
        maxRankList.clear();
        maxRank = curRank;
        maxRankList.add(indList.get(i));
      } else if (curRank == maxRank) {
        maxRankList.add(indList.get(i));
      }
    }

    double maxFitness;
    int rankSize = maxRankList.size();
    int targetIdx = maxRankList.get(0);
    if (targetIdx == -1) {
      maxFitness = indivFitness;
    } else {
      maxFitness = fitnessFunction(population.get(targetIdx), lambda[crowdIdx]);
    }
    for (int i = 1; i < rankSize; i++) {
      double curFitness;
      int curIdx = maxRankList.get(i);
      if (curIdx == -1) {
        curFitness = indivFitness;
      } else {
        curFitness = fitnessFunction(population.get(curIdx), lambda[crowdIdx]);
      }

      if (curFitness > maxFitness) {
        targetIdx = curIdx;
        maxFitness = curFitness;
      }
    }

    if (targetIdx == -1) {

      nondominated_sorting_delete(indiv);

    } else {
      //int indivRank = indiv.getRank();
      int indivRank = (int) indiv.getAttribute(ranking.getAttributeIdentifier());
      //int targetRank = ((DoubleSolution) population.get(targetIdx)).getRank();
      int targetRank = (int) population.get(targetIdx).getAttribute(ranking.getAttributeIdentifier());
      rankIdx[targetRank][targetIdx] = 0;
      rankIdx[indivRank][targetIdx] = 1;

      S targetSol = population.get(targetIdx);

      replace(targetIdx, indiv);
      subregionIdx[crowdIdx][targetIdx] = 0;
      subregionIdx[location][targetIdx] = 1;

      // update the non-domination level structure of the population
      nondominated_sorting_delete(targetSol);
    }

  }
113359
def delete(self):
        

        if self.grid.IsSelection():
            # Delete selection
            self.grid.actions.delete_selection()

        else:
            # Delete cell at cursor
            cursor = self.grid.actions.cursor
            self.grid.actions.delete_cell(cursor)

        # Update grid
        self.grid.ForceRefresh()
779638
def remove_overlap(self, also_remove_contiguous: bool = False) -> None:
        
        overlap = True
        while overlap:
            overlap = self._remove_overlap_sub(also_remove_contiguous)
        self._sort()
874470
def _destroy(self):
        """"""
        self.unuse_region()

        if self._rlist is not None:
            # Actual client count, which doesn't include the reference kept by the manager, nor ours
            # as we are about to be deleted
            try:
                if len(self._rlist) == 0:
                    # Free all resources associated with the mapped file
                    self._manager._fdict.pop(self._rlist.path_or_fd())
                # END remove regions list from manager
            except (TypeError, KeyError):
                # sometimes, during shutdown, getrefcount is None. Its possible
                # to re-import it, however, its probably better to just ignore
                # this python problem (for now).
                # The next step is to get rid of the error prone getrefcount alltogether.
                pass
193979
private void deleteEntry(TreeMapEntry<K,V> p) {
        modCount++;
        size--;

        // If strictly internal, copy successor's element to p and then make p
        // point to successor.
        if (p.left != null && p.right != null) {
            TreeMapEntry<K,V> s = successor(p);
            p.key = s.key;
            p.value = s.value;
            p = s;
        } // p has 2 children

        // Start fixup at replacement node, if it exists.
        TreeMapEntry<K,V> replacement = (p.left != null ? p.left : p.right);

        if (replacement != null) {
            // Link replacement to parent
            replacement.parent = p.parent;
            if (p.parent == null)
                root = replacement;
            else if (p == p.parent.left)
                p.parent.left  = replacement;
            else
                p.parent.right = replacement;

            // Null out links so they are OK to use by fixAfterDeletion.
            p.left = p.right = p.parent = null;

            // Fix replacement
            if (p.color == BLACK)
                fixAfterDeletion(replacement);
        } else if (p.parent == null) { // return if we are the only node.
            root = null;
        } else { //  No children. Use self as phantom replacement and unlink.
            if (p.color == BLACK)
                fixAfterDeletion(p);

            if (p.parent != null) {
                if (p == p.parent.left)
                    p.parent.left = null;
                else if (p == p.parent.right)
                    p.parent.right = null;
                p.parent = null;
            }
        }
    }
533831
public void deleteMax() {
	if (isEmpty())
	    throw new NoSuchElementException("BST underflow");

	// if both children of root are black, set root to red
	if (!isRed(root.getLeft()) && !isRed(root.getRight()))
	    root.setColor(RED);

	root = deleteMax(root);
	if (!isEmpty()) {
	    root.setParent(null);
	    root.setColor(BLACK);
	}
	// assert check();
    }
1197511
public void removeLRU() {
        int removeCount = (int) Math.max((size() * trimFactor), 1);

        while ((removeCount--) > 0) {
            removeEntry(head.next);
        }
    }
365514
function(polygontreenodes, alsoRemovecoplanarFront) {
            var args = {'node': this, 'polygontreenodes': polygontreenodes }
            var node;
            var stack = [];

            do {
                node = args.node;
                polygontreenodes = args.polygontreenodes;

                // begin "function"
                if(node.plane) {
                    var backnodes = [];
                    var frontnodes = [];
                    var coplanarfrontnodes = alsoRemovecoplanarFront ? backnodes : frontnodes;
                    var plane = node.plane;
                    var numpolygontreenodes = polygontreenodes.length;
                    for(i = 0; i < numpolygontreenodes; i++) {
                        var node1 = polygontreenodes[i];
                        if(!node1.isRemoved()) {
                            node1.splitByPlane(plane, coplanarfrontnodes, backnodes, frontnodes, backnodes);
                        }
                    }

                    if(node.front && (frontnodes.length > 0)) {
                        stack.push({'node': node.front, 'polygontreenodes': frontnodes});
                    }
                    var numbacknodes = backnodes.length;
                    if (node.back && (numbacknodes > 0)) {
                        stack.push({'node': node.back, 'polygontreenodes': backnodes});
                    } else {
                        // there's nothing behind this plane. Delete the nodes behind this plane:
                        for (var i = 0; i < numbacknodes; i++) {
                            backnodes[i].remove();
                        }
                    }
                }
                args = stack.pop();
            } while (typeof(args) !== 'undefined');
        }
798545
protected void selectMerge( int pruneId , FastQueue<float[]> regionColor ) {
		// Grab information on the region which is being pruned
		Node n = pruneGraph.get(pruneId);
		float[] targetColor = regionColor.get(n.segment);

		// segment ID and distance away from the most similar neighbor
		int bestId = -1;
		float bestDistance = Float.MAX_VALUE;

		// Examine all the segments it is connected to to see which one it is most similar too
		for( int i = 0; i < n.edges.size; i++ ) {
			int segment = n.edges.get(i);
			float[] neighborColor = regionColor.get(segment);
			float d = SegmentMeanShiftSearch.distanceSq(targetColor, neighborColor);

			if( d < bestDistance ) {
				bestDistance = d;
				bestId = segment;
			}
		}

		if( bestId == -1 )
			throw new RuntimeException("No neighbors?  Something went really wrong.");

		markMerge(n.segment, bestId);
	}
78402
def clear(self, context=None):
        
        context = URIRef(context).n3() if context is not None else '?g'
        query = """
            DELETE { GRAPH %s { ?s ?p ?o } } WHERE { GRAPH %s { ?s ?p ?o } }
        """ % (context, context)
        self.parent.graph.update(query)
801098
public void removeSolution(int location) {
    //Decrease the solutions in the location specified.
    hypercubes[location]--;

    //Update the most populated hypercube
    if (location == mostPopulatedHypercube) {
      for (int i = 0; i < hypercubes.length; i++) {
        if (hypercubes[i] > hypercubes[mostPopulatedHypercube]) {
          mostPopulatedHypercube = i;
        }
      }
    }

    //If hypercubes[location] now becomes to zero, then update ocuppied hypercubes
    if (hypercubes[location] == 0) {
      this.calculateOccupied();
    }
  }
1121760
def delete(stack, region, profile):
    
    ini_data = {}
    environment = {}

    environment['stack_name'] = stack
    if region:
        environment['region'] = region
    else:
        environment['region'] = find_myself()

    if profile:
        environment['profile'] = profile

    ini_data['environment'] = environment

    if start_smash(ini_data):
        sys.exit(0)
    else:
        sys.exit(1)
363686
def delete_subresource(self, subresource):
        
        subresources = getattr(self, subresource.parent_key, {})
        del subresources[subresource.id]
        yield self._save()
9526
def delete_image_regions(project_id, region_ids, custom_headers:nil)
      response = delete_image_regions_async(project_id, region_ids, custom_headers:custom_headers).value!
      nil
    end
956629
function deleteLambda(region) {
  const regionKey = getRegionKey(region);
  if (regionKey) {
    lambdaOptionsByRegionKey.delete(regionKey);
    return lambdaByRegionKey.delete(regionKey);
  }
  return false;
}
600225
function _removeParentsIfEmpty(node) {
  let currentNode = node.parent;
  node.remove();
  while (!currentNode.nodes.length) {
    const { parent } = currentNode;
    currentNode.remove();
    currentNode = parent;
  }
}
359309
function endChoice(stack) {
    if (stack._parentChoice) {
      var choice=stack._parentChoice;
      delete stack._parentChoice;
      delete stack._parentGroup;
      delete stack.groupCounter;
      var parentStack=choice._parentStack;
      delete choice._parentStack;
      
      return parentStack;
    }
    return stack;
  }