MDA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Types | Public Member Functions | List of all members
MDAT::Matrix1Line< DataType > Class Template Reference

A simple class to produce 2 dimensional matrices. More...

#include <Matrix1Line.hpp>

Public Types

typedef DataType value_type
 

Public Member Functions

 Matrix1Line (size_t dim1, size_t dim2)
 Constructor setting the size. More...
 
 Matrix1Line (size_t dim1, size_t dim2, DataType init)
 Constructor allowing initialization of fields. More...
 
virtual ~Matrix1Line ()
 Destructor.
 
DataType * operator[] (unsigned int index)
 Access operator. More...
 
DataType * operator[] (unsigned int index) const
 Access operator. More...
 
std::vector< DataType >::iterator begin (size_t id)
 
std::vector< DataType >::iterator end (size_t id)
 
void resize (size_t dim_1, size_t dim_2)
 Resizes the matrix to the new dimensions. More...
 
size_t dim1 () const
 Returns the size of the first dimension. More...
 
size_t size () const
 
size_t dim2 () const
 Returns the size of the second dimension. More...
 
void fill (const DataType &value)
 

Detailed Description

template<typename DataType>
class MDAT::Matrix1Line< DataType >

A simple class to produce 2 dimensional matrices.

Constructor & Destructor Documentation

template<typename DataType >
MDAT::Matrix1Line< DataType >::Matrix1Line ( size_t  dim1,
size_t  dim2 
)

Constructor setting the size.

Parameters
dim1Size of the first dimension.
dim2Size of the second dimension.
template<typename DataType >
MDAT::Matrix1Line< DataType >::Matrix1Line ( size_t  dim1,
size_t  dim2,
DataType  init 
)

Constructor allowing initialization of fields.

Parameters
dim1Size of the first dimension.
dim2Size of the second dimension.
initValue to initalize the fields with.

Member Function Documentation

template<typename DataType>
size_t MDAT::Matrix1Line< DataType >::dim1 ( ) const
inline

Returns the size of the first dimension.

Returns
The size of the first dimension.
template<typename DataType>
size_t MDAT::Matrix1Line< DataType >::dim2 ( ) const
inline

Returns the size of the second dimension.

Returns
The size of the second dimension.
template<typename DataType>
DataType* MDAT::Matrix1Line< DataType >::operator[] ( unsigned int  index)
inline

Access operator.

Parameters
indexThe index to acess.
Returns
Reference to the field.
template<typename DataType>
DataType* MDAT::Matrix1Line< DataType >::operator[] ( unsigned int  index) const
inline

Access operator.

Parameters
indexThe index to acess.
Returns
Reference to the field.
template<typename DataType>
void MDAT::Matrix1Line< DataType >::resize ( size_t  dim_1,
size_t  dim_2 
)
inline

Resizes the matrix to the new dimensions.

Parameters
dim_1The first dimension
dim_2The second diemension