ViennaCL - The Vienna Computing Library  1.6.1
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT > Class Template Reference

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 NumericT 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. More...
 
 amg_sparsematrix (unsigned int i, unsigned int j)
 Constructor. Builds matrix of size (i,j). More...
 
 amg_sparsematrix (std::vector< std::map< unsigned int, NumericT > > 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) More...
 
template<typename MatrixT >
 amg_sparsematrix (MatrixT const &mat)
 Constructor. Builds matrix via another matrix type. (Only necessary feature of this other matrix type is to have const iterators) More...
 
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, NumericT s)
 
template<typename IteratorT >
void addscalar (IteratorT &iter, unsigned int i, unsigned int j, NumericT s)
 
template<typename IteratorT >
void removescalar (IteratorT &iter, unsigned int i)
 
NonzeroScalarType operator() (unsigned int i, unsigned int j)
 
NumericT operator() (unsigned int i, unsigned int j) const
 
void resize (unsigned int i, unsigned int j, bool preserve=true)
 
void clear ()
 
vcl_size_t size1 ()
 
vcl_size_t size1 () const
 
vcl_size_t size2 ()
 
vcl_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, NumericT > > * get_internal_pointer ()
 
 operator boost::numeric::ublas::compressed_matrix< NumericT > (void)
 
 operator boost::numeric::ublas::matrix< NumericT > (void)
 

Detailed Description

template<typename NumericT>
class viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >

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.

Definition at line 373 of file amg_base.hpp.

Member Typedef Documentation

Definition at line 405 of file amg_base.hpp.

Definition at line 406 of file amg_base.hpp.

template<typename NumericT >
typedef AdapterType::iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::iterator1

Definition at line 403 of file amg_base.hpp.

template<typename NumericT >
typedef AdapterType::iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::iterator2

Definition at line 404 of file amg_base.hpp.

template<typename NumericT >
typedef NumericT viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::value_type

Definition at line 376 of file amg_base.hpp.

Constructor & Destructor Documentation

template<typename NumericT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::amg_sparsematrix ( )
inline

Standard constructor.

Definition at line 409 of file amg_base.hpp.

template<typename NumericT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::amg_sparsematrix ( unsigned int  i,
unsigned int  j 
)
inline

Constructor. Builds matrix of size (i,j).

Parameters
iSize of first dimension
jSize of second dimension

Definition at line 419 of file amg_base.hpp.

template<typename NumericT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::amg_sparsematrix ( std::vector< std::map< unsigned int, NumericT > > 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
matVector of maps

Definition at line 437 of file amg_base.hpp.

template<typename NumericT >
template<typename MatrixT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::amg_sparsematrix ( MatrixT const &  mat)
inline

Constructor. Builds matrix via another matrix type. (Only necessary feature of this other matrix type is to have const iterators)

Parameters
matMatrix

Definition at line 456 of file amg_base.hpp.

Member Function Documentation

template<typename NumericT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::add ( unsigned int  i,
unsigned int  j,
NumericT  s 
)
inline

Definition at line 539 of file amg_base.hpp.

template<typename NumericT >
template<typename IteratorT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::addscalar ( IteratorT &  iter,
unsigned int  i,
unsigned int  j,
NumericT  s 
)
inline

Definition at line 563 of file amg_base.hpp.

template<typename NumericT >
iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::begin1 ( bool  trans = false)
inline

Definition at line 683 of file amg_base.hpp.

template<typename NumericT >
const_iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::begin1 ( ) const
inline

Definition at line 743 of file amg_base.hpp.

template<typename NumericT >
iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::begin2 ( bool  trans = false)
inline

Definition at line 713 of file amg_base.hpp.

template<typename NumericT >
const_iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::begin2 ( bool  trans = false) const
inline

Definition at line 758 of file amg_base.hpp.

template<typename NumericT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::clear ( )
inline

Definition at line 641 of file amg_base.hpp.

template<typename NumericT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::do_trans ( )
inline

Definition at line 485 of file amg_base.hpp.

template<typename NumericT >
iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::end1 ( bool  trans = false)
inline

Definition at line 698 of file amg_base.hpp.

template<typename NumericT >
const_iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::end1 ( bool  trans = false) const
inline

Definition at line 751 of file amg_base.hpp.

template<typename NumericT >
iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::end2 ( bool  trans = false)
inline

Definition at line 728 of file amg_base.hpp.

template<typename NumericT >
const_iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::end2 ( bool  trans = false) const
inline

Definition at line 765 of file amg_base.hpp.

template<typename NumericT >
std::vector<std::map<unsigned int, NumericT> >* viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::get_internal_pointer ( )
inline

Definition at line 773 of file amg_base.hpp.

template<typename NumericT >
bool viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::get_trans ( ) const
inline

Definition at line 517 of file amg_base.hpp.

template<typename NumericT >
bool viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::isnonzero ( unsigned int  i,
unsigned int  j 
) const
inline

Definition at line 520 of file amg_base.hpp.

template<typename NumericT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::operator boost::numeric::ublas::compressed_matrix< NumericT > ( void  )
inline

Definition at line 783 of file amg_base.hpp.

template<typename NumericT >
viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::operator boost::numeric::ublas::matrix< NumericT > ( void  )
inline

Definition at line 796 of file amg_base.hpp.

template<typename NumericT >
NonzeroScalarType viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

Definition at line 586 of file amg_base.hpp.

template<typename NumericT >
NumericT viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Definition at line 609 of file amg_base.hpp.

template<typename NumericT >
template<typename IteratorT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::removescalar ( IteratorT &  iter,
unsigned int  i 
)
inline

Definition at line 579 of file amg_base.hpp.

template<typename NumericT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::resize ( unsigned int  i,
unsigned int  j,
bool  preserve = true 
)
inline

Definition at line 631 of file amg_base.hpp.

template<typename NumericT >
void viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::set_trans ( bool  mode)
inline

Definition at line 510 of file amg_base.hpp.

template<typename NumericT >
vcl_size_t viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::size1 ( )
inline

Definition at line 650 of file amg_base.hpp.

template<typename NumericT >
vcl_size_t viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::size1 ( ) const
inline

Definition at line 658 of file amg_base.hpp.

template<typename NumericT >
vcl_size_t viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::size2 ( )
inline

Definition at line 667 of file amg_base.hpp.

template<typename NumericT >
vcl_size_t viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::size2 ( ) const
inline

Definition at line 675 of file amg_base.hpp.


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