| 49 | |
| 50 | template <typename VT1,typename VT2> |
| 51 | long double dif_rmse( const VT1 buf1,const VT2 buf2) |
| 52 | { |
| 53 | long double totalpower=0; |
| 54 | long double difpower=0; |
| 55 | size_t n = (min)( buf1.size(),buf2.size() ); |
| 56 | for (size_t k=0;k<n;++k) { |
| 57 | totalpower += (long double)((numext::abs2( buf1[k] ) + numext::abs2(buf2[k]) )/2); |
| 58 | difpower += (long double)(numext::abs2(buf1[k] - buf2[k])); |
| 59 | } |
| 60 | return sqrt(difpower/totalpower); |
| 61 | } |
| 62 | |
| 63 | enum { StdVectorContainer, EigenVectorContainer }; |
| 64 |
no test coverage detected