Public Member Functions

SparseMatrix< T > Class Template Reference

Object for storing nonzero entries of a sparse matrix. More...

#include <SparseMatrix.h>

List of all members.

Public Member Functions

 SparseMatrix (int rows, int cols)
 SparseMatrix (int *nzRows, int *nzCols, T *nz, int rows, int cols, int nnz)
int *  getRows ()
int *  getCols ()
int  getRowCount ()
int  getColCount ()
int  getNNz ()
T *  getVals ()

Detailed Description

template<class T>
class SparseMatrix< T >

Object for storing nonzero entries of a sparse matrix.


Constructor & Destructor Documentation

template<class T >
SparseMatrix< T >::SparseMatrix ( int   rows,
int   cols  
)
Parameters:
[in]rowsnumber of rows in matrix
[in]colsnumber of columns in matrix
template<class T>
SparseMatrix< T >::SparseMatrix ( int *   nzRows,
int *   nzCols,
T *   nz,
int   rows,
int   cols,
int   nnz  
)
Parameters:
[in]nzRowsvector of row indices of nonzeros
[in]nzColsvector of column indices of nonzeros
[in]nzvector of values of nonzeros
[in]rowstotal number of rows
[in]colstotal number of columns
[in]nnztotal number of nonzero entries

Member Function Documentation

template<class T >
int SparseMatrix< T >::getColCount (  )

returns the total number of columns in matrix

Returns:
the total number of columns in matrix
template<class T >
int * SparseMatrix< T >::getCols (  )

return vector of column indices of nonzeros

Returns:
vector of column indices of nonzeros
template<class T >
int SparseMatrix< T >::getNNz (  )

returns the total number of nonzero elements in matrix

Returns:
the total number of nonzero elements in matrix
template<class T >
int SparseMatrix< T >::getRowCount (  )

returns the total number of rows in matrix (size)

Returns:
the total number of rows in matrix (size)
template<class T >
int * SparseMatrix< T >::getRows (  )

return vector of row indices of nonzeros

Returns:
vector of row indices of nonzeros
template<class T >
T * SparseMatrix< T >::getVals (  )

returns the values of the nonzero elements

Returns:
the values of the nonzero elements

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Defines