33 #ifndef VEC_VEC_FUNCTIONS_H_
34 #define VEC_VEC_FUNCTIONS_H_
40 inline void VecAdd(
double a1, T &v1,
double a2,
const T &v2)
43 for(
size_t i=0; i<v1.size(); i++)
44 v1[i] = a1*v1[i] + a2*v2[i];
48 inline void VecAdd(
double a1, T &v1,
double a2,
const T &v2,
double a3,
const T &v3)
51 for(
size_t i=0; i<v1.size(); i++)
52 v1[i] = a1*v1[i] + a2*v2[i] + a3*v3[i];
56 inline void VecAdd(
double a1, T &v1,
double a2,
const T &v2,
double a3,
const T &v3,
double a4,
const T &v4)
59 for(
size_t i=0; i<v1.size(); i++)
60 v1[i] = a1*v1[i] + a2*v2[i] + a3*v3[i] + a4*v4[i];
68 for(
size_t i=0; i<v1.size(); i++)
77 for(
size_t i=0; i<v.size(); i++)
#define ASSERT_EQUAL(s1, s2)
Definition: error.h:185
#define ASSERT_EQUAL_4(s1, s2, s3, s4)
Definition: error.h:187
#define ASSERT_EQUAL_3(s1, s2, s3)
Definition: error.h:186
double VecNorm2(T &v)
Definition: vec_functions.h:74
double VecProd(T &v1, T &v2)
Definition: vec_functions.h:64
void VecAdd(double a1, T &v1, double a2, const T &v2)
Definition: vec_functions.h:40