next up previous contents
Next: double Analyze::tau (vector int Up: Member Function Documentation Previous: int Analyze::size_sample () const   Contents

template$ <$class T$ >$ T Analyze::sum (vector$ <$ T $ >$ V, const int choice)

Sum of T vector element.

We can calculate $ \sum_{i=1}^{size} elt $, or $ \sum_{i=1}^{size} elt^{2} $.

Parameters:

V
a T vector, where T is a generic type.
choice
an integer to specify the kind of sum to execute.


next up previous contents
Next: double Analyze::tau (vector int Up: Member Function Documentation Previous: int Analyze::size_sample () const   Contents
Florent Morata 2002-12-11