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...
#include <amg_base.hpp>
Public Types |
typedef ScalarType | value_type |
typedef AdapterType::iterator1 | iterator1 |
typedef AdapterType::iterator2 | iterator2 |
typedef
ConstAdapterType::const_iterator1 | const_iterator1 |
typedef
ConstAdapterType::const_iterator2 | const_iterator2 |
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) |
Detailed Description
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.
Member Typedef Documentation
Constructor & Destructor Documentation
Constructor. Builds matrix of size (i,j).
- Parameters:
-
| i | Size of first dimension |
| j | Size of second dimension |
amg_sparsematrix |
( |
std::vector< std::map< unsigned int, ScalarType > > const & |
mat |
) |
[inline] |
Constructor. Builds matrix via std::vector<std::map> by copying memory (Only necessary feature of this other matrix type is to have const iterators).
- Parameters:
-
Constructor. Builds matrix via another matrix type. (Only necessary feature of this other matrix type is to have const iterators).
- Parameters:
-
Member Function Documentation
void add |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
ScalarType |
s | |
|
) |
| | [inline] |
void addscalar |
( |
IteratorType & |
iter, |
|
|
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
ScalarType |
s | |
|
) |
| | [inline] |
iterator1 begin1 |
( |
bool |
trans = false |
) |
[inline] |
iterator2 begin2 |
( |
bool |
trans = false |
) |
[inline] |
void do_trans |
( |
|
) |
[inline] |
iterator1 end1 |
( |
bool |
trans = false |
) |
[inline] |
iterator2 end2 |
( |
bool |
trans = false |
) |
[inline] |
std::vector<std::map<unsigned int, ScalarType> >* get_internal_pointer |
( |
|
) |
[inline] |
bool get_trans |
( |
|
) |
const [inline] |
bool isnonzero |
( |
unsigned int |
i, |
|
|
unsigned int |
j | |
|
) |
| | const [inline] |
operator boost::numeric::ublas::compressed_matrix< ScalarType > |
( |
void |
|
) |
[inline] |
operator boost::numeric::ublas::matrix< ScalarType > |
( |
void |
|
) |
[inline] |
ScalarType operator() |
( |
unsigned int |
i, |
|
|
unsigned int |
j | |
|
) |
| | const [inline] |
void removescalar |
( |
IteratorType & |
iter, |
|
|
unsigned int |
i | |
|
) |
| | [inline] |
void resize |
( |
unsigned int |
i, |
|
|
unsigned int |
j, |
|
|
bool |
preserve = true | |
|
) |
| | [inline] |
void set_trans |
( |
bool |
mode |
) |
[inline] |
size_t size1 |
( |
|
) |
[inline] |
size_t size1 |
( |
|
) |
const [inline] |
size_t size2 |
( |
|
) |
const [inline] |
size_t size2 |
( |
|
) |
[inline] |
The documentation for this class was generated from the following file:
- /data/development/ViennaCL/dev/viennacl/linalg/detail/amg/amg_base.hpp