Skip to main content
. Author manuscript; available in PMC: 2015 Dec 23.
Published in final edited form as: Ann Appl Stat. 2015;9(3):1103–1140. doi: 10.1214/15-AOAS842

Algorithm 3 FastProxSL1

input: Nonnegative and nonincreasing sequences y and λ.
while y − λ is not nonincreasing do
  Identify nondecreasing and nonconstant subsequences, that is, segments i : j such that
yiλiyi+1λi+1yjλjandyiλi<yjλj. (2.4)
  Replace the values of y and λ over such segments by their average value: for k ∈ {i, i + 1, , j}
yk1ji+1ikjyk,λk1ji+1ikjλk.
end while
output: x = (y − λ)+.