SCPPNT::Sum< T > Class Template Reference

Compute the sum of a sequence of values. More...

#include <statfunc.h>

List of all members.

Public Member Functions

template<class I>
operator() (Subscript nelem, I begin)
 Compute sum from data pointed to by begin.


Detailed Description

template<class T>
class SCPPNT::Sum< T >

Compute the sum of a sequence of values.

Parameters:
T A floating point type.

Definition at line 88 of file statfunc.h.


Member Function Documentation

template<class T>
template<class I>
T SCPPNT::Sum< T >::operator() ( Subscript  nelem,
begin 
) [inline]

Compute sum from data pointed to by begin.

Parameters:
I An iterator type pointing to values for which the sum is computed.
nelem Number of values used to compute sum.
begin Iterator to values used to compute sum.

Definition at line 101 of file statfunc.h.

00102     {
00103       T sum = 0;
00104 
00105       while (nelem--)
00106       {
00107         sum += *begin;
00108         ++begin;
00109       }
00110 
00111       return sum;
00112     }


The documentation for this class was generated from the following file:
Generated on Tue Dec 18 23:34:48 2007 for SCPPNT by  doxygen 1.5.4