1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/common/include/villas/dsp/exponential_window.hpp
Steffen Vogel e743b42c6f code cleanups
- Use C++ style comments
- Harmonize indentions
- Harmonize comment capitalization

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 18:58:07 +01:00

38 lines
639 B
C++

/** An exponential window.
*
* @file
* @author Steffen Vogel <svogel2@eonerc.rwth-aachen.de>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache License 2.0
*********************************************************************************/
#pragma once
#include <villas/dsp/window.hpp>
namespace villas {
namespace dsp {
template<typename T>
class ExponentialWindow {
protected:
T a;
T last;
public:
ExponentialWindow(T _a, T i = 0) :
a(a),
last(i)
{ }
T update(T in)
{
last = a * in + (1 - a) * last;
return last;
}
};
} // namespace dsp
} // namespace villas