CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
lhef::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 lhef::SimpleMatrix< T >

Definition at line 9 of file SimpleMatrix.h.

Member Typedef Documentation

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

Definition at line 12 of file SimpleMatrix.h.

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

Definition at line 11 of file SimpleMatrix.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file SimpleMatrix.h.

14  :
std::vector< T > container
Definition: SimpleMatrix.h:42
size_type cols() const
Definition: SimpleMatrix.h:20
size_type rows() const
Definition: SimpleMatrix.h:19
template<typename T>
lhef::SimpleMatrix< T >::~SimpleMatrix ( )
inline

Definition at line 17 of file SimpleMatrix.h.

17 {}

Member Function Documentation

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

Definition at line 34 of file SimpleMatrix.h.

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

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

Definition at line 20 of file SimpleMatrix.h.

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

Definition at line 37 of file SimpleMatrix.h.

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

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

Definition at line 23 of file SimpleMatrix.h.

24  { return container[index(row, col)]; }
size_type col(size_type index) const
Definition: SimpleMatrix.h:34
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:37
std::vector< T > container
Definition: SimpleMatrix.h:42
size_type row(size_type index) const
Definition: SimpleMatrix.h:33
template<typename T>
double lhef::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
) const
inline

Definition at line 25 of file SimpleMatrix.h.

26  { return container[index(row, col)]; }
size_type col(size_type index) const
Definition: SimpleMatrix.h:34
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:37
std::vector< T > container
Definition: SimpleMatrix.h:42
size_type row(size_type index) const
Definition: SimpleMatrix.h:33
template<typename T>
double& lhef::SimpleMatrix< T >::operator[] ( size_type  index)
inline

Definition at line 28 of file SimpleMatrix.h.

29  { return container[index]; }
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:37
std::vector< T > container
Definition: SimpleMatrix.h:42
template<typename T>
double lhef::SimpleMatrix< T >::operator[] ( size_type  index) const
inline

Definition at line 30 of file SimpleMatrix.h.

31  { return container[index]; }
size_type index(size_type row, size_type col) const
Definition: SimpleMatrix.h:37
std::vector< T > container
Definition: SimpleMatrix.h:42
template<typename T>
size_type lhef::SimpleMatrix< T >::row ( size_type  index) const
inline

Definition at line 33 of file SimpleMatrix.h.

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

Definition at line 19 of file SimpleMatrix.h.

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

Definition at line 21 of file SimpleMatrix.h.

Referenced by lhef::Matching< Delta >::match().

21 { return container.size(); }
std::vector< T > container
Definition: SimpleMatrix.h:42

Member Data Documentation

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