Public Types | Public Member Functions

sparse_matrix_adapter< SCALARTYPE > Class Template Reference

Adapts a non-const sparse matrix type made up from std::vector<std::map<unsigned int, SCALARTYPE> > to basic ublas-compatibility. More...

#include <adapter.hpp>

Inheritance diagram for sparse_matrix_adapter< SCALARTYPE >:
const_sparse_matrix_adapter< SCALARTYPE >

Public Types

typedef
sparse_matrix_adapted_iterator
< SCALARTYPE, true > 
iterator1
typedef
sparse_matrix_adapted_iterator
< SCALARTYPE, false > 
iterator2

Public Member Functions

 sparse_matrix_adapter (std::vector< std::map< unsigned int, SCALARTYPE > > &mat)
iterator1 begin1 ()
iterator1 end1 ()
iterator2 begin2 ()
iterator2 end2 ()
SCALARTYPE & operator() (unsigned int i, unsigned int j)
void resize (unsigned int i, unsigned int j, bool preserve=true)
void clear ()
size_t size1 ()
size_t size1 () const
size_t size2 ()
size_t size2 () const

Detailed Description

template<typename SCALARTYPE>
class viennacl::tools::sparse_matrix_adapter< SCALARTYPE >

Adapts a non-const sparse matrix type made up from std::vector<std::map<unsigned int, SCALARTYPE> > to basic ublas-compatibility.

Template Parameters:
SCALARTYPE either float or double

Member Typedef Documentation

typedef sparse_matrix_adapted_iterator<SCALARTYPE, true> iterator1
typedef sparse_matrix_adapted_iterator<SCALARTYPE, false> iterator2

Constructor & Destructor Documentation

sparse_matrix_adapter ( std::vector< std::map< unsigned int, SCALARTYPE > > &  mat  )  [inline]

Member Function Documentation

iterator1 begin1 (  )  [inline]
iterator2 begin2 (  )  [inline]
void clear (  )  [inline]
iterator1 end1 (  )  [inline]
iterator2 end2 (  )  [inline]
SCALARTYPE& operator() ( unsigned int  i,
unsigned int  j 
) [inline]
void resize ( unsigned int  i,
unsigned int  j,
bool  preserve = true 
) [inline]
size_t size1 (  )  [inline]
size_t size1 (  )  const [inline]
size_t size2 (  )  [inline]
size_t size2 (  )  const [inline]

The documentation for this class was generated from the following file: