Prefills BBox with minimum values so that it can increase.
541852
public static BBox createInverse(boolean elevation) {
        if (elevation) {
            return new BBox(Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE,
                    Double.MAX_VALUE, -Double.MAX_VALUE, true);
        } else {
            return new BBox(Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, -Double.MAX_VALUE,
                    Double.NaN, Double.NaN, false);
        }
    }
960697
public void floodFill(int xx, int yy, int minX, int minY, int maxX, int maxY, IntPredicate target, int replacement)
    {
        if (xx<minX || yy<minY || xx>minX+width || yy>minY+height)
        {
            return;
        }
        this.x = xx;
        this.y = yy;
        ensure(index, y);
        ensure(north(), y-1);
        ensure(south(), y+1);
        int color = lines[index][x];
        if (color == replacement || !target.test(color))
        {
            return;
        }
        southQueue.add(x, y);
        while (take())
        {
            int[] n = lines[north()];
            int[] l = lines[index];
            int[] s = lines[south()];
            for (int ii=x;ii<maxX;ii++)
            {
                if (target.test(l[ii]))
                {
                    l[ii] = replacement;
                    if (y-1 >= minY && target.test(n[ii]))
                    {
                        northQueue.add(ii, y-1);
                    }
                    if (y+1 < maxY && target.test(s[ii]))
                    {
                        southQueue.add(ii, y+1);
                    }
                }
                else
                {
                    break;
                }
            }
            for (int ii=x-1;ii>=minX;ii--)
            {
                if (target.test(l[ii]))
                {
                    l[ii] = replacement;
                    if (y-1 >= minY && target.test(n[ii]))
                    {
                        northQueue.add(ii, y-1);
                    }
                    if (y+1 < maxY && target.test(s[ii]))
                    {
                        southQueue.add(ii, y+1);
                    }
                }
                else
                {
                    break;
                }
            }
        }
        for (int ii=0;ii<3;ii++)
        {
            if (lineNums[ii] >= 0)
            {
                storeLine(lineNums[ii], lines[ii]);
            }
            lineNums[ii] = -2;
        }
    }
1325520
function () {
        var bbox = this.boundingBox;
        if (!bbox) {
            bbox = this.boundingBox = new BoundingBox();
        }
        var posArr = this.attributes.position.value;
        if (posArr && posArr.length) {
            var min = bbox.min;
            var max = bbox.max;
            var minArr = min.array;
            var maxArr = max.array;
            vec3.set(minArr, posArr[0], posArr[1], posArr[2]);
            vec3.set(maxArr, posArr[0], posArr[1], posArr[2]);
            for (var i = 3; i < posArr.length;) {
                var x = posArr[i++];
                var y = posArr[i++];
                var z = posArr[i++];
                if (x < minArr[0]) { minArr[0] = x; }
                if (y < minArr[1]) { minArr[1] = y; }
                if (z < minArr[2]) { minArr[2] = z; }

                if (x > maxArr[0]) { maxArr[0] = x; }
                if (y > maxArr[1]) { maxArr[1] = y; }
                if (z > maxArr[2]) { maxArr[2] = z; }
            }
            min._dirty = true;
            max._dirty = true;
        }
    }
1090128
def _normalize_bbox(self, bbox, size):
        """"""

        bbox_ratio = float(bbox.width) / float(bbox.height)
        size_ratio = float(size[0]) / float(size[1])

        if round(size_ratio, 4) == round(bbox_ratio, 4):
            return bbox
        else:
            if bbox.height * size_ratio >= bbox.width:
                diff = bbox.height*size_ratio - bbox.width
                return BBox((bbox.xmin - diff/2, bbox.ymin, bbox.xmax + diff/2, bbox.ymax), bbox.projection)
            else:
                diff = abs(bbox.width/size_ratio - bbox.height)
                return BBox((bbox.xmin, bbox.ymin - diff/2, bbox.xmax, bbox.ymax + diff/2), bbox.projection)
