 |
FilterGen
1.0.0
A library to design digital filters in embedded systems.
|
Go to the documentation of this file. 1 #ifndef DH_FILTER_CPP_INCLUDED
2 #define DH_FILTER_CPP_INCLUDED
148 error(
const char* str) : str_(str) {}
151 const char*
what() const noexcept {
160 bool good() const noexcept;
166 span(
double* begin,
size_t size) : begin_(begin), end_(begin+size) {}
169 const double*
begin() const noexcept {
174 const double*
end() const noexcept {
180 return end_ - begin_;
189 const double* begin_;
209 void create_internal_data();
std::vector< dh_frequency_response_t > compute_frequency_response(size_t count) const
Computes the frequency response of the filter and returns a vector with count entries.
const double * end() const noexcept
Definition: filter.hpp:174
filter & operator=(const filter &)
Deep copy.
This class holds the C++ bindings to the filter library.
Definition: filter.hpp:50
Definition: filter.hpp:163
span(double *begin, size_t size)
Definition: filter.hpp:166
span feedback_coefficients() const noexcept
const double * begin() const noexcept
Definition: filter.hpp:169
double x
Definition: filter.hpp:123
std::vector< graph_point > compute_impulse_response() const
Computes the impulse response of the filter.
span feedforward_coefficients() const noexcept
Definition: filter-types.h:206
size_t size() const noexcept
Definition: filter.hpp:179
void set_gain(double gain)
Definition: filter-types.h:81
double current_value
Definition: filter-types.h:218
Definition: filter.hpp:121
std::vector< graph_point > compute_step_response() const
Computes the step response of the filter.
error(const char *str)
Definition: filter.hpp:148
double input
Definition: filter.hpp:125
bool good() const noexcept
const char * what() const noexcept
Definition: filter.hpp:151
The data types for the filter library.
double operator[](size_t i) const noexcept
Definition: filter.hpp:184
double output
Definition: filter.hpp:127
Definition: filter.hpp:145
filter(parameters_t options)
Constructs a filter with the given options.
double current_value() const noexcept
Returns the filtered value without changing the state of the filter.
Definition: filter.hpp:91
double update(double in)
Updates the internal state of the filter with a new input value and returns the updated filtered valu...
const parameters_t & options() const
Definition: filter.hpp:96