Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

template<class C>
VectorTem<C> Impala::Core::Matrix::operator * ( const MatrixTem< C > &  a,
const VectorTem< C > &  b 
) [inline]

Definition at line 417 of file MatrixTem.h.

References Impala::Core::Matrix::MatrixTem< C >::nCol(), Impala::Core::Matrix::MatrixTem< C >::nRow(), and Impala::Core::Vector::VectorTem< ElemT >::Size().

00418 {
00419     if (b.Size() != a.nCol()) {
00420         std::cerr << "nonconformant MatrixTem * VectorTem<C> operands." << std::endl;
00421         return VectorTem<C>(0);
00422     }
00423     VectorTem<C> v(a.nRow());
00424     double sum;
00425     int i, j;
00426     for (i=0 ; i<a.nRow() ; i++) {
00427         sum = 0;
00428         for (j=0 ; j<a.nCol() ; j++)
00429             sum += a[i][j] * b[j];
00430         v[i] = sum;
00431     }
00432     return v;
00433 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:15 2011 for ImpalaSrc by  doxygen 1.5.1