A class for the sparse matrix type. Uses vector of maps as data structure for higher performance and lower memory usage. Uses similar interface as ublas::compressed_matrix. Can deal with transposed of matrix internally: Creation, Storage, Iterators, etc.
More...
Public Member Functions |
| amg_sparsematrix () |
| Standard constructor.
|
| amg_sparsematrix (unsigned int i, unsigned int j) |
| Constructor. Builds matrix of size (i,j).
|
| amg_sparsematrix (std::vector< std::map< unsigned int, ScalarType > > const &mat) |
| Constructor. Builds matrix via std::vector<std::map> by copying memory (Only necessary feature of this other matrix type is to have const iterators)
|
template<typename MatrixType > |
| amg_sparsematrix (MatrixType const &mat) |
| Constructor. Builds matrix via another matrix type. (Only necessary feature of this other matrix type is to have const iterators)
|
void | do_trans () |
void | set_trans (bool mode) |
bool | get_trans () const |
bool | isnonzero (unsigned int i, unsigned int j) const |
void | add (unsigned int i, unsigned int j, ScalarType s) |
template<typename IteratorType > |
void | addscalar (IteratorType &iter, unsigned int i, unsigned int j, ScalarType s) |
template<typename IteratorType > |
void | removescalar (IteratorType &iter, unsigned int i) |
NonzeroScalarType | operator() (unsigned int i, unsigned int j) |
ScalarType | operator() (unsigned int i, unsigned int j) const |
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 |
iterator1 | begin1 (bool trans=false) |
iterator1 | end1 (bool trans=false) |
iterator2 | begin2 (bool trans=false) |
iterator2 | end2 (bool trans=false) |
const_iterator1 | begin1 () const |
const_iterator1 | end1 (bool trans=false) const |
const_iterator2 | begin2 (bool trans=false) const |
const_iterator2 | end2 (bool trans=false) const |
std::vector< std::map
< unsigned int, ScalarType > > * | get_internal_pointer () |
| operator boost::numeric::ublas::compressed_matrix< ScalarType > (void) |
| operator boost::numeric::ublas::matrix< ScalarType > (void) |
template<typename ScalarType>
class viennacl::linalg::detail::amg::amg_sparsematrix< ScalarType >
A class for the sparse matrix type. Uses vector of maps as data structure for higher performance and lower memory usage. Uses similar interface as ublas::compressed_matrix. Can deal with transposed of matrix internally: Creation, Storage, Iterators, etc.