11 #ifndef __stir_assign_H__ 12 #define __stir_assign_H__ 47 template <
class T,
class T2>
49 assign(T& x,
const T2& y)
54 template <
class T,
class T2>
56 assign(std::vector<T>& v,
const T2& y)
58 for (
typename std::vector<T>::iterator iter = v.begin(); iter != v.end(); ++iter)
62 template <
int num_dimensions,
class T,
class T2>
64 assign(BasicCoordinate<num_dimensions, T>& v,
const T2& y)
66 for (
typename BasicCoordinate<num_dimensions, T>::iterator iter = v.begin(); iter != v.end(); ++iter)
70 template <
class T,
class T2>
72 assign(VectorWithOffset<T>& v,
const T2& y)
74 for (
typename VectorWithOffset<T>::iterator iter = v.begin(); iter != v.end(); ++iter)
81 template <
int num_dimensions,
class T,
class T2>
83 assign(Array<num_dimensions, T>& v,
const T2& y)
85 for (
typename Array<num_dimensions, T>::full_iterator iter = v.begin_all(); iter != v.end_all(); ++iter)
91 assign(
double& x,
const int y)
93 x =
static_cast<double>(y);
97 assign(
float& x,
const int y)
99 x =
static_cast<float>(y);
defines the Array class for multi-dimensional (numeric) arrays
This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate obj...
defines the stir::VectorWithOffset class