2019-09-09 14:04:06 +00:00
|
|
|
// -*- c++ -*-
|
|
|
|
|
|
|
|
#ifndef _LIB_RLS_HPP_
|
|
|
|
#define _LIB_RLS_HPP_
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "filter_update.hpp"
|
|
|
|
#include "volk_allocator.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace gr {
|
|
|
|
namespace digitalhf {
|
|
|
|
|
|
|
|
class rls : public filter_update {
|
|
|
|
public:
|
|
|
|
rls(float delta, float lambda);
|
|
|
|
virtual ~rls();
|
|
|
|
|
|
|
|
static sptr make(float delta, float lambda);
|
|
|
|
|
|
|
|
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-09 15:41:20 +00:00
|
|
|
typedef std::vector<gr_complex, volk_allocator<gr_complex> > vec_type;
|
|
|
|
float _delta;
|
|
|
|
float _lambda;
|
|
|
|
vec_type _gain;
|
|
|
|
vec_type _inv_corr;
|
|
|
|
vec_type _pu;
|
|
|
|
vec_type _tmp;
|
2019-09-09 14:04:06 +00:00
|
|
|
} ;
|
|
|
|
|
|
|
|
} // namespace digitalhf
|
|
|
|
} // namespace gr
|
|
|
|
#endif // _LIB_RLS_HPP_
|