34template <base::concepts::real_scalar_dense_vector Vector>
36 Vector& target,
typename Vector::Scalar threshold) {
39#pragma omp parallel for if (target.size() > parallelized_size)
41 if (target(i) > threshold) {
42 target(i) -= threshold;
43 }
else if (target(i) < -threshold) {
44 target(i) += threshold;
Definition of index_type type.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of internal implementations.
void apply_shrinkage_operator(Vector &target, typename Vector::Scalar threshold)
Apply shrinkage operator to a vector.
Definition of real_scalar_dense_vector concept.