CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
btag::SimpleMatrix< T > Class Template Reference

#include <SimpleMatrix.h>

Public Types

typedef std::vector< T >::size_type size_type
 
typedef T value_type
 

Public Member Functions

size_type col (size_type index) const
 
size_type cols () const
 
double & operator() (size_type row, size_type col)
 
double operator() (size_type row, size_type col) const
 
double & operator[] (size_type index)
 
double operator[] (size_type index) const
 
size_type row (size_type index) const
 
size_type rows () const
 
 SimpleMatrix (size_type rows, size_type cols)
 
size_type size () const
 
 ~SimpleMatrix ()
 

Protected Member Functions

size_type index (size_type row, size_type col) const
 

Private Attributes

std::vector< Tcontainer
 
size_type height
 
size_type width
 

Detailed Description

template<typename T>
class btag::SimpleMatrix< T >

Definition at line 10 of file SimpleMatrix.h.

Member Typedef Documentation

template<typename T>
typedef std::vector<T>::size_type btag::SimpleMatrix< T >::size_type

Definition at line 13 of file SimpleMatrix.h.

template<typename T>
typedef T btag::SimpleMatrix< T >::value_type

Definition at line 12 of file SimpleMatrix.h.

Constructor & Destructor Documentation

template<typename T>
btag::SimpleMatrix< T >::SimpleMatrix ( size_type  rows,
size_type  cols 
)
inline

Definition at line 15 of file SimpleMatrix.h.

15  :
size_type rows() const
Definition: SimpleMatrix.h:20
std::vector< T > container
Definition: SimpleMatrix.h:43
size_type cols() const
Definition: SimpleMatrix.h:21
template<typename T>
btag::SimpleMatrix< T >::~SimpleMatrix ( )
inline

Definition at line 18 of file SimpleMatrix.h.

18 {}

Member Function Documentation

template<typename T>
size_type btag::SimpleMatrix< T >::col ( size_type  index) const
inline

Definition at line 35 of file SimpleMatrix.h.

Referenced by python.rootplot.root2matplotlib.Hist2D::colz(), and btag::SimpleMatrix< Delta >::index().

35 { return index % width; }
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
size_type btag::SimpleMatrix< T >::cols ( ) const
inline

Definition at line 21 of file SimpleMatrix.h.

21 { return width; }
template<typename T>
size_type btag::SimpleMatrix< T >::index ( size_type  row,
size_type  col 
) const
inlineprotected

Definition at line 38 of file SimpleMatrix.h.

Referenced by BeautifulSoup.PageElement::insert(), btag::SimpleMatrix< Delta >::operator()(), and btag::SimpleMatrix< Delta >::operator[]().

39  { return row * width + col; }
size_type col(size_type index) const
Definition: SimpleMatrix.h:35
size_type row(size_type index) const
Definition: SimpleMatrix.h:34
template<typename T>
double& btag::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
)
inline

Definition at line 24 of file SimpleMatrix.h.

25  { return container[index(row, col)]; }
size_type col(size_type index) const
Definition: SimpleMatrix.h:35
size_type row(size_type index) const
Definition: SimpleMatrix.h:34
std::vector< T > container
Definition: SimpleMatrix.h:43
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
double btag::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
) const
inline

Definition at line 26 of file SimpleMatrix.h.

27  { return container[index(row, col)]; }
size_type col(size_type index) const
Definition: SimpleMatrix.h:35
size_type row(size_type index) const
Definition: SimpleMatrix.h:34
std::vector< T > container
Definition: SimpleMatrix.h:43
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
double& btag::SimpleMatrix< T >::operator[] ( size_type  index)
inline

Definition at line 29 of file SimpleMatrix.h.

30  { return container[index]; }
std::vector< T > container
Definition: SimpleMatrix.h:43
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
double btag::SimpleMatrix< T >::operator[] ( size_type  index) const
inline

Definition at line 31 of file SimpleMatrix.h.

32  { return container[index]; }
std::vector< T > container
Definition: SimpleMatrix.h:43
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
size_type btag::SimpleMatrix< T >::row ( size_type  index) const
inline

Definition at line 34 of file SimpleMatrix.h.

34 { return index / width; }
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:38
template<typename T>
size_type btag::SimpleMatrix< T >::rows ( ) const
inline

Definition at line 20 of file SimpleMatrix.h.

20 { return height; }
template<typename T>
size_type btag::SimpleMatrix< T >::size ( void  ) const
inline

Member Data Documentation

template<typename T>
std::vector<T> btag::SimpleMatrix< T >::container
private
template<typename T>
size_type btag::SimpleMatrix< T >::height
private
template<typename T>
size_type btag::SimpleMatrix< T >::width
private