fbgsense 0.1
Generic FBG spectrum analysis tool
filter_savgol.h
1/*
2 * This file is a part of the project "fbgsense", which is released under MIT license.
3 * Copyright (c) 2022 Daniel Múčka, Masaryk University, Faculty of Informatics
4 * See file LICENSE or visit https://opensource.org/licenses/MIT for full license details.
5 */
6
7#pragma once
8
9#include <span>
10
11#include "../savgol.h"
12#include "../spectrum_types.h"
13#include "filter.h"
14
15namespace fbgsense::filtering
16{
17 class filter_savgol : public filter
18 {
19 public:
20
21 constexpr int get_type() override
22 {
23 return get_hash("SAVGOL");
24 }
25
27 std::unique_ptr<filter> create() override
28 {
29 return std::make_unique<filter_savgol>();
30 }
31
35 void perform(spectrum_state spect, std::initializer_list<parameter_t> params) override;
36 };
37}
Definition: filter_savgol.h:18
std::unique_ptr< filter > create() override
Factory for the current concrete subclass.
Definition: filter_savgol.h:27
constexpr int get_type() override
Gets the unique identifier of the concrete subclass. Used for equal-type checking....
Definition: filter_savgol.h:21
void perform(spectrum_state spect, std::initializer_list< parameter_t > params) override
Filter using the Savitzky-Golay filter with Gram polynome approximation technique.
Definition: filter.h:16
constexpr int get_hash(const char str[])
Java string hashing function. http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/cl...
Definition: processor.h:24
Data structure reflecting spectrum's current state. Used in processors.
Definition: spectrum_state.h:19