simple_dense::simple_matrix< T > Class Template Reference

Class definition of simple_matrix<T>: a simple implementation of column major dense matrices. Supports arbitrary leading dimension size. More...

#include <simple_matrix.hpp>

Collaboration diagram for simple_dense::simple_matrix< T >:

[legend]
List of all members.

Public Member Functions

 simple_matrix ()
 Default constructor. Simple initialization.
 simple_matrix (index_t nrows, index_t ncols, index_t ld=0)
T & operator() (index_t row, index_t col)
operator() (index_t row, index_t col) const
const_data_iterator getElmIterator (index_t row, index_t col) const
 Get pointer (iterator) to element, const version.
data_iterator getElmIterator (index_t row, index_t col)
 Get pointer (iterator) to element.
index_t numRows () const
 Get number of rows.
index_t numCols () const
 Get number of columns.
index_t getLd () const
 Get leading dimension size.
void resize (index_t nrows, index_t ncols, index_t ld=0)
void fill (const T value)
 Fill matrix with a value.
simple_matrix< T > & operator= (const T value)
 Assignment operator that fills with value.
simple_matrix< T > & operator *= (const T factor)
 Multiply by constant.
simple_matrix< T > & operator() (range rows, range cols)
 Obtain a sub-block by setting active ranges.
simple_matrix< T > & operator= (const simple_matrix< T > &src)
 Copy constructor.
simple_matrix< T > & operator= (simple_matrix< T > &src)
 Copy from simple_matrix<T>.
void fillColumn (index_t k, const_data_iterator src)
 Fill column with data k Column number src Data source.
void fillColumnSection (index_t k, const_data_iterator src, index_t n)
 Fill column section with data k Column number src Data source.
void fillDataSection (data_iterator dest, const_data_iterator src, index_t n)
 Fill section of data data k Column number src Data source.

Detailed Description

template<class T>
class simple_dense::simple_matrix< T >

Class definition of simple_matrix<T>: a simple implementation of column major dense matrices. Supports arbitrary leading dimension size.


Constructor & Destructor Documentation

template<class T>
simple_dense::simple_matrix< T >::simple_matrix ( index_t  nrows,
index_t  ncols,
index_t  ld = 0 
) [inline]

Constructor that allocates memory for matrix.

Parameters:
nrows Number of rows in matrix
ncols Number of columns in matrix
ld Leading dimension size. Default is equivalent to using ld = nrows. Must be >= nrows.

Here is the call graph for this function:


Member Function Documentation

template<class T>
void simple_dense::simple_matrix< T >::fill ( const T  value  )  [inline]

Fill matrix with a value.

Parameters:
value Value to fill with

template<class T>
data_iterator simple_dense::simple_matrix< T >::getElmIterator ( index_t  row,
index_t  col 
) [inline]

Get pointer (iterator) to element.

Parameters:
row row number
col column number

template<class T>
const_data_iterator simple_dense::simple_matrix< T >::getElmIterator ( index_t  row,
index_t  col 
) const [inline]

Get pointer (iterator) to element, const version.

Parameters:
row row number
col column number

template<class T>
simple_matrix<T>& simple_dense::simple_matrix< T >::operator *= ( const T  factor  )  [inline]

Multiply by constant.

Note:
Block version not implemented yet.
Parameters:
factor factor to multiply with

Here is the call graph for this function:

template<class T>
T simple_dense::simple_matrix< T >::operator() ( index_t  row,
index_t  col 
) const [inline]

Element access, const version

Parameters:
row The row
col The column

Here is the call graph for this function:

template<class T>
T& simple_dense::simple_matrix< T >::operator() ( index_t  row,
index_t  col 
) [inline]

Element access.

Parameters:
row The row
col The column

Here is the call graph for this function:

template<class T>
simple_matrix<T>& simple_dense::simple_matrix< T >::operator= ( simple_matrix< T > &  src  )  [inline]

Copy from simple_matrix<T>.

Parameters:
src Matrix to copy

Here is the call graph for this function:

template<class T>
simple_matrix<T>& simple_dense::simple_matrix< T >::operator= ( const T  value  )  [inline]

Assignment operator that fills with value.

Parameters:
value Value to fill with

Here is the call graph for this function:

template<class T>
void simple_dense::simple_matrix< T >::resize ( index_t  nrows,
index_t  ncols,
index_t  ld = 0 
) [inline]

Resize matrix

Parameters:
nrows Number of rows in matrix
ncols Number of columns in matrix
ld Leading dimension. Default is = nrows. Must be >= nrows.


The documentation for this class was generated from the following file:
Generated on Wed Jun 17 11:44:03 2009 for OpenFCI by  doxygen 1.4.7