MCPcopy Create free account
hub / github.com/abess-team/abess / dif_rmse

Function dif_rmse

python/include/unsupported/test/FFTW.cpp:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
63enum { StdVectorContainer, EigenVectorContainer };
64

Callers 2

test_scalar_genericFunction · 0.85
test_complex_genericFunction · 0.85

Calls 3

abs2Function · 0.50
sqrtFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected