diff --git a/include/armadillo_bits/diagview_bones.hpp b/include/armadillo_bits/diagview_bones.hpp index 689dbba2..d27eaeab 100644 --- a/include/armadillo_bits/diagview_bones.hpp +++ b/include/armadillo_bits/diagview_bones.hpp @@ -93,6 +93,8 @@ class diagview : public Base< eT, diagview > inline void replace(const eT old_val, const eT new_val); + inline void clean(const pod_type threshold); + inline void clamp(const eT min_val, const eT max_val); inline void fill(const eT val); diff --git a/include/armadillo_bits/diagview_meat.hpp b/include/armadillo_bits/diagview_meat.hpp index 7470bf82..f08fe73a 100644 --- a/include/armadillo_bits/diagview_meat.hpp +++ b/include/armadillo_bits/diagview_meat.hpp @@ -937,6 +937,22 @@ diagview::replace(const eT old_val, const eT new_val) +template +inline +void +diagview::clean(const typename get_pod_type::result threshold) + { + arma_extra_debug_sigprint(); + + Mat tmp(*this); + + tmp.clean(threshold); + + (*this).operator=(tmp); + } + + + template inline void