Line data Source code
1 : /** 2 : * \file HouseholderMixture.hxx 3 : */ 4 : 5 : #include "HouseholderMixture.h" 6 : #include <ATK/Delay/FeedbackDelayNetworkFilter.hxx> 7 : 8 : #include <Eigen/Dense> 9 : 10 : namespace ATK 11 : { 12 : template<typename DataType_, unsigned int nb_channels> 13 : class HouseholderMixture<DataType_, nb_channels>::MixtureImpl 14 : { 15 : public: 16 : using Vector = Eigen::Matrix<DataType, nb_channels, 1>; 17 : using Matrix = Eigen::Matrix<DataType, nb_channels, nb_channels>; 18 : 19 1147320 : Vector mix(const Vector& x) const 20 : { 21 2294640 : return transition * x; 22 : } 23 : 24 : protected: 25 : const Matrix transition = create(); 26 : 27 15 : static Matrix create() 28 : { 29 15 : return Matrix::Identity().array() - (DataType(2) / DataType(nb_channels)); 30 : } 31 : }; 32 : }