Files
mlpack/fastlib/branches/fastlib-old/math/statistics.cc
T
Ryan Curtin f6864dd435 Move fastlib-old (originally 'fastlib') to fastlib/branches/fastlib-old where it
will sit until the end of time and nobody will touch it because it's old
2010-01-31 22:31:55 +00:00

23 lines
381 B
C++

// Copyright 2007 Georgia Institute of Technology. All rights reserved.
// ABSOLUTELY NOT FOR DISTRIBUTION
/**
* @file statistics.cc
*
* Implementation for statistics helpers.
*/
#include "statistics.h"
#include "math.h"
namespace math {
double Mean(Vector V) {
double c = 0.0;
index_t n = V.length();
for (index_t i=0; i<n; i++)
c = c + V[i];
return c/n;
}
};