CMS 3D CMS Logo

lhef::SimpleMatrix< T > Class Template Reference

#include <GeneratorInterface/LHEInterface/src/SimpleMatrix.h>

List of all members.

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) const
double & operator() (size_type row, size_type col)
double operator[] (size_type index) const
double & operator[] (size_type index)
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< T > container
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.

00014                                                      :
00015                 width(cols), height(rows), container(rows * cols) {}

template<typename T>
lhef::SimpleMatrix< T >::~SimpleMatrix (  )  [inline]

Definition at line 17 of file SimpleMatrix.h.

00017 {}


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.

00034 { return index % width; }

template<typename T>
size_type lhef::SimpleMatrix< T >::cols (  )  const [inline]

Definition at line 20 of file SimpleMatrix.h.

00020 { return width; }

template<typename T>
size_type lhef::SimpleMatrix< T >::index ( size_type  row,
size_type  col 
) const [inline, protected]

Definition at line 37 of file SimpleMatrix.h.

Referenced by lhef::SimpleMatrix< Delta >::operator()().

00038         { return row * width + col; }

template<typename T>
double lhef::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
) const [inline]

Definition at line 25 of file SimpleMatrix.h.

00026         { return container[index(row, col)]; }

template<typename T>
double& lhef::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
) [inline]

Definition at line 23 of file SimpleMatrix.h.

00024         { return container[index(row, col)]; }

template<typename T>
double lhef::SimpleMatrix< T >::operator[] ( size_type  index  )  const [inline]

Definition at line 30 of file SimpleMatrix.h.

00031         { return container[index]; }

template<typename T>
double& lhef::SimpleMatrix< T >::operator[] ( size_type  index  )  [inline]

Definition at line 28 of file SimpleMatrix.h.

00029         { return container[index]; }

template<typename T>
size_type lhef::SimpleMatrix< T >::row ( size_type  index  )  const [inline]

Definition at line 33 of file SimpleMatrix.h.

00033 { return index / width; }

template<typename T>
size_type lhef::SimpleMatrix< T >::rows (  )  const [inline]

Definition at line 19 of file SimpleMatrix.h.

00019 { 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().

00021 { return container.size(); }


Member Data Documentation

template<typename T>
std::vector<T> lhef::SimpleMatrix< T >::container [private]

Definition at line 42 of file SimpleMatrix.h.

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

template<typename T>
size_type lhef::SimpleMatrix< T >::height [private]

Definition at line 41 of file SimpleMatrix.h.

Referenced by lhef::SimpleMatrix< Delta >::rows().

template<typename T>
size_type lhef::SimpleMatrix< T >::width [private]

Definition at line 41 of file SimpleMatrix.h.

Referenced by lhef::SimpleMatrix< Delta >::col(), lhef::SimpleMatrix< Delta >::cols(), lhef::SimpleMatrix< Delta >::index(), and lhef::SimpleMatrix< Delta >::row().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:53 2009 for CMSSW by  doxygen 1.5.4