| ||||||
| ||||||
![]() | ||||||
Prototype | ||||||
template <class VecX, class VecY, class VecZ> void add(const VecX& x, const VecY& y, VecZ z) ; | ||||||
![]() | ||||||
Description | ||||||
Add the elements of x and y and assign into z. | ||||||
![]() | ||||||
Definition | ||||||
mtl.h | ||||||
![]() | ||||||
Requirements on types | ||||||
| ||||||
![]() | ||||||
Preconditions | ||||||
| ||||||
![]() | ||||||
Complexity | ||||||
linear time | ||||||
![]() | ||||||
Example | ||||||
In y_ax_y.cc:
typedef matrix< double, rectangle<>, dense<>, row_major>::type Matrix; Matrix A(3,3); double SCALE = - A(2,1) / A(1,1); add(scaled(A[0], SCALE), A[1], A[1]); More examples can be found in vecvec_add.cc | ||||||
![]() | ||||||
Notes | ||||||
![]() | ||||||
See also | ||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.