- added processReal

git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@95 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-12-20 21:00:40 +00:00
parent 842b2fad60
commit 12d6c3a59a
+6 -4
View File
@@ -30,15 +30,12 @@ public:
{ {
m_numTaps = numTaps; m_numTaps = numTaps;
m_x.resize(numTaps); m_x.resize(numTaps);
// m_x.fill(ComplexScalar(0,0)); m_x.fill(ComplexScalar(0,0));
} }
void feed(ComplexScalar const &x) void feed(ComplexScalar const &x)
{ {
// m_x.reverse().head(m_numTaps-1) = m_x.reverse().tail(m_numTaps-1);
m_x.reverse() << m_x.head(m_numTaps-1).reverse(), x; m_x.reverse() << m_x.head(m_numTaps-1).reverse(), x;
// m_x(0) = x;
} }
ComplexScalar process(CVec const &coeff) ComplexScalar process(CVec const &coeff)
@@ -46,6 +43,11 @@ public:
return m_x.transpose() * coeff.conjugate(); return m_x.transpose() * coeff.conjugate();
} }
ComplexScalar processReal(RVec const &coeff)
{
return m_x.transpose() * coeff;
}
protected: protected:
uint32_t m_numTaps; uint32_t m_numTaps;
CVec m_x; CVec m_x;