#6567 Remove use of GNU GSL

This commit is contained in:
Gaute Lindkvist
2020-09-23 15:48:19 +02:00
parent 2741b24e27
commit 9afac51bca
15 changed files with 32 additions and 231 deletions

View File

@@ -83,27 +83,3 @@ TEST( RiaStatisticsTools, NegativeCorrelation )
double correlation = RiaStatisticsTools::pearsonCorrelation( a, b );
EXPECT_NEAR( correlation, -1.0, 1.0e-2 );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
#ifdef USE_GSL
TEST( RiaStatisticsTools, ComparisonGSLAndOwn )
{
const int N = 1000;
std::vector<double> a, b;
a.reserve( N );
b.reserve( N );
for ( int i = 0; i < N; ++i )
{
a.push_back( (double)i );
}
for ( int i = 0; i < N; ++i )
{
b.push_back( (double)std::rand() );
}
double correlationGSL = RiaStatisticsTools::pearsonCorrelationGSL( a, b );
double correlationOwn = RiaStatisticsTools::pearsonCorrelationOwn( a, b );
EXPECT_NEAR( correlationGSL, correlationOwn, 1.0e-3 );
}
#endif