893958
private void growBaseBuffer() {
    final int oldSize = combinedBuffer_.length;
    assert oldSize < (2 * k_);
    final double[] baseBuffer = combinedBuffer_;
    final int newSize = 2 * Math.max(Math.min(k_, oldSize), DoublesSketch.MIN_K);
    combinedBuffer_ = Arrays.copyOf(baseBuffer, newSize);
  }
354729
def _compute_box(self, positive_vals, negative_vals):
        """"""
        max_ = max(
            max(positive_vals or [self.zero]),
            max(negative_vals or [self.zero])
        )

        if self.range and self.range[0] is not None:
            self._box.ymin = self.range[0]
        else:
            self._box.ymin = -max_

        if self.range and self.range[1] is not None:
            self._box.ymax = self.range[1]
        else:
            self._box.ymax = max_
964207
private function fill() {

        //Prefill value
        if(true === $this -> filled) {

            if(true === isset($this -> attributes['name'])) {

                if(true === Request :: isPost()) {
                    $this -> attributes['value'] = Request :: fromPost($this -> attributes['name']);
                }
            }
        }
    }
860428
def setbpf(self, bpf):
        """"""
        self._bpf = min(bpf, self.BPF)
        self._rng_n = int((self._bpf + self.RNG_RANGE_BITS - 1) / self.RNG_RANGE_BITS)
506783
private void updateMinMax() {
    if(values.length == 0) {
      return; // Keep invalid.
    }
    min = max = values[0];
    for(int i = 1; i < values.length; i++) {
      int v = values[i];
      min = min < v ? min : v;
      max = max > v ? max : v;
    }
  }
727634
def min_pixels(self, value: float) -> 'Size':
        """"""
        raise_not_number(value)
        self.minimum = '{}px'.format(value)
        return self
635941
public void growMaxColumns( int desiredColumns , boolean preserveValue ) {
        if( col_idx.length < desiredColumns+1 ) {
            int[] c = new int[ desiredColumns+1 ];
            if( preserveValue )
                System.arraycopy(col_idx,0,c,0,col_idx.length);
            col_idx = c;
        }
    }
1013894
def set_bounds(self, lb, ub):
        
        if lb is not None and ub is not None and lb > ub:
            raise ValueError(
                "The provided lower bound {} is larger than the provided upper bound {}".format(lb, ub)
            )
        self._lb = lb
        self._ub = ub
        if self.problem is not None:
            self.problem._pending_modifications.var_lb.append((self, lb))
            self.problem._pending_modifications.var_ub.append((self, ub))
530305
private void grow(int minCapacity) {
        int oldCapacity = queue.length;
        // Double size if small; else grow by 50%
        int newCapacity = oldCapacity + ((oldCapacity < 64) ?
                                         (oldCapacity + 2) :
                                         (oldCapacity >> 1));
        // overflow-conscious code
        if (newCapacity - MAX_ARRAY_SIZE > 0)
            newCapacity = hugeCapacity(minCapacity);
        queue = Arrays.copyOf(queue, newCapacity);
    }
250616
def apply_bbox(sf,ax):
    
    limits = sf.bbox
    xlim = limits[0],limits[2]
    ylim = limits[1],limits[3]
    ax.set_xlim(xlim)
    ax.set_ylim(ylim)
556416
def min_ems(self, value: float) -> 'Size':
        """"""
        raise_not_number(value)
        self.minimum = '{}em'.format(value)
        return self
40600
def normalize_bbox(coords, ymax, scaler=2):
    
    return [
        coords[0] * scaler,
        ymax - (coords[3] * scaler),
        coords[2] * scaler,
        ymax - (coords[1] * scaler),
    ]
717416
function (bbox) {
        var min = this.min;
        var max = this.max;
        vec3Copy(min.array, bbox.min.array);
        vec3Copy(max.array, bbox.max.array);
        min._dirty = true;
        max._dirty = true;
        return this;
    }