ZeroPhaseDecorator
ZeroPhaseDecorator
Decorator that applies zero-phase filtering to any filter. More…
#include <ZeroPhaseDecorator.hpp>
Inherits from IFilter
Public Functions
| Name | |
|---|---|
| ZeroPhaseDecorator(std::unique_ptr< IFilter > filter) Construct a zero-phase decorator around an existing filter. |
|
| virtual void | process(std::span< float > data) override Process analog time series data in-place. |
| virtual void | reset() override Reset the filter’s internal state. |
| virtual std::string | getName() const override Get a descriptive name for this filter. |
| IFilter const & | getWrappedFilter() const Get access to the wrapped filter. |
Additional inherited members
Public Functions inherited from IFilter
| Name | |
|---|---|
| virtual | ~IFilter() =default |
Detailed Description
class ZeroPhaseDecorator;Decorator that applies zero-phase filtering to any filter.
This decorator implements zero-phase filtering by applying the wrapped filter in both forward and reverse directions. This eliminates phase distortion but doubles the effective filter order.
Public Functions Documentation
function ZeroPhaseDecorator
inline explicit ZeroPhaseDecorator(
std::unique_ptr< IFilter > filter
)Construct a zero-phase decorator around an existing filter.
Parameters:
- filter The filter to wrap (takes ownership)
function process
inline virtual void process(
std::span< float > data
) overrideProcess analog time series data in-place.
Parameters:
- data Span of data to process in-place
Reimplements: IFilter::process
This method processes the entire data array. The implementation should handle the sample-by-sample loop internally to avoid virtual function call overhead per sample.
function reset
inline virtual void reset() overrideReset the filter’s internal state.
Reimplements: IFilter::reset
This clears any internal filter state (delay lines, etc.) so the filter can be reused for a new data sequence.
function getName
inline virtual std::string getName() const overrideGet a descriptive name for this filter.
Return: String describing the filter (e.g., “Butterworth Lowpass Order 4”)
Reimplements: IFilter::getName
function getWrappedFilter
inline IFilter const & getWrappedFilter() constGet access to the wrapped filter.
Return: Const reference to the wrapped filter
Updated on 2026-11-13 at 20:25:39 +0000