View source: R/function_nesterovFactors.R
positive_subspace_pmax | R Documentation |
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.
positive_subspace_pmax(x)
x |
numeric vector |
pmax(x,0), numeric vector with same length as x, but without any negative entries
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.