positive_subspace_pmax: Wrapper for pmax

View source: R/function_nesterovFactors.R

positive_subspace_pmaxR Documentation

Wrapper for pmax

Description

positive_subspace_pmax expects a vector x, and applies pmax(x, 0) on it. It is needed as a wrapper within the descent_generalized_fista implementation.

Usage

positive_subspace_pmax(x)

Arguments

x

numeric vector

Value

pmax(x,0), numeric vector with same length as x, but without any negative entries

Examples

set.seed(2202)
vec.with.neg <- rnorm(10)
range(vec.with.neg)
vec.without.neg <- positive_subspace_pmax(vec.with.neg)
range(vec.without.neg)

MarianSchoen/DTD documentation built on April 29, 2022, 1:59 p.m.