Called during decoding and add to adjust the new min/max value and
        total count

        Args:
            min_non_zero_index min nonzero index of all added counts (-1 if none)
            max_index max index of all added counts (-1 if none)
437619
def adjust_internal_tacking_values(self,
                                       min_non_zero_index,
                                       max_index,
                                       total_added):
        '''
        '''
        if max_index >= 0:
            max_value = self.get_highest_equivalent_value(self.get_value_from_index(max_index))
            self.max_value = max(self.max_value, max_value)
        if min_non_zero_index >= 0:
            min_value = self.get_value_from_index(min_non_zero_index)
            self.min_value = min(self.min_value, min_value)
        self.total_count += total_added
1060100
private boolean updateMinMaxValues() {
        double min_y_value_new = min_y_value;
        double max_y_value_new = max_y_value;
        double max_x_value_new = max_x_value;

        if (measure0 != null && measure1 != null) {
            min_y_value_new = Math.min(measure0.getMinValue(measureSelected), measure1.getMinValue(measureSelected));
            max_y_value_new = Math.max(measure0.getMaxValue(measureSelected), measure1.getMaxValue(measureSelected));
            max_x_value_new = Math.max(measure0.getNumberOfValues(measureSelected), max_x_value);
        } else {
            if (measure0 != null) {
                min_y_value_new = measure0.getMinValue(measureSelected);
                max_y_value_new = measure0.getMaxValue(measureSelected);
                max_x_value_new = Math.max(measure0.getNumberOfValues(measureSelected), max_x_value);
            }
        }

        //resizing needed?
        if (max_x_value_new != max_x_value || max_y_value_new != max_y_value || min_y_value_new != min_y_value) {
            min_y_value = min_y_value_new;
            max_y_value = max_y_value_new;
            max_x_value = max_x_value_new;
            return true;
        }
        return false;
    }
892226
def set_limits(self, min_: typing.Optional[float] = None, max_: typing.Optional[float] = None):
        
        self._min, self._max = min_, max_
1270842
def zlexcount(self, name, min, max):
        
        return self.execute_command('ZLEXCOUNT', name, min, max)
54584
def p_new_expr_nobf(self, p):
        
        if len(p) == 2:
            p[0] = p[1]
        else:
            p[0] = self.asttypes.NewExpr(p[2])
            p[0].setpos(p)
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;
    }
  }
727067
def change_max(self, no_tabs):
        

        self.no_tabs = no_tabs

        if self.GetValue() >= no_tabs:
            self.SetValue(no_tabs - 1)
94323
def update_counts(self, current):
        
        for item in current:
            try:
                self.counts[item] += 1
            except KeyError:
                self.counts[item] = 1
61032
def expand(self,x,y,z):
        
        if x != None:
            if self.minx is None or x < self.minx:
                self.minx = x
            if self.maxx is None or x > self.maxx:
                self.maxx = x
        if y != None:
            if self.miny is None or y < self.miny:
                self.miny = y
            if self.maxy is None or y > self.maxy:
                self.maxy = y
        if z != None:
            if self.minz is None or z < self.minz:
                self.minz = z
            if self.maxz is None or z > self.maxz:
                self.maxz = z
43362
private void update() {
        int jd = 0, jq = 1, iq;
        double target, told = 0., tnew = 0., qold, qnew;
        double[] newqile = new double[nq];
        Arrays.sort(dbuf, 0, nd);
        qold = qnew = qile[0] = newqile[0] = q0;
        qile[nq - 1] = newqile[nq - 1] = qm;
        pval[0] = Math.min(0.5 / (nt + nd), 0.5 * pval[1]);
        pval[nq - 1] = Math.max(1.0 - 0.5 / (nt + nd), 0.5 * (1. + pval[nq - 2]));
        for (iq = 1; iq < nq - 1; iq++) {
            target = (nt + nd) * pval[iq];
            if (tnew < target) {
                for (;;) {
                    if (jq < nq && (jd >= nd || qile[jq] < dbuf[jd])) {
                        qnew = qile[jq];
                        tnew = jd + nt * pval[jq++];
                        if (tnew >= target) {
                            break;
                        }
                    } else {
                        qnew = dbuf[jd];
                        tnew = told;
                        if (qile[jq] > qile[jq - 1]) {
                            tnew += nt * (pval[jq] - pval[jq - 1]) * (qnew - qold) / (qile[jq] - qile[jq - 1]);
                        }
                        jd++;
                        if (tnew >= target) {
                            break;
                        }
                        told = tnew++;
                        qold = qnew;
                        if (tnew >= target) {
                            break;
                        }
                    }
                    told = tnew;
                    qold = qnew;
                }
            }
            if (tnew == told) {
                newqile[iq] = 0.5 * (qold + qnew);
            } else {
                newqile[iq] = qold + (qnew - qold) * (target - told) / (tnew - told);
            }
            told = tnew;
            qold = qnew;
        }
        qile = newqile;
        nt += nd;
        nd = 0;
    }
