Scan List with closest RT less or equal to the provided one are returned.
503116
@Override
  public List<IScan> getScansByRtLower(double rt) {
    Map.Entry<Double, List<IScan>> lowerEntry = getRt2scan().lowerEntry(rt);
    if (lowerEntry == null) {
      return null;
    }
    List<IScan> scans = lowerEntry.getValue();
    if (scans != null) {
      return scans;
    }
    return null;
  }
578543
def search_range(nums, target):
    
    low = 0
    high = len(nums) - 1
    while low <= high:
        mid = low + (high - low) // 2
        if target < nums[mid]:
            high = mid - 1
        elif target > nums[mid]:
            low = mid + 1
        else:
            break

    for j in range(len(nums) - 1, -1, -1):
        if nums[j] == target:
            return [mid, j]

    return [-1, -1]
1269695
def list_minus(l: List, minus: List) -> List:
    
    return [o for o in l if o not in minus]
145971
def lower_items(self):
        """"""
        return (
            (lowerkey, keyval[1])
            for (lowerkey, keyval)
            in list(self._store.items())
        )
482986
def closest_points(S):
    
    shuffle(S)
    assert len(S) >= 2
    p = S[0]
    q = S[1]
    d = dist(p, q)
    while d > 0:
        r = improve(S, d)
        if r:
            d, p, q = r
        else:
            break
    return p, q
144769
def _one_contains_other(s1, s2):
    
    return min(len(s1), len(s2)) == len(s1 & s2)
654572
def scanned(self):
        """"""
        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._scanned
114258
def has_matching_leftmost(self, remote_as):
        """"""
        if not self.value or not remote_as:
            return False

        leftmost_seg = self.path_seg_list[0]
        if leftmost_seg and leftmost_seg[0] == remote_as:
            return True

        return False
1260677
@Override
  public List<IScan> getScansByRtClosest(double rt) {
    List<IScan> result = null;
    Map.Entry<Double, List<IScan>> lower = getMapRt2scan().lowerEntry(rt);
    Map.Entry<Double, List<IScan>> upper = getMapRt2scan().ceilingEntry(rt);
    if (upper != null && lower != null) {
      if (Math.abs(rt - lower.getKey()) <= Math.abs(rt - upper.getKey())) {
        result = lower.getValue();
      } else {
        result = upper.getValue();
      }
//            result = Double.compare(lower.getKey(), upper.getKey()) > 0 ? lower.getValue() : upper.getValue();
    } else if (upper != null) {
      result = upper.getValue();
    } else if (lower != null) {
      result = lower.getValue();
    }
    return result;
  }
1173153
def min(self):
        
        if(self._clean.isDict()):
            return self._wrap(list())
        return self._wrap(min(self.obj))
1209927
public static <T> T min(Iterable<T> items) {
        T answer = null;
        for (T value : items) {
            if (value != null) {
                if (answer == null || ScriptBytecodeAdapter.compareLessThan(value, answer)) {
                    answer = value;
                }
            }
        }
        return answer;
    }
14744
def _min(self):
        """"""
        return (
            self.range[0] if (self.range and self.range[0] is not None) else
            (min(self._values) if self._values else None)
        )
697901
private void linearScan(Relation<? extends O> relation, DBIDIter iter, O obj, double range, ModifiableDoubleDBIDList result) {
    while(iter.valid()) {
      final double similarity = rawsim.similarity(obj, relation.get(iter));
      if(similarity >= range) {
        result.add(similarity, iter);
      }
      iter.advance();
    }
  }
509219
def complete_opt_allow_select_scan(self, text, *_):
        
        return [t for t in ("true", "false", "yes", "no") if t.startswith(text.lower())]
848009
def find_close_value(self, LIST, value):
        '''
        
        '''
        diff = inf
        for a in LIST:
            if abs(value - a) < diff:
                diff = abs(value - a)
                result = a
        return(result)
229190
def items_lower(self):
        '''
        
        '''
        return ((key, val[1]) for key, val in six.iteritems(self._data))
92910
function closestTo (element, selector, target) {
  let closestElement = closest(element, selector)
  return contains(target, closestElement) ? closestElement : null
}