3 #include <boost/numeric/mtl/operation/two_norm.hpp> 5 #include <amdis/linearalgebra/mtl/MatrixBackend.hpp> 6 #include <amdis/linearalgebra/mtl/VectorBackend.hpp> 11 template <
class T1,
class T2,
class T3>
12 auto residuum(MTLSparseMatrix<T1>
const& A, MTLVector<T2>
const& x, MTLVector<T3>
const& b)
15 r -= A.matrix() * x.vector();
20 template <
class T1,
class T2,
class T3>
21 auto relResiduum(MTLSparseMatrix<T1>
const& A, MTLVector<T2>
const& x, MTLVector<T3>
const& b)
23 return residuum(A,x,b) / two_norm(b.vector());
Definition: AdaptBase.hpp:6