- added feed() from array
- added feed() from Processor::Buffer git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@974 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#define _RADIO_FIRCOMPLEX_HPP_
|
||||
|
||||
#include <cpp/radio/Vector.hpp>
|
||||
#include <cpp/radio/processor/src/Buffer.hpp>
|
||||
|
||||
namespace Radio
|
||||
{
|
||||
@@ -33,11 +34,31 @@ public:
|
||||
m_state = ComplexScalar(0,0);
|
||||
}
|
||||
|
||||
// Feed single scalar
|
||||
void feed(ComplexScalar const &x)
|
||||
{
|
||||
insert_left(m_state, x);
|
||||
}
|
||||
|
||||
// Feed from array
|
||||
void feed(ComplexScalar const *x, size_t len)
|
||||
{
|
||||
for (size_t i=0; i < len; i++)
|
||||
{
|
||||
feed(*(x++));
|
||||
}
|
||||
}
|
||||
|
||||
// Feed from Processor::Buffer
|
||||
void feed(Processor::Buffer<ComplexScalar> &buf_in, size_t len)
|
||||
{
|
||||
for (size_t i=0; i < len; i++)
|
||||
{
|
||||
ComplexScalar x = buf_in.readAt(0);
|
||||
feed(x);
|
||||
}
|
||||
}
|
||||
|
||||
ComplexScalar process(CVec const &coeff)
|
||||
{
|
||||
return trans(m_state) * conj(coeff);
|
||||
|
||||
Reference in New Issue
Block a user