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