34 #ifndef __H__UG__LIB_ALGEBRA__OPERATIONS_TRANSFORM__
35 #define __H__UG__LIB_ALGEBRA__OPERATIONS_TRANSFORM__
50 template<
typename vector_t,
typename matrix_t,
typename vector_t2>
53 double alpha3,
const vector_t2 &v3)
59 template<
typename vector_t,
typename matrix_t,
typename vector_t2,
typename vector_t3>
61 double alpha2,
const vector_t2 &v2,
62 double alpha3,
const vector_t3 &v3)
71 template<
typename vector_t,
typename T0,
typename matrix_t,
typename vector_t2>
73 double alpha0,
const T0 &t0,
74 double alpha1,
const vector_t2 &v1,
85 template<
typename vector_t,
typename matrix_t,
typename vector_t2,
typename T3>
87 double alpha1,
const vector_t2 &v1,
89 double alpha3,
const T3 &t3)
95 template<
typename vector_t,
typename vector_t1,
typename vector_t2,
typename vector_t3>
97 double alpha1,
const vector_t1 &v1,
98 double alpha2,
const vector_t2 &v2,
99 double alpha3,
const vector_t3 &v3)
111 template<
typename vector_t,
typename matrix_t>
120 template<
typename vector_t,
typename matrix_t,
typename vector_t2>
127 template<
typename vector_t,
typename matrix_t>
134 template<
typename vector_t,
typename vector_t2,
typename vector_t3>
135 inline void VectorAssign(vector_t &dest,
double alpha1,
const vector_t2 &v1,
double alpha2,
const vector_t3 &v2)
147 template<
typename vector_t,
typename matrix_t>
155 template<
typename vector_t,
typename vector_t2,
typename vector_t3>
165 template<
typename vector_t,
typename T1,
typename operation,
typename T2,
typename T3>
168 VectorAssign(dest, alpha1, t1.
cast().l, operation::is_add() ? alpha1 : -alpha1, t1.
cast().r, alpha2, t2);
171 template<
typename vector_t,
typename T1,
typename T2,
typename operation,
typename T3>
174 VectorAssign(dest, alpha1, t1, alpha2, t2.
l, operation::is_add() ? alpha2 : -alpha2, t2.
r);
177 template<
typename vector_t,
typename T1,
typename operation,
typename T2>
180 VectorAssign(dest, 1.0, t.
l, operation::is_add() ? 1.0 : -1.0, t.
r);
186 template<
typename vector_t,
typename T1>
189 VectorAssign<vector_t, T1, vector_t>(dest, 1.0, t1, 1.0, dest);
193 template<
typename vector_t,
typename T1>
Definition: template_expressions.h:178
const R & r
Definition: template_expressions.h:181
const L & l
Definition: template_expressions.h:180
Definition: template_expressions.h:152
const R & r
Definition: template_expressions.h:156
const L & l
Definition: template_expressions.h:155
double alpha
Definition: template_expressions.h:154
const A & cast() const
cast this class down to original class A.
Definition: template_expressions.h:94
void VecScaleAdd(vector_t &vOut, typename vector_t::value_type s1, const vector_t &v1, typename vector_t::value_type s2, const vector_t &v2)
Scales two Vectors, adds them and returns the sum in a third vector.
Definition: math_vector_functions_common_impl.hpp:265
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
void VectorAdd(vector_t &dest, const T1 &t1)
transforms x += X1 into x = (1.0)*X1 + (1.0)*x
Definition: operations_transform.h:187
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 VectorSub(vector_t &dest, const T1 &t1)
transforms x -= X1 into x = (-1.0)*X1 + (1.0)*x
Definition: operations_transform.h:194
const T & getVector(const T &t)
Definition: template_expressions.h:123
double getScaling(const T &t)
Definition: template_expressions.h:117
void VectorAssign(vector_t &dest, double alpha1, const MatVec_Expression< matrix_t, vector_t > &m1, double alpha2, const MatVec_Expression< matrix_t, vector_t > &m2, double alpha3, const vector_t2 &v3)
v = Mv + Mv + v
Definition: operations_transform.h:51
void VecScaleAssign(double &dest, double alpha1, const double &v1)
calculates dest = alpha1*v1. for doubles
Definition: operations_vec.h:49