remora::compressed_matrix< T, I > Class Template Reference

#include <shark/LinAlg/BLAS/matrix_sparse.hpp>

+ Inheritance diagram for remora::compressed_matrix< T, I >:

Classes

class  reference
 

Public Types

typedef T const & const_reference
 
typedef elementwise< sparse_tag > evaluation_category
 
typedef row_major orientation
 
typedef iterators::compressed_storage_iterator< value_type const, size_type const > const_row_iterator
 
typedef iterators::compressed_storage_iterator< value_type, size_type const > row_iterator
 
typedef iterators::compressed_storage_iterator< value_type const, size_type const > const_column_iterator
 
typedef iterators::compressed_storage_iterator< value_type, size_type const > column_iterator
 

Public Member Functions

 compressed_matrix ()
 
 compressed_matrix (size_type size1, size_type size2, size_type non_zeros=0)
 
template<class E >
 compressed_matrix (matrix_expression< E, cpu_tag > const &e, size_type non_zeros=0)
 
size_type size1 () const
 
size_type size2 () const
 
std::size_t nnz_capacity () const
 
std::size_t row_capacity (size_type row) const
 
std::size_t nnz () const
 
std::size_t inner_nnz (size_type row) const
 
storage_type raw_storage ()
 Returns the underlying storage structure for low level access. More...
 
const_storage_type raw_storage () const
 Returns the underlying storage structure for low level access. More...
 
device_traits< cpu_tag >::queue_type & queue ()
 
void set_filled (std::size_t non_zeros)
 
void set_row_filled (size_type i, std::size_t non_zeros)
 
void resize (size_type size1, size_type size2)
 
void reserve (std::size_t non_zeros)
 
void reserve_row (size_type row, std::size_t non_zeros)
 
void clear ()
 
const_reference operator() (size_type i, size_type j) const
 
reference operator() (size_type i, size_type j)
 
template<class C >
compressed_matrixoperator= (matrix_container< C, cpu_tag > const &m)
 
template<class E >
compressed_matrixoperator= (matrix_expression< E, cpu_tag > const &e)
 
void swap (compressed_matrix &m)
 
const_row_iterator row_begin (size_type i) const
 
const_row_iterator row_end (size_type i) const
 
row_iterator row_begin (size_type i)
 
row_iterator row_end (size_type i)
 
row_iterator set_element (row_iterator pos, size_type index, value_type value)
 
row_iterator clear_range (row_iterator start, row_iterator end)
 
row_iterator clear_element (row_iterator elem)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 
- Public Member Functions inherited from remora::matrix_container< compressed_matrix< T, I >, cpu_tag >
const container_type & operator() () const
 
container_type & operator() ()
 
- Public Member Functions inherited from remora::matrix_expression< compressed_matrix< T, I >, cpu_tag >
const expression_type & operator() () const
 
expression_type & operator() ()
 

Friends

void swap (compressed_matrix &m1, compressed_matrix &m2)
 
void swap_rows (compressed_matrix &a, size_type i, compressed_matrix &b, size_type j)
 
void swap_rows (compressed_matrix &a, size_type i, size_type j)
 

Detailed Description

template<class T, class I = std::size_t>
class remora::compressed_matrix< T, I >

Definition at line 40 of file matrix_sparse.hpp.

Member Typedef Documentation

◆ column_iterator

template<class T , class I = std::size_t>
typedef iterators::compressed_storage_iterator<value_type, size_type const> remora::compressed_matrix< T, I >::column_iterator

Definition at line 353 of file matrix_sparse.hpp.

◆ const_column_iterator

template<class T , class I = std::size_t>
typedef iterators::compressed_storage_iterator<value_type const, size_type const> remora::compressed_matrix< T, I >::const_column_iterator

Definition at line 352 of file matrix_sparse.hpp.

◆ const_reference

template<class T , class I = std::size_t>
typedef T const& remora::compressed_matrix< T, I >::const_reference

Definition at line 47 of file matrix_sparse.hpp.

◆ const_row_iterator

template<class T , class I = std::size_t>
typedef iterators::compressed_storage_iterator<value_type const, size_type const> remora::compressed_matrix< T, I >::const_row_iterator

Definition at line 325 of file matrix_sparse.hpp.

◆ evaluation_category

template<class T , class I = std::size_t>
typedef elementwise<sparse_tag> remora::compressed_matrix< T, I >::evaluation_category

Definition at line 112 of file matrix_sparse.hpp.

◆ orientation

template<class T , class I = std::size_t>
typedef row_major remora::compressed_matrix< T, I >::orientation

Definition at line 113 of file matrix_sparse.hpp.

◆ row_iterator

template<class T , class I = std::size_t>
typedef iterators::compressed_storage_iterator<value_type, size_type const> remora::compressed_matrix< T, I >::row_iterator

Definition at line 326 of file matrix_sparse.hpp.

Constructor & Destructor Documentation

◆ compressed_matrix() [1/3]

template<class T , class I = std::size_t>
remora::compressed_matrix< T, I >::compressed_matrix ( )
inline

Definition at line 116 of file matrix_sparse.hpp.

◆ compressed_matrix() [2/3]

template<class T , class I = std::size_t>
remora::compressed_matrix< T, I >::compressed_matrix ( size_type  size1,
size_type  size2,
size_type  non_zeros = 0 
)
inline

Definition at line 120 of file matrix_sparse.hpp.

◆ compressed_matrix() [3/3]

template<class T , class I = std::size_t>
template<class E >
remora::compressed_matrix< T, I >::compressed_matrix ( matrix_expression< E, cpu_tag > const &  e,
size_type  non_zeros = 0 
)
inline

