Return the decrease in impurity this decision node introduces.

@return float
320967
public function purityIncrease() : float
    {
        $impurity = $this->impurity;

        if ($this->left instanceof Purity) {
            $impurity -= $this->left->impurity()
                * ($this->left->n() / $this->n);
        }

        if ($this->right instanceof Purity) {
            $impurity -= $this->right->impurity()
                * ($this->right->n() / $this->n);
        }

        return $impurity;
    }
452181
protected function min() {
    $this->a = "\n";
    $this->action(self::ACTION_DELETE_A_B);

    while ($this->a !== null) {
      switch ($this->a) {
        case ' ':
          if ($this->isAlphaNum($this->b)) {
            $this->action(self::ACTION_KEEP_A);
          } else {
            $this->action(self::ACTION_DELETE_A);
          }
          break;

        case "\n":
          switch ($this->b) {
            case '{':
            case '[':
            case '(':
            case '+':
            case '-':
              $this->action(self::ACTION_KEEP_A);
              break;

            case ' ':
              $this->action(self::ACTION_DELETE_A_B);
              break;

            default:
              if ($this->isAlphaNum($this->b)) {
                $this->action(self::ACTION_KEEP_A);
              }
              else {
                $this->action(self::ACTION_DELETE_A);
              }
          }
          break;

        default:
          switch ($this->b) {
            case ' ':
              if ($this->isAlphaNum($this->a)) {
                $this->action(self::ACTION_KEEP_A);
                break;
              }

              $this->action(self::ACTION_DELETE_A_B);
              break;

            case "\n":
              switch ($this->a) {
                case '}':
                case ']':
                case ')':
                case '+':
                case '-':
                case '"':
                case "'":
                  $this->action(self::ACTION_KEEP_A);
                  break;

                default:
                  if ($this->isAlphaNum($this->a)) {
                    $this->action(self::ACTION_KEEP_A);
                  }
                  else {
                    $this->action(self::ACTION_DELETE_A_B);
                  }
              }
              break;

            default:
              $this->action(self::ACTION_KEEP_A);
              break;
          }
      }
    }

    return $this->output;
  }
1357894
public function getLevel()
    {
        if ($this->_level !== null) {
            return $this->_level;
        }

        if ($this->isRoot()) {
            $this->_level = -1;
            return $this->_level;
        }

        $parents = array($this);
        $node = $this;

        while ($parent = $node->getParent()){
            if (!$parent->isRoot()) {
                $parents[] = $parent;
            }
            $node = $parent;
        }

        $this->_level = count($parents);

        return $this->_level;
    }
397281
public function getDepthAttribute()
    {
        $category = $this;

        return $this->remember('depth', function () use ($category) {
            $depth = 0;

            while ($category->parent) {
                $depth++;
                $category = $category->parent;
            }

            return $depth;
        });
    }
1015995
public function getDepth()
    {
        if ($this->depth === null) {
            $this->depth = NodePaths::getPathDepth($this->path);
        }

        return $this->depth;
    }
319637
protected function min() {
		if (0 == strncmp($this->peek(), "\xef", 1)) {
			$this->get();
			$this->get();
			$this->get();
		} 

		$this->a = "\n";
		$this->action(self::ACTION_DELETE_A_B);

		while ($this->a !== NULL) {
			switch ($this->a) {
				case ' ':
					if ($this->isAlphaNum($this->b)) {
						$this->action(self::ACTION_KEEP_A);
					}
					else {
						$this->action(self::ACTION_DELETE_A);
					}
					break;

				case "\n":
					switch ($this->b) {
						case '{':
						case '[':
						case '(':
						case '+':
						case '-':
						case '!':
						case '~':
							$this->action(self::ACTION_KEEP_A);
							break;

						case ' ':
							$this->action(self::ACTION_DELETE_A_B);
							break;
						default:
							if ($this->isAlphaNum($this->b)) {
								$this->action(self::ACTION_KEEP_A);
							}
							else {
								$this->action(self::ACTION_DELETE_A);
							}
					}
					break;

				default:
					switch ($this->b) {
						case ' ':
							if ($this->isAlphaNum($this->a)) {
								$this->action(self::ACTION_KEEP_A);
								break;
							}
							$this->action(self::ACTION_DELETE_A_B);
							break;

						case "\n":
							switch ($this->a) {
								case '}':
								case ']':
								case ')':
								case '+':
								case '-':
								case '"':
								case "'":
									$this->action(self::ACTION_KEEP_A);
									break;

								default:
									if ($this->isAlphaNum($this->a)) {
										$this->action(self::ACTION_KEEP_A);
									}
									else {
										$this->action(self::ACTION_DELETE_A_B);
									}
							}
							break;

						default:
							$this->action(self::ACTION_KEEP_A);
							break;
					}
			}
		}

		return $this->output;
	}
