STIR 6.4.0
MatrixFunction.inl File Reference

Implementation of functions for matrices. More...

#include "stir/IndexRange2D.h"
#include <complex>
#include <cmath>

Go to the source code of this file.

Namespaces

namespace  stir
 Namespace for the STIR library (and some/most of its applications)
 
namespace  stir::detail
 Namespace for the implementation details of the STIR library.
 

Functions

template<class elemT>
std::complex< elemT > stir::inner_product (const Array< 1, std::complex< elemT > > &v1, const Array< 1, std::complex< elemT > > &v2)
 
template<class elemT, class vecT>
void stir::detail::matrix_multiply_help (vecT &retval, const Array< 2, elemT > &m, const vecT &vec)
 
template<int num_dimensions, class elemT>
BasicCoordinate< num_dimensions, elemT > stir::matrix_multiply (const Array< 2, elemT > &m, const BasicCoordinate< num_dimensions, elemT > &vec)
 
functions specific for 1D Arrays
template<class elemT>
elemT stir::inner_product (const Array< 1, elemT > &v1, const Array< 1, elemT > &v2)
 Inner product of 2 1D arrays.
 
template<class elemT>
double stir::angle (const Array< 1, elemT > &v1, const Array< 1, elemT > &v2)
 angle between 2 1D arrays
 
functions for matrices
template<class elemT>
Array< 1, elemT > stir::matrix_multiply (const Array< 2, elemT > &m, const Array< 1, elemT > &vec)
 matrix with vector multiplication
 
template<class elemT>
Array< 2, elemT > stir::matrix_multiply (const Array< 2, elemT > &m1, const Array< 2, elemT > &m2)
 matrix multiplication
 
template<class elemT>
Array< 2, elemT > stir::matrix_transpose (const Array< 2, elemT > &m)
 matrix transposition
 
template<class elemT>
Array< 2, elemT > stir::diagonal_matrix (const unsigned dimension, const elemT value)
 construct a diagonal matrix with all elements on the diagonal equal
 
template<int dimension, class elemT>
Array< 2, elemT > stir::diagonal_matrix (const BasicCoordinate< dimension, elemT > &values)
 construct a diagonal matrix
 

Detailed Description

Implementation of functions for matrices.

Author
Kris Thielemans
Sanida Mustafovic