15 #ifndef INCLUDED_numeric_statistics_functions_hh
16 #define INCLUDED_numeric_statistics_functions_hh
31 template<
class Iterator,
typename T>
38 for ( ; first != last; ++
first ) {
47 template<
class Iterator,
typename T>
54 for ( ; first != last; ++
first ) {
55 T meandev = *first -
mean;
56 std_dev2 += (meandev * meandev);
60 return sqrt( std_dev2 );
63 template<
class Iterator,
typename T>
68 T meanval =
mean( first, last, *first );
76 std::complex<double>
w(std::complex<double>
z,
double relerr=0);
77 double w_im(
double x);
80 std::complex<double>
errfcx(std::complex<double>
z,
double relerr=0);
84 std::complex<double>
errf(std::complex<double>
z,
double relerr=0);
85 double errf(
double x);
88 std::complex<double>
errfi(std::complex<double>
z,
double relerr=0);
92 std::complex<double>
errfc(std::complex<double>
z,
double relerr=0);
96 std::complex<double>
Dawson(std::complex<double>
z,
double relerr=0);
138 #endif // INCLUDED_numeric_statistics_functions_HH
cmplx w(cmplx z, double relerr)
cmplx errfcx(cmplx z, double relerr)
numeric::Real kl_divergence(utility::vector1< numeric::Real > const &prior, utility::vector1< numeric::Real > const &posterior)
Returns the Kullback-Leibler divergence (aka relative entropy) between two discrete probability distr...
cmplx errfi(cmplx z, double relerr)
numeric::Real corrcoef_with_provided_mean_and_std_dev(utility::vector1< numeric::Real > const &vec1, numeric::Real m1, numeric::Real sd1, utility::vector1< numeric::Real > const &vec2, numeric::Real m2, numeric::Real sd2)
numeric::Real corrcoef(utility::vector1< numeric::Real > const &vec1, utility::vector1< numeric::Real > const &vec2)
std::vector with 1-based indexing
numeric::Real cov(utility::vector1< numeric::Real > const &vec1, utility::vector1< numeric::Real > const &vec2)
rosetta project type declarations. Should be kept updated with core/types.hh. This exists because num...
T std_dev(Iterator first, Iterator last, T)
T mean(Iterator first, Iterator last, T)
mean value of an input vector
T std_dev_with_provided_mean(Iterator first, Iterator last, T mean)
vector1: std::vector with 1-based indexing
void statistics(std::string filename)
numeric::Real cov_with_provided_mean(utility::vector1< numeric::Real > const &vec1, numeric::Real m1, utility::vector1< numeric::Real > const &vec2, numeric::Real m2)