ViennaCL - The Vienna Computing Library: viennacl::linalg::detail::amg::amg_sparsematrix< NumericT > Class Template Reference

ViennaCL - The Vienna Computing Library 1.6.2 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
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 385 of file amg_base.hpp.

## Member Typedef Documentation

template<typename NumericT >

typedef ConstAdapterType::const_iterator1 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::const_iterator1

Definition at line 417 of file amg_base.hpp.

template<typename NumericT >

typedef ConstAdapterType::const_iterator2 viennacl::linalg::detail::amg::amg_sparsematrix< NumericT >::const_iterator2

Definition at line 418 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 415 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 416 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 388 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 421 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

  i | Size of first dimension
  j | Size of second dimension

Definition at line 431 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

  mat | Vector of maps

Definition at line 449 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

  mat | Matrix

Definition at line 468 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 551 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 575 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 695 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 755 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 725 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 770 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 653 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 497 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 710 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 763 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 740 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 777 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 785 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 529 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 532 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 795 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 808 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 598 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 621 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 591 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 643 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 522 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 662 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 670 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 679 of file amg_base.hpp.

template<typename NumericT >

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

Definition at line 687 of file amg_base.hpp.

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

- viennacl/linalg/detail/amg/amg_base.hpp