ViennaCL - The Vienna Computing Library
1.5.0
|
Adapts a non-const sparse matrix type made up from std::vector<std::map<SizeType, SCALARTYPE> > to basic ublas-compatibility. More...
#include <adapter.hpp>
Public Types | |
typedef sparse_matrix_adapted_iterator < SCALARTYPE, SizeType, true > | iterator1 |
typedef sparse_matrix_adapted_iterator < SCALARTYPE, SizeType, false > | iterator2 |
typedef const_sparse_matrix_adapted_iterator < SCALARTYPE, SizeType, true, true > | const_iterator1 |
typedef const_sparse_matrix_adapted_iterator < SCALARTYPE, SizeType, false, true > | const_iterator2 |
typedef SizeType | size_type |
Public Member Functions | |
sparse_matrix_adapter (std::vector< std::map< SizeType, SCALARTYPE > > &mat) | |
sparse_matrix_adapter (std::vector< std::map< SizeType, SCALARTYPE > > &mat, vcl_size_t num_rows, vcl_size_t num_cols) | |
iterator1 | begin1 () |
iterator1 | end1 () |
const_iterator1 | begin1 () const |
const_iterator1 | end1 () const |
iterator2 | begin2 () |
iterator2 | end2 () |
const_iterator2 | begin2 () const |
const_iterator2 | end2 () const |
SCALARTYPE & | operator() (vcl_size_t i, vcl_size_t j) |
void | resize (vcl_size_t i, vcl_size_t j, bool preserve=true) |
void | clear () |
size_type | size1 () |
size_type | size1 () const |
size_type | size2 () |
size_type | size2 () const |
Adapts a non-const sparse matrix type made up from std::vector<std::map<SizeType, SCALARTYPE> > to basic ublas-compatibility.
SCALARTYPE | either float or double |
typedef const_sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, true, true> const_iterator1 |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
typedef const_sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, false, true> const_iterator2 |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
typedef sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, true> iterator1 |
typedef sparse_matrix_adapted_iterator<SCALARTYPE, SizeType, false> iterator2 |
typedef SizeType size_type |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
sparse_matrix_adapter | ( | std::vector< std::map< SizeType, SCALARTYPE > > & | mat | ) | [inline] |
sparse_matrix_adapter | ( | std::vector< std::map< SizeType, SCALARTYPE > > & | mat, |
vcl_size_t | num_rows, | ||
vcl_size_t | num_cols | ||
) | [inline] |
const_iterator1 begin1 | ( | ) | const [inline] |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
const_iterator2 begin2 | ( | ) | const [inline] |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
void clear | ( | ) | [inline] |
const_iterator1 end1 | ( | ) | const [inline] |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
const_iterator2 end2 | ( | ) | const [inline] |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
SCALARTYPE& operator() | ( | vcl_size_t | i, |
vcl_size_t | j | ||
) | [inline] |
void resize | ( | vcl_size_t | i, |
vcl_size_t | j, | ||
bool | preserve = true |
||
) | [inline] |
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.
Reimplemented from const_sparse_matrix_adapter< SCALARTYPE, SizeType >.