CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
tmtt::matrix< T > Class Template Reference

#include <HTbase.h>

Public Member Functions

 matrix (unsigned int m, unsigned int n)
 
Toperator() (unsigned int i, unsigned int j)
 
const Toperator() (unsigned int i, unsigned int j) const
 

Private Attributes

unsigned int _m
 
std::vector< T_matrix
 
unsigned int _n
 

Detailed Description

template<typename T>
class tmtt::matrix< T >

Definition at line 15 of file HTbase.h.

Constructor & Destructor Documentation

◆ matrix()

template<typename T>
tmtt::matrix< T >::matrix ( unsigned int  m,
unsigned int  n 
)
inline

Definition at line 18 of file HTbase.h.

18 : _n{n}, _m{m} { _matrix.resize(m * n); }

Member Function Documentation

◆ operator()() [1/2]

template<typename T>
T& tmtt::matrix< T >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

Definition at line 20 of file HTbase.h.

20  {
21  if (i >= _m || j >= _n)
22  throw std::out_of_range("matrix access out of bounds");
23 
24  return _matrix[i * _n + j];
25  }

◆ operator()() [2/2]

template<typename T>
const T& tmtt::matrix< T >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Definition at line 19 of file HTbase.h.

19 { return _matrix.at(i * _n + j); }

Member Data Documentation

◆ _m

template<typename T>
unsigned int tmtt::matrix< T >::_m
private

◆ _matrix

template<typename T>
std::vector<T> tmtt::matrix< T >::_matrix
private

◆ _n

template<typename T>
unsigned int tmtt::matrix< T >::_n
private
tmtt::matrix::_m
unsigned int _m
Definition: HTbase.h:29
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
tmtt::matrix::_n
unsigned int _n
Definition: HTbase.h:29
tmtt::matrix::_matrix
std::vector< T > _matrix
Definition: HTbase.h:28
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66