CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Private Attributes

lhef::SimpleMatrix< T > Class Template Reference

#include <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)
double operator() (size_type row, size_type col) const
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< 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.

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

Definition at line 17 of file SimpleMatrix.h.

{}

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 lhef::SimpleMatrix< Delta >::index().

{ return index % width; }
template<typename T>
size_type lhef::SimpleMatrix< T >::cols ( ) const [inline]

Definition at line 20 of file SimpleMatrix.h.

{ return width; }
template<typename T>
size_type lhef::SimpleMatrix< T >::index ( size_type  row,
size_type  col 
) const [inline, protected]
template<typename T>
double& lhef::SimpleMatrix< T >::operator() ( size_type  row,
size_type  col 
) [inline]

Definition at line 23 of file SimpleMatrix.h.

        { return container[index(row, 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.

        { 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.

        { return container[index]; }
template<typename T>
double& lhef::SimpleMatrix< T >::operator[] ( size_type  index) [inline]

Definition at line 28 of file SimpleMatrix.h.

        { 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.

{ return index / width; }
template<typename T>
size_type lhef::SimpleMatrix< T >::rows ( ) const [inline]

Definition at line 19 of file SimpleMatrix.h.

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

{ return container.size(); }

Member Data Documentation

template<typename T>
std::vector<T> lhef::SimpleMatrix< T >::container [private]
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]