10 Eigen::ComputeThinU | Eigen::ComputeThinV>;
14template <Config Conf,
class SVD = DefaultSVD<Conf>>
20 if (
λ < 0 || !std::isfinite(
λ))
21 throw std::invalid_argument(
"NuclearNorm::λ must be nonnegative");
26 if (
λ < 0 || !std::isfinite(
λ))
27 throw std::invalid_argument(
"NuclearNorm::λ must be nonnegative");
45 auto step = vec::Constant(n,
λ * γ);
51 using Eigen::placeholders::all, Eigen::seqN;
52 auto sel = seqN(0, rank);
53 auto &&U =
svd.matrixU(), &&V =
svd.matrixV();
55 V.transpose()(sel, all);
61 return self.
prox(std::move(in), std::move(out), γ);
#define USING_ALPAQA_CONFIG(Conf)
Eigen::BDCSVD< typename Conf::mat, Eigen::ComputeThinU|Eigen::ComputeThinV > DefaultSVD
std::decay_t< decltype(Tag)> tag_t
typename Conf::crmat crmat
typename Conf::real_t real_t
typename Conf::index_t index_t
typename Conf::length_t length_t
real_t prox(crmat in, rmat out, real_t γ=1)
Nuclear norm (ℓ₁-norm of singular values).
real_t prox(crmat in, rmat out, real_t γ=1)
NuclearNorm(real_t λ=1)
Construct without pre-allocation.
NuclearNorm(real_t λ, length_t rows, length_t cols)
Construct with pre-allocation.
friend real_t alpaqa_tag_invoke(tag_t< alpaqa::prox >, NuclearNorm &self, crmat in, rmat out, real_t γ)