smooth_extremum: Compute a smooth differentiable approximation to the minimum...

View source: R/numericFunctions.R

smooth_extremumR Documentation

Compute a smooth differentiable approximation to the minimum or maximum of a numeric vector

Description

Compute a smooth differentiable approximation to the minimum or maximum of a numeric vector

Usage

smooth_extremum(x, type = NULL, alpha = 4)

Arguments

x

A numeric vector.

type

Character "min" or "max" specifying the type of extremum desired.

alpha

A numeric smoothing parameter (alpha > 0).

Value

An approximation to the minimum or maximum of x.

References

https://en.wikipedia.org/wiki/Smooth_maximum


sgutreuter/SGmisc documentation built on Aug. 25, 2024, 7:21 p.m.