Skip to main content

IFilter

IFilter

Abstract interface for all filters. More…

#include <IFilter.hpp>

Inherited by ButterworthBandpassFilter< Order >, ButterworthBandstopFilter< Order >, ButterworthHighpassFilter< Order >, ButterworthLowpassFilter< Order >, ChebyshevIBandpassFilter< Order >, ChebyshevIBandstopFilter< Order >, ChebyshevIHighpassFilter< Order >, ChebyshevIIBandpassFilter< Order >, ChebyshevIIBandstopFilter< Order >, ChebyshevIIHighpassFilter< Order >, ChebyshevIILowpassFilter< Order >, ChebyshevILowpassFilter< Order >, RBJBandpassFilter, RBJBandstopFilter, RBJHighpassFilter, RBJLowpassFilter, ZeroPhaseDecorator

Public Functions

Name
virtual ~IFilter() =default
virtual void process(std::span< float > data) =0
Process analog time series data in-place.
virtual void reset() =0
Reset the filter’s internal state.
virtual std::string getName() const =0
Get a descriptive name for this filter.

Detailed Description

class IFilter;

Abstract interface for all filters.

This interface defines the contract for filters that process analog time series data. The virtual function call overhead occurs only once per processing call, not per sample.

Public Functions Documentation

function ~IFilter

virtual ~IFilter() =default

function process

virtual void process(
    std::span< float > data
) =0

Process analog time series data in-place.

Parameters:

  • data Span of data to process in-place

Reimplemented by: ButterworthBandpassFilter::process, ButterworthBandstopFilter::process, ButterworthHighpassFilter::process, ButterworthLowpassFilter::process, ChebyshevIBandpassFilter::process, ChebyshevIBandstopFilter::process, ChebyshevIHighpassFilter::process, ChebyshevIIBandpassFilter::process, ChebyshevIIBandstopFilter::process, ChebyshevIIHighpassFilter::process, ChebyshevIILowpassFilter::process, ChebyshevILowpassFilter::process, RBJBandpassFilter::process, RBJBandstopFilter::process, RBJHighpassFilter::process, RBJLowpassFilter::process, ZeroPhaseDecorator::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

virtual void reset() =0

Reset the filter’s internal state.

Reimplemented by: ButterworthBandpassFilter::reset, ButterworthBandstopFilter::reset, ButterworthHighpassFilter::reset, ButterworthLowpassFilter::reset, ChebyshevIBandpassFilter::reset, ChebyshevIBandstopFilter::reset, ChebyshevIHighpassFilter::reset, ChebyshevIIBandpassFilter::reset, ChebyshevIIBandstopFilter::reset, ChebyshevIIHighpassFilter::reset, ChebyshevIILowpassFilter::reset, ChebyshevILowpassFilter::reset, RBJBandpassFilter::reset, RBJBandstopFilter::reset, RBJHighpassFilter::reset, RBJLowpassFilter::reset, ZeroPhaseDecorator::reset

This clears any internal filter state (delay lines, etc.) so the filter can be reused for a new data sequence.

function getName

virtual std::string getName() const =0

Get a descriptive name for this filter.

Return: String describing the filter (e.g., “Butterworth Lowpass Order 4”)

Reimplemented by: ButterworthBandpassFilter::getName, ButterworthBandstopFilter::getName, ButterworthHighpassFilter::getName, ButterworthLowpassFilter::getName, ChebyshevIBandpassFilter::getName, ChebyshevIBandstopFilter::getName, ChebyshevIHighpassFilter::getName, ChebyshevIIBandpassFilter::getName, ChebyshevIIBandstopFilter::getName, ChebyshevIIHighpassFilter::getName, ChebyshevIILowpassFilter::getName, ChebyshevILowpassFilter::getName, RBJBandpassFilter::getName, RBJBandstopFilter::getName, RBJHighpassFilter::getName, RBJLowpassFilter::getName, ZeroPhaseDecorator::getName


Updated on 2026-11-13 at 20:25:40 +0000