Definition in file vec_stats.h.
#include <iostream>
#include <cmath>
#include <string>
#include <fstream>
#include <sstream>
#include <o2scl/err_hnd.h>
#include <gsl/gsl_ieee_utils.h>
#include <gsl/gsl_sort.h>
Go to the source code of this file.
Functions | |
template<class vec_t> | |
double | vector_max (const size_t n, vec_t &data) |
Compute the maximum of the first n elements of a vector. | |
template<class vec_t> | |
double | vector_min (const size_t n, vec_t &data) |
Compute the minimum of the first n elements of a vector. | |
template<class vec_t> | |
int | vector_minmax (const size_t n, vec_t &data, double &min, double &max) |
Compute the minimum and maximum of the first n elements of a vector. | |
template<class vec_t> | |
size_t | vector_max_index (const size_t n, vec_t &data, double &max) |
Compute the maximum of the first n elements of a vector. | |
template<class vec_t> | |
int | vector_min_index (const size_t n, vec_t &data, double &min) |
Compute the minimum of the first n elements of a vector. | |
template<class vec_t> | |
int | vector_minmax_index (const size_t n, vec_t &data, double &min, size_t &ix, double &max, size_t &ix2) |
Compute the minimum and maximum of the first n elements of a vector. | |
template<class vec_t> | |
double | vector_sum (const size_t n, vec_t &data) |
Compute the sum of the first n elements of a vector. | |
template<class vec_t> | |
double | vector_mean (const size_t n, vec_t &data) |
Compute the mean of the first n elements of a vector. | |
template<class vec_t> | |
double | vector_variance_fmean (const size_t n, vec_t &data, double mean) |
Variance. | |
template<class vec_t> | |
double | vector_stddev_fmean (const size_t n, vec_t &data, double mean) |
Standard deviation. | |
template<class vec_t> | |
double | vector_variance (const size_t n, vec_t &data, double mean) |
Compute the variance of the first n elements of a vector given the mean mean . | |
template<class vec_t> | |
double | vector_variance (const size_t n, vec_t &data) |
Variance. | |
template<class vec_t> | |
double | vector_stddev (const size_t n, vec_t &data) |
Standard deviation. | |
template<class vec_t> | |
double | vector_stddev (const size_t n, vec_t &data, double mean) |
Standard deviation. | |
template<class vec_t> | |
double | vector_absdev (const size_t n, vec_t &data, double mean) |
Absolute deviation from the mean. | |
template<class vec_t> | |
double | vector_absdev (const size_t n, vec_t &data) |
Absolute deviation from the mean. | |
template<class vec_t> | |
double | vector_skew (const size_t n, vec_t &data, double mean, double stddev) |
Skewness. | |
template<class vec_t> | |
double | vector_skew (const size_t n, vec_t &data) |
Skewness. | |
template<class vec_t> | |
double | vector_kurtosis (const size_t n, vec_t &data, double mean, double stddev) |
Kurtosis. | |
template<class vec_t> | |
double | vector_kurtosis (const size_t n, vec_t &data) |
Kurtosis. | |
template<class vec_t> | |
double | vector_lag1_autocorr (const size_t n, vec_t &data, double mean) |
Lag1 autocorrelation. | |
template<class vec_t> | |
double | vector_lag1_autocorr (const size_t n, vec_t &data) |
Lag1 autocorrelation. | |
template<class vec_t> | |
double | vector_covariance (const size_t n, vec_t &data1, vec_t &data2, double mean1, double mean2) |
Covariance. | |
template<class vec_t> | |
double | vector_covariance (const size_t n, vec_t &data1, vec_t &data2) |
Covariance. | |
template<class vec_t> | |
double | vector_correlation (const size_t n, vec_t &data1, vec_t &data2) |
Pearson's correlation. | |
template<class vec_t> | |
double | vector_pvariance (const size_t n1, vec_t &data1, const size_t n2, vec_t &data2) |
Pooled variance. | |
template<class vec_t> | |
double | vector_quantile_sorted (const size_t n, vec_t &data, const double f) |
Quantile. | |
template<class vec_t> | |
double | vector_median_sorted (const size_t n, vec_t &data) |
Quantile. |
double vector_mean | ( | const size_t | n, | |
vec_t & | data | |||
) | [inline] |
Compute the mean of the first n
elements of a vector.
If n
is zero, this will set avg
to zero and return gsl_success.
Definition at line 180 of file vec_stats.h.
double vector_sum | ( | const size_t | n, | |
vec_t & | data | |||
) | [inline] |
Compute the sum of the first n
elements of a vector.
If n
is zero, this will set avg
to zero and return gsl_success.
Definition at line 164 of file vec_stats.h.
double vector_variance | ( | const size_t | n, | |
vec_t & | data, | |||
double | mean | |||
) | [inline] |
Compute the variance of the first n
elements of a vector given the mean mean
.
If n
is zero, this will set avg
to zero and return gsl_success.
Definition at line 216 of file vec_stats.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page