| ||||||
| ||||||
| Prototype | ||||||
|
template <class Vector> linalg_traits<Vector>::value_type sum(const Vector& x) ; | ||||||
| Description | ||||||
| The sum of all of the elements in the container. | ||||||
| Definition | ||||||
| mtl.h | ||||||
| Requirements on types | ||||||
| ||||||
| Preconditions | ||||||
|
| ||||||
| Complexity | ||||||
| linear | ||||||
| Example | ||||||
In vec_sum.cc:
mtl::dense1D< double > x(10, 2.0); double s = mtl::sum(x); cout << s << endl; | ||||||
| Notes | ||||||
| See also | ||||||

Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.