Definition at line 127 of file matrix_sparse.hpp.

References remora::assign().

Member Function Documentation

◆ clear()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::clear ( )
inline

Definition at line 227 of file matrix_sparse.hpp.

◆ clear_element()

template<class T , class I = std::size_t>
row_iterator remora::compressed_matrix< T, I >::clear_element ( row_iterator  elem)
inline

◆ clear_range()

◆ inner_nnz()

template<class T , class I = std::size_t>
std::size_t remora::compressed_matrix< T, I >::inner_nnz ( size_type  row) const
inline

Definition at line 153 of file matrix_sparse.hpp.

References remora::row().

Referenced by remora::compressed_matrix< T, I >::set_element().

◆ nnz()

template<class T , class I = std::size_t>
std::size_t remora::compressed_matrix< T, I >::nnz ( ) const
inline

◆ nnz_capacity()

template<class T , class I = std::size_t>
std::size_t remora::compressed_matrix< T, I >::nnz_capacity ( ) const
inline

◆ operator()() [1/2]

template<class T , class I = std::size_t>
const_reference remora::compressed_matrix< T, I >::operator() ( size_type  i,
size_type  j 
) const
inline

◆ operator()() [2/2]

template<class T , class I = std::size_t>
reference remora::compressed_matrix< T, I >::operator() ( size_type  i,
size_type  j 
)
inline

◆ operator=() [1/2]

template<class T , class I = std::size_t>
template<class C >
compressed_matrix& remora::compressed_matrix< T, I >::operator= ( matrix_container< C, cpu_tag > const &  m)
inline

◆ operator=() [2/2]

template<class T , class I = std::size_t>
template<class E >
compressed_matrix& remora::compressed_matrix< T, I >::operator= ( matrix_expression< E, cpu_tag > const &  e)
inline

◆ queue()

template<class T , class I = std::size_t>
device_traits<cpu_tag>::queue_type& remora::compressed_matrix< T, I >::queue ( )
inline

Definition at line 167 of file matrix_sparse.hpp.

◆ raw_storage() [1/2]

template<class T , class I = std::size_t>
storage_type remora::compressed_matrix< T, I >::raw_storage ( )
inline

Returns the underlying storage structure for low level access.

Definition at line 158 of file matrix_sparse.hpp.

◆ raw_storage() [2/2]

template<class T , class I = std::size_t>
const_storage_type remora::compressed_matrix< T, I >::raw_storage ( ) const
inline

Returns the underlying storage structure for low level access.

Definition at line 163 of file matrix_sparse.hpp.

◆ reserve()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::reserve ( std::size_t  non_zeros)
inline

◆ reserve_row()

◆ resize()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::resize ( size_type  size1,
size_type  size2 
)
inline

◆ row_begin() [1/2]

template<class T , class I = std::size_t>
const_row_iterator remora::compressed_matrix< T, I >::row_begin ( size_type  i) const
inline

◆ row_begin() [2/2]

template<class T , class I = std::size_t>
row_iterator remora::compressed_matrix< T, I >::row_begin ( size_type  i)
inline

Definition at line 340 of file matrix_sparse.hpp.

References remora::compressed_matrix< T, I >::size1().

◆ row_capacity()

template<class T , class I = std::size_t>
std::size_t remora::compressed_matrix< T, I >::row_capacity ( size_type  row) const
inline

◆ row_end() [1/2]

template<class T , class I = std::size_t>
const_row_iterator remora::compressed_matrix< T, I >::row_end ( size_type  i) const
inline

◆ row_end() [2/2]

template<class T , class I = std::size_t>
row_iterator remora::compressed_matrix< T, I >::row_end ( size_type  i)
inline

Definition at line 346 of file matrix_sparse.hpp.

References remora::compressed_matrix< T, I >::size1().

◆ serialize()

template<class T , class I = std::size_t>
template<class Archive >
void remora::compressed_matrix< T, I >::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Definition at line 426 of file matrix_sparse.hpp.

◆ set_element()

◆ set_filled()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::set_filled ( std::size_t  non_zeros)
inline

Definition at line 171 of file matrix_sparse.hpp.

◆ set_row_filled()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::set_row_filled ( size_type  i,
std::size_t  non_zeros 
)
inline

◆ size1()

◆ size2()

template<class T , class I = std::size_t>
size_type remora::compressed_matrix< T, I >::size2 ( ) const
inline

◆ swap()

template<class T , class I = std::size_t>
void remora::compressed_matrix< T, I >::swap ( compressed_matrix< T, I > &  m)
inline

Definition at line 269 of file matrix_sparse.hpp.

References shark::swap().

Referenced by remora::compressed_matrix< T, I >::operator=().

Friends And Related Function Documentation

◆ swap

template<class T , class I = std::size_t>
void swap ( compressed_matrix< T, I > &  m1,
compressed_matrix< T, I > &  m2 
)
friend

Definition at line 279 of file matrix_sparse.hpp.

◆ swap_rows [1/2]

template<class T , class I = std::size_t>
void swap_rows ( compressed_matrix< T, I > &  a,
size_type  i,
compressed_matrix< T, I > &  b,
size_type  j 
)
friend

Definition at line 283 of file matrix_sparse.hpp.

◆ swap_rows [2/2]

template<class T , class I = std::size_t>
void swap_rows ( compressed_matrix< T, I > &  a,
size_type  i,
size_type  j 
)
friend

Definition at line 320 of file matrix_sparse.hpp.


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