Changeset 588 for trunk/test/statistics_test.cc
 Timestamp:
 Jun 21, 2006, 5:43:29 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/statistics_test.cc
r511 r588 7 7 #include <cstdlib> 8 8 #include <iostream> 9 9 #include <cmath> 10 10 11 11 int main() … … 18 18 gsl_vec(i)=i; 19 19 } 20 20 21 double m=statistics::median(data); 21 22 double m_gsl=statistics::median(gsl_vec); 22 23 if (m!=4.5  m!=m_gsl) 23 24 return 1; 25 26 double tolerance=1e10; 27 double skewness_gsl=statistics::skewness(gsl_vec); 28 if (fabs(skewness_gsl)>tolerance) 29 return 1; 30 double kurtosis_gsl=statistics::kurtosis(gsl_vec); 31 if (fabs(kurtosis_gsl+1.5616363636363637113)>tolerance) 32 return 1; 24 33 return 0; 25 34 }
Note: See TracChangeset
for help on using the changeset viewer.