11 #ifndef __HIGHPASS_HEADER
12 #define __HIGHPASS_HEADER
15 #include "../../util/mean_trait.hpp"
19 template<
typename T,
unsigned PROMIL,
typename _base =
identity_filter<T> >
35 last_in_ = base::value();
40 val_ = (val_ + base::value() - last_in_) * PROMIL / 1000.0;
41 last_in_ = base::value();
46 return highpass_impl<mean_type, T>();
53 template<
typename M,
typename U>
57 template<
typename M,
typename U>
58 typename enable_if<not is_same<M, U>::value, M>::type highpass_impl()
const {
66 template<
typename T,
typename _base,
unsigned PROMIL>
71 #endif //__HIGHPASS_HEADER
highpass_filter & operator=(T const &in)
Definition: highpass.hpp:32
highpass_filter(highpass_filter const &arg)
Definition: highpass.hpp:27
S & operator<<(S &os, oss_class< D, max_buf > const &arg)
Definition: serializer.hpp:158
Definition: type_traits.hpp:228
Definition: highpass.hpp:20
Definition: realization.hpp:19
ustd::conditional< detail::use_double_identifier< T >::value, double, T >::type type
Definition: mean_trait.hpp:44
highpass_filter & operator<<(T const &in)
Definition: highpass.hpp:38
T value() const
Definition: highpass.hpp:45
highpass_filter< T, PROMIL, _base > type
Definition: highpass.hpp:68
highpass_filter()
Definition: highpass.hpp:25
highpass_filter(T const &arg)
Definition: highpass.hpp:29