9 #ifndef _utl_SMatrixSVector_h_
10 #define _utl_SMatrixSVector_h_
12 #include <boost/lambda/lambda.hpp>
14 #include <utl/SVector.h>
15 #include <utl/SMatrix.h>
23 template<
unsigned int n,
unsigned int m,
typename T,
typename U>
24 class plain_return_type_2<
25 arithmetic_action<multiply_action>,
26 utl::SMatrix<n, m, T>,
33 arithmetic_action<multiply_action>,
49 template<
unsigned int n,
unsigned int m,
typename T,
typename U>
51 typename boost::lambda::return_type_2<
52 boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
58 typedef typename boost::lambda::return_type_2<
59 boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
62 >::type VectorResultType;
66 for (
unsigned int i = 0; i < n; ++i) {
67 y[i] = a[i][0] * x[0];
68 for (
unsigned int j = 1; j <
m; ++j)
69 y[i] += a[i][j] * x[j];
76 template<
class Stream,
unsigned int n,
unsigned int m,
typename T>
78 operator<<(Stream& s, const SMatrix<n, m, T>&
a)
return_type_2< arithmetic_action< multiply_action >, T, U >::type res_type
Static (small and dense) vector class.
utl::SVector< n, res_type > type
Vector operator*(const double d, const Vector &v)
Static (small and dense) matrix class.