""" This function applies `Niter` iterations of GD to compute the minimizer ``\\hat{x}`` of the cost function ``\\Psi(x) = \\frac{1}{2} \\| A x - y \\|_2^2 + R(x)`` given the gradient ``\\nabla R`` """ function rls(y, A, x, α::Real, ∇R::Function ; Niter::Int = 50) ∇Ψ(x) = A'*(A*x - y) + ∇R(x) # reg. LS cost gradient gd(∇Ψ, α, x ; Niter) # returns updated x end