| ||||||
| ||||||
![]() | ||||||
Prototype | ||||||
template <class Matrix, class VecX, class VecY> void __mult_dim(const Matrix& A, const VecX& x, VecY y, oned_tag) ; | ||||||
![]() | ||||||
Description | ||||||
Multiplies matrix A times vector x and stores the result in vector y.
Note: ignore the oned_tag parameter and the underscores in the name of this function. | ||||||
![]() | ||||||
Definition | ||||||
mtl.h | ||||||
![]() | ||||||
Requirements on types | ||||||
![]() | ||||||
Preconditions | ||||||
| ||||||
![]() | ||||||
Complexity | ||||||
![]() | ||||||
Example | ||||||
In general_matvec_mult.cc:
typedef matrix< double, rectangle<2,2>, dense<external>, column_major>::type Matrix; typedef dense1D<double> Vector; double pi, theta; double dA[4]; Matrix rot(dA); Vector vec1(Matrix::N),vec2(Matrix::N); pi = 4.0 * atan (1.0); theta = pi / 2.0; rot(0,0) = cos(theta); rot(1,0) = sin(theta); rot(0,1) = -sin(theta); rot(1,1) = cos(theta); vec1[0] = 3.0; vec1[1] = 4.0; mult(rot, scaled(vec1, 0.5), vec2); More examples can be found in banded_matvec_mult.cc, symm_matvec_mult.ccsymm_matvec_mult.cc | ||||||
![]() | ||||||
Notes | ||||||
![]() | ||||||
See also | ||||||
Copyright ©
1998,1999 University of Notre Dame. All Rights Reserved.