179650
def p_new_expr_nobf(self, p):
        
        if len(p) == 2:
            p[0] = p[1]
        else:
            p[0] = ast.NewExpr(p[2])
837793
private void update(){
        
        int i, n = values.length;

        max = 0;
        min = n;
        total = 0;
        
        int maxVal = -Integer.MAX_VALUE;
        int minVal = Integer.MAX_VALUE;

        // calculate min and max
        for ( i = 0; i < n; i++ )
        {
            if ( values[i] != 0 )
            {
                // max
                if ( i > max )
                    max = i;
                // min
                if ( i < min )
                    min = i;

                maxVal = Math.max(maxVal, values[i]);
                minVal = Math.min(minVal, values[i]);
                total += values[i];
            }
        }
        
        double k = (maxVal - minVal) / (double)bins;
        int[] h = new int[bins];
        
        for (int j = 0; j < values.length; j++) {
            double _min = minVal;
            double _max = _min + k;
            
            //First interval.
            if(values[j] >= _min && values[j] <= _max)
                h[0]++;
            
            _min += k;
            _max += k;
            
            //Others interval.
            for (int l = 1; l < bins; l++) {
                if(values[j] > _min && values[j] <= _max)
                    h[l]++;
                
                _min += k;
                _max += k;
            }
        }
        
        this.values = h;

        mean   = HistogramStatistics.Mean( values );
        stdDev = HistogramStatistics.StdDev( values, mean );
        median = HistogramStatistics.Median( values );
        mode = HistogramStatistics.Mode(values);
        entropy = HistogramStatistics.Entropy(values);
    }
66220
private void updateMinMax(int index)
    {
        if (index >= min.getSize())
        {
            return;
        }
        int sum = 0;
        for (int i=0; i<index; i++)
        {
            sum += Math.abs(current.get(i));
        }
        int m = radius - sum;
        min.set(index, -m);
        max.set(index, m);
    }
1016356
def min_max(obj, val, is_max):
    
    n = getattr(obj, 'maximum' if is_max else 'minimum', None)
    if n == None:
        return

    _eq = getattr(obj, 'exclusiveMaximum' if is_max else 'exclusiveMinimum', False)
    if is_max:
        to_raise = val >= n if _eq else val > n
    else:
        to_raise = val <= n if _eq else val < n

    if to_raise:
        raise ValidationError('condition failed: {0}, v:{1} compared to o:{2}'.format('maximum' if is_max else 'minimum', val, n))
866119
def _add_count_to_params_if_needed(self, params):
        

        if self.count is not None:
            params[self.PARAM_COUNT] = str(self.count)
64890
def set_limits(self, min_=None, max_=None):
        
        self._min, self._max = min_, max_
898479
private void update(int seqNo, long guessedIndex) {
		long delta = guessedIndex - (((long) this.roc) << 16 | this.seqNum);

		/* update the replay bit mask */
		if (delta > 0) {
			replayWindow = replayWindow << delta;
			replayWindow |= 1;
		} else {
			replayWindow |= (1 << delta);
		}

		if (seqNo > seqNum) {
			seqNum = seqNo & 0xffff;
		}
		if (this.guessedROC > this.roc) {
			roc = guessedROC;
			seqNum = seqNo & 0xffff;
		}
	}