Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- #ifndef OKAPI_AVERAGEFILTER_HPP_
- #define OKAPI_AVERAGEFILTER_HPP_
- #include "okapi/filter/filter.hpp"
- #include <array>
- #include <cstddef>
- namespace okapi {
- /**
- * @tparam number of taps in the filter
- */
- template <std::size_t n> class AverageFilter : public Filter {
- public:
- /**
- * Averaging filter.
- */
- AverageFilter();
- virtual ~AverageFilter();
- double filter(const double ireading) override;
- double getOutput() const override;
- private:
- std::array<double, n> data;
- double index, output;
- };
- } // namespace okapi
- #include "../src/averageFilter.cpp"
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement