ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::tools::sparse_matrix_adapter< NumericT, SizeT > Class Template Reference

Adapts a non-const sparse matrix type made up from std::vector<std::map<SizeT, NumericT> > to basic ublas-compatibility. More...

#include <adapter.hpp>

Inheritance diagram for viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >:
viennacl::tools::const_sparse_matrix_adapter< NumericT, SizeT >

Public Types

typedef sparse_matrix_adapted_iterator< NumericT, SizeT, true > iterator1
 
typedef sparse_matrix_adapted_iterator< NumericT, SizeT, false > iterator2
 
typedef const_sparse_matrix_adapted_iterator< NumericT, SizeT, true, true > const_iterator1
 
typedef const_sparse_matrix_adapted_iterator< NumericT, SizeT, false, true > const_iterator2
 
typedef SizeT size_type
 
- Public Types inherited from viennacl::tools::const_sparse_matrix_adapter< NumericT, SizeT >
typedef const_sparse_matrix_adapted_iterator< NumericT, SizeT, true, true > const_iterator1
 
typedef const_sparse_matrix_adapted_iterator< NumericT, SizeT, false, true > const_iterator2
 
typedef const_sparse_matrix_adapted_iterator< NumericT, SizeT, true, false > const_reverse_iterator1
 
typedef NumericT value_type
 
typedef vcl_size_t size_type
 

Public Member Functions

 sparse_matrix_adapter (std::vector< std::map< SizeT, NumericT > > &mat)
 
 sparse_matrix_adapter (std::vector< std::map< SizeT, NumericT > > &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
 
NumericToperator() (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
 
- Public Member Functions inherited from viennacl::tools::const_sparse_matrix_adapter< NumericT, SizeT >
 const_sparse_matrix_adapter (std::vector< std::map< SizeT, NumericT > > const &mat)
 
 const_sparse_matrix_adapter (std::vector< std::map< SizeT, NumericT > > const &mat, size_type num_rows, size_type num_cols)
 
size_type size1 () const
 
size_type size2 () const
 
const_iterator1 begin1 () const
 
const_iterator1 end1 () const
 
const_reverse_iterator1 rbegin1 () const
 
const_reverse_iterator1 rend1 () const
 
const_iterator2 begin2 () const
 
const_iterator2 end2 () const
 
NumericT operator() (SizeT i, SizeT j) const
 

Detailed Description

template<typename NumericT, typename SizeT = unsigned int>
class viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >

Adapts a non-const sparse matrix type made up from std::vector<std::map<SizeT, NumericT> > to basic ublas-compatibility.

Template Parameters
NumericTeither float or double

Definition at line 357 of file adapter.hpp.

Member Typedef Documentation

template<typename NumericT, typename SizeT = unsigned int>
typedef const_sparse_matrix_adapted_iterator<NumericT, SizeT, true, true> viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::const_iterator1

Definition at line 363 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
typedef const_sparse_matrix_adapted_iterator<NumericT, SizeT, false, true> viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::const_iterator2

Definition at line 364 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
typedef sparse_matrix_adapted_iterator<NumericT, SizeT, true> viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::iterator1

Definition at line 361 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
typedef sparse_matrix_adapted_iterator<NumericT, SizeT, false> viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::iterator2

Definition at line 362 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
typedef SizeT viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::size_type

Definition at line 365 of file adapter.hpp.

Constructor & Destructor Documentation

template<typename NumericT, typename SizeT = unsigned int>
viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::sparse_matrix_adapter ( std::vector< std::map< SizeT, NumericT > > &  mat)
inline

Definition at line 367 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::sparse_matrix_adapter ( std::vector< std::map< SizeT, NumericT > > &  mat,
vcl_size_t  num_rows,
vcl_size_t  num_cols 
)
inline

Definition at line 370 of file adapter.hpp.

Member Function Documentation

template<typename NumericT, typename SizeT = unsigned int>
iterator1 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::begin1 ( )
inline

Definition at line 375 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
const_iterator1 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::begin1 ( ) const
inline

Definition at line 378 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
iterator2 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::begin2 ( )
inline

Definition at line 381 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
const_iterator2 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::begin2 ( ) const
inline

Definition at line 384 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
void viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::clear ( )
inline

Definition at line 400 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
iterator1 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::end1 ( )
inline

Definition at line 376 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
const_iterator1 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::end1 ( ) const
inline

Definition at line 379 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
iterator2 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::end2 ( )
inline

Definition at line 382 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
const_iterator2 viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::end2 ( ) const
inline

Definition at line 385 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
NumericT& viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::operator() ( vcl_size_t  i,
vcl_size_t  j 
)
inline

Definition at line 387 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
void viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::resize ( vcl_size_t  i,
vcl_size_t  j,
bool  preserve = true 
)
inline

Definition at line 389 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
size_type viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::size1 ( )
inline

Definition at line 406 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
size_type viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::size1 ( ) const
inline

Definition at line 407 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
size_type viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::size2 ( )
inline

Definition at line 410 of file adapter.hpp.

template<typename NumericT, typename SizeT = unsigned int>
size_type viennacl::tools::sparse_matrix_adapter< NumericT, SizeT >::size2 ( ) const
inline

Definition at line 411 of file adapter.hpp.


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