added .clean()
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user