LCOV - code coverage report
Current view: top level - EQ - FourthOrderFilter.hxx (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 16 16 100.0 %
Date: 2021-02-18 20:07:22 Functions: 4 4 100.0 %

          Line data    Source code
       1             : /**
       2             :  * \file FourthOrderFilter.hxx
       3             :  */
       4             : 
       5             : #include "FourthOrderFilter.h"
       6             : #include <ATK/EQ/IIRFilter.h>
       7             : 
       8             : #include <boost/math/constants/constants.hpp>
       9             : 
      10             : #include <cassert>
      11             : #include <cmath>
      12             : 
      13             : namespace ATK
      14             : {
      15             :   template <typename DataType_>
      16          10 :   FourthOrderBaseCoefficients<DataType_>::FourthOrderBaseCoefficients(gsl::index nb_channels)
      17          10 :     :Parent(nb_channels, nb_channels)
      18             :   {
      19          10 :   }
      20             : 
      21             :   template <typename DataType_>
      22          25 :   void FourthOrderBaseCoefficients<DataType_>::setup()
      23             :   {
      24          25 :     Parent::setup();
      25             : 
      26          25 :     coefficients_in.assign(in_order+1, 0);
      27          25 :     coefficients_out.assign(out_order, 0);
      28          25 :   }
      29             : 
      30             :   template <typename DataType_>
      31          10 :   void FourthOrderBaseCoefficients<DataType_>::set_cut_frequency(CoeffDataType cut_frequency)
      32             :   {
      33          10 :     if(cut_frequency <= 0)
      34             :     {
      35           1 :       throw std::out_of_range("Frequency can't be negative");
      36             :     }
      37           9 :     this->cut_frequency = cut_frequency;
      38           9 :     setup();
      39           9 :   }
      40             :   
      41             :   template <typename DataType_>
      42           1 :   typename FourthOrderBaseCoefficients<DataType_>::CoeffDataType FourthOrderBaseCoefficients<DataType_>::get_cut_frequency() const
      43             :   {
      44           1 :     return cut_frequency;
      45             :   }
      46             : }

Generated by: LCOV version TK-3.3.0-4-gdba42eea