N.revert_to_max()

        Sets all N's stochastics to their MAP values.
964539
def revert_to_max(self):
        
        try:
            self._set_stochastics([self.mu[s] for s in self.stochastics])
        except KeyError:
            self._set_stochastics(self.mu[self.stochastics])
1147280
private void updateMinMax() {
    min = Integer.MAX_VALUE;
    max = Integer.MIN_VALUE;
    if(generators.isEmpty()) {
      return; // Keep invalid.
    }
    for(IntGenerator gen : generators) {
      final int mi = gen.getMin(), ma = gen.getMax();
      if(mi > ma) {
        continue;
      }
      min = mi < min ? mi : min;
      max = ma > max ? ma : max;
    }
  }
14031
public void reset() {
    statsComputed.set(false);
    pos = 0;
    curSize = 0;
    total = 0L;
    mean = 0.0;
    variance = 0.0;
    stddev = 0.0;
    min = 0L;
    max = 0L;
    for (int i = 0; i < percentileValues.length; ++i) {
      percentileValues[i] = 0.0;
    }
  }
384450
def reset(self):
        
        self.X = []
        self.Y = []
        self.w = []

        self.Xnorm = []

        self.graph_rep = None
981148
def toggle_minmax(self, state):
        """"""
        self.sig_option_changed.emit('minmax', state)
        self.model.minmax = state
597349
public void setMax(int max) {
    if (max <= 0 || max < mProgress) {
      throw new IllegalArgumentException(
          String.format("Max (%d) must be > 0 and >= %d", max, mProgress));
    }
    mMax = max;
    invalidate();
  }
253930
function limitRandom(max, min) {
    return max === min ? max : (random() * (max - min) + min);
}
714799
def _safe_minmax(values):
    """"""

    # Nan and inf guarded min and max
    isfinite = np.isfinite(values)
    if np.any(isfinite):
        # Only use finite values
        values = values[isfinite]

    minval = np.min(values)
    maxval = np.max(values)

    return minval, maxval
1336559
void resetSequential() {
        seq = nextLong(prand, maxSeq);
        inc = minInc + nextLong(prand, maxInc - minInc);
    }
839593
def update(self, iterable):
        """"""
        _maxes, _lists, _keys = self._maxes, self._lists, self._keys
        values = sorted(iterable, key=self._key)

        if _maxes:
            if len(values) * 4 >= self._len:
                values.extend(chain.from_iterable(_lists))
                values.sort(key=self._key)
                self._clear()
            else:
                _add = self.add
                for val in values:
                    _add(val)
                return

        _load, _index = self._load, self._index
        _lists.extend(values[pos:(pos + _load)]
                      for pos in range(0, len(values), _load))
        _keys.extend(list(map(self._key, _list)) for _list in _lists)
        _maxes.extend(sublist[-1] for sublist in _keys)
        self._len = len(values)
        del _index[:]
74211
public void reindexItems() {
    if (numUnsortedItems > 0) {
      int[] newSortedKeys = Arrays.copyOf(sortedKeys, sortedKeys.length + numUnsortedItems);
      int[] newSortedValues = Arrays.copyOf(sortedValues, sortedValues.length + numUnsortedItems);

      int oldLength = sortedKeys.length;
      for (int i = 0; i < numUnsortedItems; i++) {
        newSortedKeys[i + oldLength] = unsortedKeys[i];
        newSortedValues[i + oldLength] = unsortedValues[i];
      }

      ArrayUtils.sortKeyValuePairs(newSortedKeys, newSortedValues, 0, newSortedKeys.length);

      sortedKeys = newSortedKeys;
      sortedValues = newSortedValues;
      numUnsortedItems = 0;
      
      rebuildKeySet();
    }
  }
41434
def _reset(self):
    
    self.basis = np.random.randn(self.filterDim, self.outputDim)
    self.basis /= np.sqrt(np.sum(self.basis ** 2, axis=0))
    self._iteration = 0
    self.losses = {}
722767
def reset(self, populations, lag, mu, u_int, j_coup, mean_f):
        """"""

        self.set_filling(populations)
        self.param['lambda'] = lag
        self.param['orbital_e'] = mu
        self.selfconsistency(u_int, j_coup, mean_f)
371920
private void updateMinMax(NumberVector featureVector, double[] minima, double[] maxima) {
    assert (minima.length == featureVector.getDimensionality());
    for(int d = 0; d < featureVector.getDimensionality(); d++) {
      double v = featureVector.doubleValue(d);
      if(v == v) { // Avoid NaN.
        maxima[d] = MathUtil.max(v, maxima[d]);
        minima[d] = MathUtil.min(v, minima[d]);
      }
    }
  }
487800
def reset(self):
        ""
        [r.reset() for r in self.rnns if hasattr(r, 'reset')]
        if self.qrnn: self.hidden = [self._one_hidden(l) for l in range(self.n_layers)]
        else: self.hidden = [(self._one_hidden(l), self._one_hidden(l)) for l in range(self.n_layers)]
468358
def normalize(self):
        
        maximum = self.max()
        if maximum:
            self.values = [value / maximum for value in self.values]
492372
def _max(self):
        """"""
        return (
            self.range[1] if (self.range and self.range[1] is not None) else
            (max(map(abs, self._values)) if self._values else None)
        )