R/soft.R

Defines functions soft

Documented in soft

#' the function soft() encodes the soft-thresholding operator
#' @param x Float
#' @param d Float
#' @keywords internal
soft <-
function(x,d) return(sign(x)*pmax(0, abs(x)-d))
ecamenen/r-rgcca documentation built on Jan. 16, 2020, 12:50 a.m.