| ||||||
| ||||||
![]() | ||||||
Prototype | ||||||
template <class Vector> linalg_traits<Vector>::magnitude_type two_norm(const Vector& x) ; | ||||||
![]() | ||||||
Description | ||||||
The square root of the sum of the squares of the elements of the container. | ||||||
![]() | ||||||
Definition | ||||||
mtl.h | ||||||
![]() | ||||||
Requirements on types | ||||||
![]() | ||||||
Preconditions | ||||||
| ||||||
![]() | ||||||
Complexity | ||||||
O(n) | ||||||
![]() | ||||||
Example | ||||||
In vec_two_norm.cc:
dense1D<double> x(10, 2.0); double s = two_norm(x); cout << s << endl; | ||||||
![]() | ||||||
Notes | ||||||
![]() | ||||||
See also | ||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.