11 #ifndef __stir_numerics_MatrixFunction_H__ 12 #define __stir_numerics_MatrixFunction_H__ 42 template <
class elemT>
43 inline elemT
inner_product(
const Array<1, elemT>& v1,
const Array<1, elemT>& v2);
48 template <
class elemT>
49 inline double angle(
const Array<1, elemT>& v1,
const Array<1, elemT>& v2);
62 template <
class elemT>
63 inline Array<1, elemT>
matrix_multiply(
const Array<2, elemT>& m,
const Array<1, elemT>& vec);
69 template <
int dimension,
class elemT>
70 inline BasicCoordinate<dimension, elemT>
matrix_multiply(
const Array<2, elemT>& m,
const BasicCoordinate<dimension, elemT>& vec);
75 template <
class elemT>
76 inline Array<2, elemT>
matrix_multiply(
const Array<2, elemT>& m1,
const Array<2, elemT>& m2);
79 template <
class elemT>
96 template <
class elemT>
97 inline Array<2, elemT>
diagonal_matrix(
const unsigned dimension,
const elemT value);
114 template <
int dimension,
class elemT>
115 inline Array<2, elemT>
diagonal_matrix(
const BasicCoordinate<dimension, elemT>& values);
elemT inner_product(const Array< 1, elemT > &v1, const Array< 1, elemT > &v2)
Inner product of 2 1D arrays.
Definition: MatrixFunction.inl:39
Implementation of functions for matrices.
Array< 2, elemT > matrix_transpose(const Array< 2, elemT > &m)
matrix transposition
Definition: MatrixFunction.inl:160
defines the Array class for multi-dimensional (numeric) arrays
This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate obj...
Array< 2, elemT > matrix_multiply(const Array< 2, elemT > &m1, const Array< 2, elemT > &m2)
matrix multiplication
Definition: MatrixFunction.inl:125
double angle(const Array< 1, elemT > &v1, const Array< 1, elemT > &v2)
angle between 2 1D arrays
Definition: MatrixFunction.inl:65
Array< 2, elemT > diagonal_matrix(const BasicCoordinate< dimension, elemT > &values)
construct a diagonal matrix
Definition: MatrixFunction.inl:192