| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

MatrixUtils.h File Reference

The collection of functions for manipulation with matrices and vectors. More...

#include <algorithm>
#include <functional>
#include <utility>
#include <cmath>
#include "Math/SMatrix.h"
#include "Math/SVector.h"
#include "Math/Point3D.h"
#include "Math/Vector4D.h"
#include "Math/Vector3D.h"

Include dependency graph for MatrixUtils.h:

Go to the source code of this file.


Namespaces

namespace  Gaudi
namespace  Gaudi::Math

Classes

struct  Gaudi::Math::_AbsCompare< T >
 The trivial structure for comparison of "numbers" by the absolute value. More...

Defines

#define LHCBMATH_MATRIXUTILS_H   1

Functions

template<class T, unsigned int D>
size_t Gaudi::Math::setToScalar (ROOT::Math::SVector< T, D > &m, const T &value=T())
 set all elements of vector equal to some scalar value
template<class T, unsigned int D1, unsigned int D2, class R>
size_t Gaudi::Math::setToScalar (ROOT::Math::SMatrix< T, D1, D2, R > &m, const T &value=T())
 set all elements of matrix equal to some scalar value
template<class T, unsigned int D, class R>
size_t Gaudi::Math::setToUnit (ROOT::Math::SMatrix< T, D, D, R > &m, const T &value=T(1))
 set square matrix to be proportional to unit matrix
template<class T, unsigned int D1, unsigned int D2, class R>
size_t Gaudi::Math::scale (ROOT::Math::SMatrix< T, D1, D2, R > &m, const T &value)
 efficient scale all elements of the matrix
template<class T, unsigned int D>
size_t Gaudi::Math::scale (ROOT::Math::SVector< T, D > &m, const T &value)
 efficient scale all elements of the vector
template<class T, unsigned int D1, unsigned int D2, class R>
Gaudi::Math::max_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find the maximal element in matrix
template<class T, unsigned int D1, unsigned int D2, class R>
Gaudi::Math::min_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find the minimal element in matrix
template<class T, unsigned int D>
Gaudi::Math::max_element (const ROOT::Math::SVector< T, D > &m)
 find the maximal element in vector
template<class T, unsigned int D>
Gaudi::Math::min_element (const ROOT::Math::SVector< T, D > &m)
 find the minimal element in vector
template<class T, unsigned int D1, unsigned int D2, class R>
Gaudi::Math::maxabs_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find the element in matrix with the maximal absolute value
template<class T, unsigned int D1, unsigned int D2, class R>
Gaudi::Math::minabs_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find the element in matrix with the minimal absolute value
template<class T, unsigned int D1, unsigned int D2, class R, class CMP>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_max_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m, CMP cmp)
 find an index of the maximal element in matrix
template<class T, unsigned int D, class CMP>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_max_element (const ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &m, CMP cmp)
 find an index of the maximal element in symmetric matrix
template<class T, unsigned int D1, unsigned int D2, class R>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_max_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find an index of the maximal element in matrix
template<class T, unsigned int D1, unsigned int D2, class R, class CMP>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_min_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m, CMP cmp)
 find an index of the minimal element in matrix
template<class T, unsigned int D, class CMP>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_min_element (const ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &m, CMP cmp)
 find an index of the minimal element in symmetric matrix
template<class T, unsigned int D1, unsigned int D2, class R>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_min_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find an index of the minimal element in the matrix
template<class T, unsigned int D, class CMP>
unsigned int Gaudi::Math::ind_max_element (const ROOT::Math::SVector< T, D > &m, CMP cmp)
 find an index of the maximal element in the vector
template<class T, unsigned int D, class CMP>
unsigned int Gaudi::Math::ind_min_element (const ROOT::Math::SVector< T, D > &m, CMP cmp)
 find an index of the minimal element in the vector
template<class T, unsigned int D>
unsigned int Gaudi::Math::ind_max_element (const ROOT::Math::SVector< T, D > &m)
 find an index of the maximal element in the vector
template<class T, unsigned int D>
unsigned int Gaudi::Math::ind_min_element (const ROOT::Math::SVector< T, D > &m)
 find an index of the minimal element in the vector
template<class T, unsigned int D1, unsigned int D2, class R>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_maxabs_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find an index of the element with the maximal absolute value
template<class T, unsigned int D1, unsigned int D2, class R>
std::pair< unsigned int, unsigned
int > 
Gaudi::Math::ind_minabs_element (const ROOT::Math::SMatrix< T, D1, D2, R > &m)
 find an index of the element with the minimal absolute value
template<class T, unsigned int D>
unsigned int Gaudi::Math::ind_maxabs_element (const ROOT::Math::SVector< T, D > &m)
 find an index of the element with maximal absolute value
template<class T, unsigned int D>
unsigned int Gaudi::Math::ind_minabs_element (const ROOT::Math::SVector< T, D > &m)
 find an index of the element with minimal absolute value
template<class T, unsigned int D, class R>
Gaudi::Math::trace (const ROOT::Math::SMatrix< T, D, D, R > &m)
 evaluate the trace (sum of diagonal elements) of the square matrix
