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; }
58template <
typename elemT>
67template <
typename elemT>
101inline double norm(Iter begin, Iter end);
108template <
class elemT>
109inline double norm(
const Array<1, elemT>& v1);
116template <
class elemT>
forward declaration of stir::Array class for multi-dimensional (numeric) arrays
double norm(const BasicCoordinate< num_dimensions, coordT > &p1)
compute sqrt(inner_product(p1,p1))
Definition BasicCoordinate.inl:426
double norm_squared(const BasicCoordinate< num_dimensions, coordT > &p1)
compute (inner_product(p1,p1))
Definition BasicCoordinate.inl:415
Implementation of the stir::norm(), stir::norm_squared() functions and stir::NormSquared unary functi...
A helper class that computes the square of the norm of numeric data.
Definition norm.h:52