added .clean()

This commit is contained in:
conrad
2021-05-15 00:19:40 +10:00
parent 7ca483dea2
commit 11c8a05f85
2 changed files with 18 additions and 0 deletions
@@ -93,6 +93,8 @@ class diagview : public Base< eT, diagview<eT> >
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);
+16
View File
@@ -937,6 +937,22 @@ diagview<eT>::replace(const eT old_val, const eT new_val)
template<typename eT>
inline
void
diagview<eT>::clean(const typename get_pod_type<eT>::result threshold)
{
arma_extra_debug_sigprint();
Mat<eT> tmp(*this);
tmp.clean(threshold);
(*this).operator=(tmp);
}
template<typename eT>
inline
void