NAME
get_vector_mean - Computes the average of the elements of a vector
SYNOPSIS
#include "m/m_vec_stat.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_vector_mean
(
const Vector *vp,
double *result_ptr
);
DESCRIPTION
This routine calculates the average of the elements of a vector and puts the
result into (*result_ptr). If result_ptr is NULL, this routine does nothing.
If vp is NULL, or vp has zero length, then ERROR is returned, with an error
message being set. (This may change as more sophisticated handling of missing
values is implemented), The routine average_vector_elements() can be used to
for different behaviour in these circumstances.
NOTE
This routine has been changed recently. The previous behaviour is
availabe from the routine average_vector_elements().
Returns :
The sum of the elements of a vector.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
get_vector_mean_square
,
ow_square_vector_elements