12 #ifndef __stir_numerics_norm_H__ 13 #define __stir_numerics_norm_H__ 27 #ifdef BOOST_NO_STDC_NAMESPACE 53 double operator()(T x)
const {
return static_cast<double>(x) * x; }
58 template <
typename elemT>
67 template <
typename elemT>
100 template <
class Iter>
101 inline double norm(Iter begin, Iter end);
108 template <
class elemT>
116 template <
class elemT>
double norm_squared(const Array< 1, elemT > &v1)
square of the l2 norm of a 1D array
Definition: norm.inl:65
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
double norm(const Array< 1, elemT > &v1)
l2 norm of a 1D array
Definition: norm.inl:58
Implementation of the stir::norm(), stir::norm_squared() functions and stir::NormSquared unary functi...
The 1-dimensional (partial) specialisation of Array.
Definition: Array.h:442
A helper class that computes the square of the norm of numeric data.
Definition: norm.h:51