#include <statfunc.h>
| Public Member Functions | |
| template<class I> | |
| T | operator() (Subscript nelem, I begin) | 
| Compute sample mean from data pointed to by begin. | |
| T | A floating point type. | 
Definition at line 121 of file statfunc.h.
| T SCPPNT::Mean< T >::operator() | ( | Subscript | nelem, | |
| I | begin | |||
| ) |  [inline] | 
Compute sample mean from data pointed to by begin.
| I | An iterator type pointing to values for which the mean is computed. | |
| nelem | Number of values used to compute mean. | |
| begin | Iterator to values used to compute mean. | 
Definition at line 134 of file statfunc.h.
00135 { 00136 T n = nelem; 00137 T sum = 0; 00138 00139 while (nelem--) 00140 { 00141 sum += *begin; 00142 ++begin; 00143 } 00144 00145 return sum / n; 00146 }
 1.5.4
 1.5.4