34 #ifndef __H__UG__SMALL_ALGEBRA__BLOCKS__
35 #define __H__UG__SMALL_ALGEBRA__BLOCKS__
41 inline double dabs(
double a) {
return a > 0 ? a : -a; }
44 template <
typename t>
struct block_traits;
45 template<
typename value_type,
typename vec_type>
struct block_multiply_traits;
50 template<
typename TYPE>
56 template<
typename TYPE>
66 template<
typename T>
inline double &
BlockRef(T &vec,
size_t i)
71 template<
typename T>
inline const double &
BlockRef(
const T &vec,
size_t i)
77 template<
typename T>
inline double &
BlockRef(T &mat,
size_t i,
size_t j)
82 template<
typename T>
inline const double &
BlockRef(
const T &mat,
size_t i,
size_t j)
119 template<
typename A,
typename B,
typename C>
inline void AssignMult(A &dest,
const B &b,
const C &vec);
121 template<
typename A,
typename B,
typename C>
inline void AddMult(A &dest,
const B &b,
const C &vec);
123 template<
typename A,
typename B,
typename C>
inline void SubMult(A &dest,
const B &b,
const C &vec);
132 inline void SetSize(T &t,
size_t a,
size_t b);
136 inline void SetSize(T &t,
size_t a);
140 inline size_t GetSize(
const T &t);
144 inline size_t GetRows(
const T &t);
148 inline size_t GetCols(
const T &t);
size_t GetCols(const T &t)
double dabs(double a)
Definition: blocks.h:41
void AssignMult(A &dest, const B &b, const C &vec)
void SubMult(A &dest, const B &b, const C &vec)
double & BlockRef(T &vec, size_t i)
Definition: blocks.h:66
void SetSize(T &t, size_t a, size_t b)
size_t GetRows(const T &t)
double BlockNorm2(const TYPE &v)
Definition: blocks.h:51
void AddMult(A &dest, const B &b, const C &vec)
size_t GetSize(const T &t)
double BlockNorm(const TYPE &v)
Definition: blocks.h:57