ug4
operations_vec.h File Reference
#include <stddef.h>
#include <cmath>

Go to the source code of this file.

Namespaces

 ug
 the ug namespace
 

Functions

template<typename vector_t >
void ug::VecAssign (vector_t &dest, const vector_t &v1)
 sets dest = v1 entrywise More...
 
void ug::VecExp (double &dest, const double &v)
 calculates elementwise exp More...
 
template<typename vector_t >
void ug::VecExp (vector_t &dest, const vector_t &v)
 
void ug::VecHadamardProd (double &dest, const double &v1, const double &v2)
 calculates s = a * b (the Hadamard product) More...
 
template<typename vector_t >
void ug::VecHadamardProd (vector_t &dest, const vector_t &v1, const vector_t &v2)
 
void ug::VecLog (double &dest, const double &v)
 calculates elementwise log (natural logarithm) More...
 
template<typename vector_t >
void ug::VecLog (vector_t &dest, const vector_t &v)
 
double ug::VecNormSquared (const double &a)
 returns norm_2^2(a) More...
 
template<typename vector_t >
double ug::VecNormSquared (const vector_t &a)
 returns norm_2^2(a) More...
 
void ug::VecNormSquaredAdd (const double &a, double &s)
 calculates s += norm_2^2(a) More...
 
template<typename vector_t >
void ug::VecNormSquaredAdd (const vector_t &a, double &sum)
 calculates s += norm_2^2(a) More...
 
double ug::VecProd (const double &a, const double &b)
 returns scal<a, b> More...
 
void ug::VecProd (const double &a, const double &b, double &s)
 computes scal<a, b> More...
 
template<typename vector_t >
double ug::VecProd (const vector_t &a, const vector_t &b)
 returns scal<a, b> More...
 
template<typename vector_t >
void ug::VecProd (const vector_t &a, const vector_t &b, double &sum)
 calculates s += scal<a, b> More...
 
void ug::VecProdAdd (const double &a, const double &b, double &s)
 calculates s += scal<a, b> More...
 
template<typename vector_t >
void ug::VecProdAdd (const vector_t &a, const vector_t &b, double &s)
 
void ug::VecScaleAdd (double &dest, double alpha1, const double &v1, double alpha2, const double &v2)
 calculates dest = alpha1*v1 + alpha2*v2. for doubles More...
 
void ug::VecScaleAdd (double &dest, double alpha1, const double &v1, double alpha2, const double &v2, double alpha3, const double &v3)
 calculates dest = alpha1*v1 + alpha2*v2 + alpha3*v3. for doubles More...
 
template<typename vector_t , template< class T > class TE_VEC>
void ug::VecScaleAdd (TE_VEC< vector_t > &dest, double alpha1, const TE_VEC< vector_t > &v1, double alpha2, const TE_VEC< vector_t > &v2)
 calculates dest = alpha1*v1 + alpha2*v2 More...
 
template<typename vector_t , template< class T > class TE_VEC>
void ug::VecScaleAdd (TE_VEC< vector_t > &dest, double alpha1, const TE_VEC< vector_t > &v1, double alpha2, const TE_VEC< vector_t > &v2, double alpha3, const TE_VEC< vector_t > &v3)
 calculates dest = alpha1*v1 + alpha2*v2 + alpha3*v3 More...
 
void ug::VecScaleAssign (double &dest, double alpha1, const double &v1)
 calculates dest = alpha1*v1. for doubles More...
 
template<typename vector_t >
void ug::VecScaleAssign (vector_t &dest, double alpha1, const vector_t &v1)
 calculates dest = alpha1*v1 More...