| ||||||
| ||||||
![]() | ||||||
Prototype | ||||||
template <class LinalgObj, class T> void scale(LinalgObj A, const T& alpha) ; | ||||||
![]() | ||||||
Description | ||||||
Multiply all the elements in A (or x) by alpha. | ||||||
![]() | ||||||
Definition | ||||||
mtl.h | ||||||
![]() | ||||||
Requirements on types | ||||||
![]() | ||||||
Preconditions | ||||||
| ||||||
![]() | ||||||
Complexity | ||||||
O(n) | ||||||
![]() | ||||||
Example | ||||||
In vec_scale_algo.cc:
mtl::dense1D< double > x(10, 2.0); mtl::scale(x, 2.0); mtl::print_vector(x); | ||||||
![]() | ||||||
Notes | ||||||
![]() | ||||||
See also | ||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.