Exemple #1
0
 const matrix<T,D,A>
 operator * ( const std::valarray<T_>& lhs, const matrix<T,D,A>& rhs )
 {
     assert( rhs.row() == lhs.size() );
     matrix<T,D,A> ans(1, lhs.row());
     for ( std::size_t i = 0; i < rhs.col(); ++i )
         ans[0][i] = std::inner_product( std::begin(lhs), std::begin(lhs)+rhs.row(), rhs.col_begin(i), T() );
     return ans;
 }