template<class B, class T, unsigned int D, class R>
Gaudi::Math::trace (ROOT::Math::Expr< B, T, D, D, R > &m)
 evaluate the trace (sum of diagonal elements) of the square matrix
template<class T, unsigned int D, class R, class CMP>
Gaudi::Math::min_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m, CMP cmp)
 find the minimal diagonal element
template<class T, unsigned int D, class R, class CMP>
Gaudi::Math::max_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m, CMP cmp)
 find the maximal diagonal element
template<class T, unsigned int D, class R>
Gaudi::Math::max_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m)
 find the maximal diagonal element of square matrix
template<class T, unsigned int D, class R>
Gaudi::Math::min_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m)
 find the maximal diagonal element of the square matrix
template<class T, unsigned int D, class R>
Gaudi::Math::maxabs_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m)
 find the diagonal element of square matrix with maximal absolute value
template<class T, unsigned int D, class R>
Gaudi::Math::minabs_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m)
 find the diagonal element of the square matrix with the minimal absolute value
template<class T, unsigned int D1, unsigned int D2, class R, class P>
size_t Gaudi::Math::count_if (const ROOT::Math::SMatrix< T, D1, D2, R > &m, P pred)
 count the number of elements in matrix, which satisfy the certain criteria
template<class T, unsigned int D, class P>
size_t Gaudi::Math::count_if (const ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &m, P pred)
 count the number of elements in matrix, which satisfy the certain criteria
template<class T, unsigned int D, class R, class P>
size_t Gaudi::Math::count_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m, P pred)
 count number of diagonal elements in matrix, which satisfy certain criteria
template<class T, unsigned int D1, unsigned int D2, class R, class P>
bool Gaudi::Math::check_if (const ROOT::Math::SMatrix< T, D1, D2, R > &m, P pred)
 check the presence of at least one element which satisfy the criteria
template<class T, unsigned int D, class R, class P>
bool Gaudi::Math::check_diagonal (const ROOT::Math::SMatrix< T, D, D, R > &m, P pred)
 check the presence of at least one diagonal element which satisfy the criteria
template<class T1, class T2, unsigned int D1, unsigned int D2, class R1, class R2, class P>
bool Gaudi::Math::equal_if (const ROOT::Math::SMatrix< T1, D1, D2, R1 > &m1, const ROOT::Math::SMatrix< T2, D1, D2, R2 > &m2, P pred)
 check the "equality" of the two matrices by checking element-by-element: true == pred( m1(i,j) , m2(i,j) )
template<class T, unsigned int D1, unsigned int D2, class R, class P>
bool Gaudi::Math::equal_if (const ROOT::Math::SMatrix< T, D1, D2, R > &m1, const ROOT::Math::SMatrix< T, D1, D2, R > &m2, P pred)
 check the "equality" of the two matrices by checking element-by-element: true == pred( m1(i,j) , m2(i,j) )
template<class T, class T2, unsigned int D>
void Gaudi::Math::update (ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &left, const ROOT::Math::SVector< T2, D > &vect, const double scale)
 update the symmetric matrix according to the rule m += s*v*v^T
template<class T, class B, class T2, unsigned int D>
void Gaudi::Math::update (ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &left, const ROOT::Math::VecExpr< B, T2, D > &vect, const double scale)
 update the symmetric matrix according to the rule m += s*v*v^T
template<class T, class R, class T2, class T3, unsigned int D1, unsigned int D2>
void Gaudi::Math::update (ROOT::Math::SMatrix< T, D1, D2, R > &left, const ROOT::Math::SVector< T2, D1 > &vct1, const ROOT::Math::SVector< T3, D2 > &vct2, const double scale=1.0)
 update the matrix according to the rule m += s*v1*v2^T
template<class T, class T1, class T2, class R, unsigned int D1, unsigned int D2>
Gaudi::Math::mult (const ROOT::Math::SVector< T1, D1 > &vct1, const ROOT::Math::SMatrix< T, D1, D2, R > &mtrx, const ROOT::Math::SVector< T2, D2 > &vct2)
 useful shortcut for product of vector, matrix and vector (v1^T*M*v2)
template<class T, class T2, class R, unsigned int D>
void Gaudi::Math::update (ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &left, const ROOT::Math::SMatrix< T2, D, D, R > &right, const double scale=1.0)
 update the symmetric matrix according to the rule m += scale * ( m + m^T )
template<class T, class T2, class B, class R, unsigned int D>
void Gaudi::Math::update (ROOT::Math::SMatrix< T, D, D, ROOT::Math::MatRepSym< T, D > > &left, const ROOT::Math::Expr< B, T2, D, D, R > &right, const double scale=1.0)
 update the symmetric matrix according to the rule m += scale * ( m + m^T )

Detailed Description

The collection of functions for manipulation with matrices and vectors.

In particular it includes

Author:
Vanya BELYAEV Ivan.Belyaev@itep.ru

Definition in file MatrixUtils.h.


Define Documentation

#define LHCBMATH_MATRIXUTILS_H   1

Definition at line 4 of file MatrixUtils.h.

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:57 2011 for LHCbMath by doxygen 1.4.7