1
0
Fork 0
mirror of https://github.com/hb9fxq/gr-digitalhf synced 2024-11-05 13:55:53 +00:00
gr-digitalhf/lib/nlms.hpp

43 lines
801 B
C++
Raw Normal View History

2019-09-11 14:30:36 +00:00
// -*- c++ -*-
#ifndef _LIB_NLMS_HPP_
#define _LIB_NLMS_HPP_
#include <vector>
#include "filter_update.hpp"
2019-09-24 11:29:56 +00:00
#include "volk_alloc.h"
2019-09-11 14:30:36 +00:00
namespace gr {
namespace digitalhf {
class nlms : public filter_update {
public:
virtual ~nlms();
2019-09-14 15:02:30 +00:00
static sptr make(float mu, float delta);
2019-09-11 14:30:36 +00:00
virtual void reset();
virtual gr_complex const* update(gr_complex const*, gr_complex const*);
virtual void set_parameters(std::map<std::string, float>const &);
protected:
void resize(size_t);
private:
2019-09-14 15:02:30 +00:00
nlms(float mu, float delta);
2019-09-24 11:29:56 +00:00
typedef volk::vector<gr_complex> complex_vec_type;
typedef volk::vector<float> real_vec_type;
2019-09-11 14:30:36 +00:00
float _mu;
2019-09-14 15:02:30 +00:00
float _delta;
2019-09-11 14:30:36 +00:00
complex_vec_type _gain;
complex_vec_type _tmp;
real_vec_type _t1;
} ;
} // namespace digitalhf
} // namespace gr
#endif // _LIB_NLMS_HPP_