STIR  6.2.0
Namespaces | Functions

Implementations for ArrayFunction.h. More...

#include "stir/BasicCoordinate.h"
#include "stir/array_index_functions.h"
#include "stir/modulo.h"
#include <cmath>
#include <complex>

Namespaces

 stir
 Namespace for the STIR library (and some/most of its applications)
 

Functions

template<class elemT >
Array< 1, elemT > & stir::in_place_log (Array< 1, elemT > &v)
 Replace elements by their logarithm, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_log (Array< num_dimensions, elemT > &v)
 apply log to each element of the multi-dimensional array More...
 
template<class elemT >
Array< 1, elemT > & stir::in_place_exp (Array< 1, elemT > &v)
 Replace elements by their exponentiation, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_exp (Array< num_dimensions, elemT > &v)
 apply exp to each element of the multi-dimensional array More...
 
template<class elemT >
Array< 1, elemT > & stir::in_place_abs (Array< 1, elemT > &v)
 Replace elements by their absolute value, 1D version. More...
 
template<int num_dimensions, class elemT >
Array< num_dimensions, elemT > & stir::in_place_abs (Array< num_dimensions, elemT > &v)
 store absolute value of each element of the multi-dimensional array More...
 
template<class T , class FUNCTION >
T & stir::in_place_apply_function (T &v, FUNCTION f)
 apply any function(object) to each element of the multi-dimensional array More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtr >
void stir::in_place_apply_array_function_on_1st_index (Array< num_dim, elemT > &array, FunctionObjectPtr f)
 Apply a function object on all possible 1d arrays extracted by keeping all indices fixed, except the first one. More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtr >
void stir::apply_array_function_on_1st_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, FunctionObjectPtr f)
 apply any function(object) to each element of the multi-dimensional array, storing results in a different array More...
 
template<int num_dim, typename elemT , typename FunctionObjectPtrIter >
void stir::in_place_apply_array_functions_on_each_index (Array< num_dim, elemT > &array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects on every dimension of the input array. More...
 
template<typename elemT , typename FunctionObjectPtrIter >
void stir::in_place_apply_array_functions_on_each_index (Array< 1, elemT > &array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 1d specialisation of the above.
 
template<int num_dim, typename elemT , typename FunctionObjectPtrIter >
void stir::apply_array_functions_on_each_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects on every dimension of the input array, store in output array. More...
 
template<int num_dim, typename elemT >
void stir::apply_array_functions_on_each_index (Array< num_dim, elemT > &out_array, const Array< num_dim, elemT > &in_array, ActualFunctionObjectPtrIter start, ActualFunctionObjectPtrIter stop)
 Apply a sequence of 1d array-function objects of a specific type on every dimension of the input array, store in output array. More...
 
template<typename elemT >
void stir::apply_array_functions_on_each_index (Array< 1, elemT > &out_array, const Array< 1, elemT > &in_array, ActualFunctionObjectPtrIter start, ActualFunctionObjectPtrIter stop)
 1d specialisation of above
 
template<typename elemT , typename FunctionObjectPtrIter >
void stir::apply_array_functions_on_each_index (Array< 1, elemT > &out_array, const Array< 1, elemT > &in_array, FunctionObjectPtrIter start, FunctionObjectPtrIter stop)
 1d specialisation for general function objects
 
template<int num_dimensions, typename elemT >
void stir::transform_array_to_periodic_indices (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array)
 
template<int num_dimensions, typename elemT >
void stir::transform_array_from_periodic_indices (Array< num_dimensions, elemT > &out_array, const Array< num_dimensions, elemT > &in_array)
 

Detailed Description

Implementations for ArrayFunction.h.

Author
Kris Thielemans (some functions based on some earlier work by Darren Hague)
PARAPET project
Warning
Compilers without partial specialisation of templates are catered for by explicit instantiations. If you need it for any other types, you'd have to add them by hand.