455391
public function getAvgExecutionTime(): float
    {
        return $this->getTotalExecutionTime() ? ($this->getTotalExecutionTime() / \count($this->data['commands'])) : (float) 0;
    }
298721
public function getIntDc()
    {
        $dc = intval($this->dc);
        if ($this->test) {
            $dc += 10000;
        }
        if (strpos($this->dc, '_media')) {
            $dc = -$dc;
        }

        return $dc;
    }
222647
public function getLastIndice()
    {
        $last = $this->getFirstIndice() - 1 + $this->getLimit();
        if ($last > $this->getTotal()) {
            $last = $this->getTotal();
        }

        return $last;
    }
260029
public function min()
    {
        if ($this->output !== '') { // min already run
            return $this->output;
        }
        $this->action(self::ACTION_DELETE_A_B);
        
        while ($this->a !== null) {
            // determine next command
            $command = self::ACTION_KEEP_A; // default
            if ($this->a === ' ') {
                if (! $this->isAlphaNum($this->b)) {
                    $command = self::ACTION_DELETE_A;
                }
            } elseif ($this->a === "\n") {
                if ($this->b === ' ') {
                    $command = self::ACTION_DELETE_A_B;
                } elseif (false === strpos('{[(+-', $this->b) 
                          && ! $this->isAlphaNum($this->b)) {
                    $command = self::ACTION_DELETE_A;
                }
            } elseif (! $this->isAlphaNum($this->a)) {
                if ($this->b === ' '
                    || ($this->b === "\n" 
                        && (false === strpos('}])+-"\'', $this->a)))) {
                    $command = self::ACTION_DELETE_A_B;
                }
            }
            $this->action($command);
        }
        $this->output = trim($this->output);
        return $this->output;
    }
311587
public function lowerItem()
    {
        if ($this->isNotInList()) return null;

        return $this->listifyScopedQuery()
            ->where($this->positionColumn(), '>', $this->getListifyPosition())
            ->orderBy($this->getTable() . '.' . $this->positionColumn())
            ->first();
    }
394998
public int decrease(double extrp, int decrease)
    {
        final int remain = getCurrent();
        final double decreased = remain - decrease * extrp;
        set(decreased);
        if (decreased < 0)
        {
            return remain;
        }
        return decrease;
    }
416672
protected function getLimit()
    {
        $limit = $this->activeState()->getLimit();
        if (!in_array($limit, $this->limits)) {
            //We are using lowest limit by default
            return $this->limits[0];
        }

        return $limit;
    }
323494
public function getRating() : ?float 
    {
        if ( ! $this->hasRating()) {
            $this->setRating($this->getDefaultRating());
        }
        return $this->rating;
    }
820439
public function getNettoSum()
    {
        $dSum = 0;
        foreach ($this->_aList as $oPrice) {
            $dSum += $oPrice->getNettoPrice();
        }

        return $dSum;
    }
1333368
public function reduce()
    {
        $pass = false;
        foreach ($this->variables as $variable => $type) {
            if ('variable' == $type || 'string' == $type || 'istring' == $type || 'array' == $type || 'null' == $type || 'numeric' == $type) {
                unset($this->variables[$variable]);
            } else {
                $pass = true;
                $this->infered[$variable] = $type;
            }
        }

        return $pass;
    }
29437
public function getUpgradeStatus() {
    $storage = $this->getLoggerEntityStorage();
    $not_resolved_conflicts = (int) $storage->getQuery()
      ->condition('status', 0)
      ->count()
      ->execute();

    return $not_resolved_conflicts === 0;
  }