Setter for maxNestingLevel

@param  int  Maximum nesting level for dump output

@return  int  The current nesting level
978146
public function setNestingLevel($level = null)
	{
		if (func_num_args() and is_numeric($level) and $level > 0)
		{
			$this->maxNestingLevel = $level;
		}

		return $this->maxNestingLevel;
	}
855396
public void setMax(int max)
    {
        this.max = max;
        if (this.max < Alterable.MIN)
        {
            this.max = Alterable.MIN;
        }
        set(cur);
    }
905483
public function setMax($value)
    {
        $this->max = $value === null ? null : (int) $value;

        return $this;
    }
493517
private void softmax() {
        double max = Double.NEGATIVE_INFINITY;
        for (int i = 0; i < outputLayer.units; i++) {
            if (outputLayer.output[i] > max) {
                max = outputLayer.output[i];
            }
        }

        double sum = 0.0;
        for (int i = 0; i < outputLayer.units; i++) {
            double out = Math.exp(outputLayer.output[i] - max);
            outputLayer.output[i] = out;
            sum += out;
        }

        for (int i = 0; i < outputLayer.units; i++) {
            outputLayer.output[i] /= sum;
        }
    }
270918
public function getVirtualLevel(int $xp): int
    {
        $xpTable = $this->getXpTable();

        for ($level = 1; $level <= count($xpTable); $level++) {
            if ($xpTable[$level] > $xp) {
                $level--;
                break;
            }
        }

        $level = max($this->getMinimumLevel(), $level);

        return $level;
    }
389238
public function setNestingLimit($limit)
	{
		$limit = (int) $limit;

		if ($limit < 1)
		{
			throw new InvalidArgumentException('nestingLimit must be a number greater than 0');
		}

		$this->nestingLimit = $limit;
	}
249508
private function setMaxSteps($max) {
        $this->max = max(0, (int)$max);
        $this->stepWidth = $this->max ? Console::strlen($this->max) : 4;
    }
1234768
public function getMaxSort()
    {
        if ($this->_max === null) {
            $this->_max = $this->owner->find()->andWhere($this->getCondition())->count() - 1;
        }
        return $this->_max;
    }
479310
private void calculateMaxLevel() {
    if (tree.getRules() == null) {
      LOG.debug("No rules set for this tree");
      return;
    }
    
    for (Integer level : tree.getRules().keySet()) {
      if (level > max_rule_level) {
        max_rule_level = level;
      }
    }
  }
1062306
public function max_children_set($value, $bucket = self::DEFAULT_BUCKET)
	{
		if ($value < 1)
		{
			$value = 0;
			$this->log(($bucket === self::DEFAULT_BUCKET ? 'default' : $bucket) . ' bucket max_children set to 0, bucket will be disabled', self::LOG_LEVEL_WARN);
		}

		$old = $this->max_children[$bucket];
		$this->max_children[$bucket] = $value;

		if ($this->child_persistent_mode[$bucket] && $old > $this->max_children[$bucket])
		{
			$difference = $old - $this->max_children[$bucket];
			$killed = 0;
			// Kill some of the child processes
			foreach ($this->forked_children as $pid => $child)
			{
				if ($child['bucket'] == $bucket && $child['status'] == self::WORKER)
				{
					$this->safe_kill($pid, SIGINT, "max_children lowered for bucket $bucket, killing pid $pid");
					$killed++;

					if ($killed == $difference)
					{
						break;
					}
				}
			}
		}
	}
368787
public function handleMaxDepth(array &$context, $defaultMaxDepth = 10)
    {
        if (!array_key_exists(static::DEPTH_KEY, $context)) {
            $context[static::DEPTH_KEY] = 0;
        }
        $context[static::DEPTH_KEY]++;
        if (!array_key_exists(static::MAX_DEPTH_KEY, $context)) {
            $context[static::MAX_DEPTH_KEY] = $defaultMaxDepth;
        }
        if ($context[static::DEPTH_KEY] > $context[static::MAX_DEPTH_KEY]) {
            throw new RuntimeException('Max depth reached');
        }
    }
48244
public function multiLevelCount()
    {
        $levelCount = 0;
        foreach ($this->dataValues as $dataValueSet) {
            $levelCount = max($levelCount, count($dataValueSet));
        }
        return $levelCount;
    }
111404
public int getLevel(int max) {
        if (prepared && recording && null != recorder) {
            try {
                // 获取振幅大小：1-32767
                return max * recorder.getMaxAmplitude() / 32768 + 1;
            } catch (Exception e) {
                //e.printStackTrace();
            }
        }
        return 1;
    }
468142
public T max() {
        TObjectIntIterator<T> iter = counts.iterator();
        int maxCount = -1;
        T max = null;
        while (iter.hasNext()) {
            iter.advance();
            int count = iter.value();
            if (count > maxCount) {
                max = iter.key();
                maxCount = count;
            }
        }
        return max;
    }
99596
protected function setMaxTokens(?int $maxTokens): self
    {
        assert($maxTokens === null || $maxTokens > 0);

        $this->maxTokens = $maxTokens > 0 ? $maxTokens : null;

        return $this;
    }
806804
public function setMax($max)
    {
        if ($max <= 0) {
            throw new InvalidArgumentException(sprintf('Supplied max value: %d must be greater than 0', $max));
        }
        $this->max = $max;
        return $this;
    }
33514
public function xpTolevel($xp)
    {
        $modifier = 0;

        for ($i = 1; $i <= 126; $i++) {
            $modifier += floor($i + 300 * pow(2, ($i / 7)));
            $level = floor($modifier / 4);

            if ($xp < $level) {
                return $i;
            }
        }

        // Return the maximum possible level
        return 126;
    }