33 #ifndef __H__UG__COMMON__DENSEMATRIX_OPERATIONS_H__
34 #define __H__UG__COMMON__DENSEMATRIX_OPERATIONS_H__
39 #include "../../common/operations.h"
47 struct matrix_algebra_type_traits;
56 template<
typename vector_t,
typename matrix_t>
60 for(
size_t r = 0; r < dest.size(); ++r)
62 MatMult(dest[r], beta1, A1(r,0), w1[0]);
63 for(
size_t c = 1; c < w1.size(); ++c)
64 MatMultAdd(dest[r], 1.0, dest[r], beta1, A1(r,c), w1[c]);
69 template<
typename vector_t,
typename matrix_t>
74 for(
size_t r = 0; r < dest.size(); ++r)
77 for(
size_t c = 0; c < w1.size(); ++c)
78 MatMultAdd(dest[r], 1.0, dest[r], beta1, A1(r,c), w1[c]);
83 template<
typename vector_t,
typename matrix_t>
88 for(
size_t r = 0; r < dest.size(); ++r)
91 for(
size_t c = 0; c < w1.size(); ++c)
Definition: densematrix.h:57
Definition: densevector.h:101
double number
Definition: types.h:124
bool MatMultTransposedAdd(vector_t &dest, const number &alpha1, const vector_t &v1, const number &beta1, const matrix_t &A1, const vector_t &w1)
calculates dest = alpha1*v1 + beta1 * A1 *w1;
Definition: operations_mat.h:121
@ MATRIX_USE_GLOBAL_FUNCTIONS
Definition: matrix_algebra_types.h:69
bool MatMultAdd(vector_t &dest, const number &alpha1, const vector_t &v1, const number &beta1, const matrix_t &A1, const vector_t &w1)
calculates dest = alpha1*v1 + beta1 * A1 *w1;
Definition: operations_mat.h:68
bool MatMult(vector_t &dest, const number &beta1, const matrix_t &A1, const vector_t &w1)
calculates dest = beta1 * A1;
Definition: operations_mat.h:59
void VecScaleAssign(double &dest, double alpha1, const double &v1)
calculates dest = alpha1*v1. for doubles
Definition: operations_vec.h:49
Definition: matrix_algebra_types.h:79
static const int type
Definition: matrix_algebra_types.h:80