remora::triangular_matrix< T, Orientation, TriangularType > Class Template Reference

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

+ Inheritance diagram for remora::triangular_matrix< T, Orientation, TriangularType >:

Classes

class  major1_iterator
 
class  major2_iterator
 

Public Types

typedef value_type const_reference
 
typedef value_type reference
 
typedef elementwise< packed_tag > evaluation_category
 
typedef triangular< Orientation, TriangularType > orientation
 
typedef std::conditional< std::is_same< Orientation, row_major >::value, iterators::dense_storage_iterator< value_type, iterators::packed_random_access_iterator_tag >, typename std::conditional< TriangularType::is_upper, major1_iterator< value_type >, major2_iterator< value_type > >::type >::type row_iterator
 
typedef std::conditional< std::is_same< Orientation, row_major >::value, typename std::conditional< TriangularType::is_upper, major2_iterator< value_type >, major1_iterator< value_type > >::type, iterators::dense_storage_iterator< value_type, iterators::packed_random_access_iterator_tag > >::type column_iterator
 
typedef std::conditional< std::is_same< Orientation, row_major >::value, iterators::dense_storage_iterator< value_type const, iterators::packed_random_access_iterator_tag >, typename std::conditional< TriangularType::is_upper, major1_iterator< value_type const >, major2_iterator< value_type const > >::type >::type const_row_iterator
 
typedef std::conditional< std::is_same< Orientation, row_major >::value, typename std::conditional< TriangularType::is_upper, major2_iterator< value_type const >, major1_iterator< value_type const > >::type, iterators::dense_storage_iterator< value_type const, iterators::packed_random_access_iterator_tag > >::type const_column_iterator
 

Public Member Functions

 triangular_matrix ()
 Default triangular_matrix constructor. Make a dense matrix of size (0,0) More...
 
 triangular_matrix (size_type size)
 
 triangular_matrix (size_type size, value_type init)
 
 triangular_matrix (triangular_matrix const &m)
 
template<class E >
 triangular_matrix (matrix_expression< E, cpu_tag > const &e)
 
size_type size1 () const
 Returns the number of rows of the matrix. More...
 
size_type size2 () const
 Returns the number of columns of the matrix. More...
 
storage_type raw_storage ()
 
const_storage_type raw_storage () const
 
device_traits< cpu_tag >::queue_type & queue ()
 
void resize (size_type size)
 
void resize (size_type size1, size_type size2)
 
void clear ()
 
const_reference operator() (size_type i, size_type j) const
 
void set_element (size_type i, size_type j, value_type t)
 
bool non_zero (size_type i, size_type j) const
 
triangular_matrixoperator= (triangular_matrix m)
 
template<class C >
triangular_matrixoperator= (matrix_container< C, cpu_tag > const &m)
 
template<class E >
triangular_matrixoperator= (matrix_expression< E, cpu_tag > const &e)
 
void swap (triangular_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)
 
const_column_iterator column_begin (size_type i) const
 
const_column_iterator column_end (size_type i) const
 
column_iterator column_begin (size_type i)
 
column_iterator column_end (size_type i)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 
- Public Member Functions inherited from remora::matrix_container< triangular_matrix< T, Orientation, TriangularType >, cpu_tag >
const container_type & operator() () const
 
container_type & operator() ()
 
- Public Member Functions inherited from remora::matrix_expression< triangular_matrix< T, Orientation, TriangularType >, cpu_tag >
const expression_type & operator() () const
 
expression_type & operator() ()
 

Friends

void swap (triangular_matrix &m1, triangular_matrix &m2)
 

Detailed Description

template<class T, class Orientation, class TriangularType>
class remora::triangular_matrix< T, Orientation, TriangularType >

Definition at line 43 of file triangular_matrix.hpp.

Member Typedef Documentation

◆ column_iterator

template<class T , class Orientation , class TriangularType >
typedef std::conditional< std::is_same<Orientation,row_major>::value, typename std::conditional< TriangularType::is_upper, major2_iterator<value_type>, major1_iterator<value_type> >::type, iterators::dense_storage_iterator<value_type,iterators::packed_random_access_iterator_tag> >::type remora::triangular_matrix< T, Orientation, TriangularType >::column_iterator

Definition at line 391 of file triangular_matrix.hpp.

◆ const_column_iterator

template<class T , class Orientation , class TriangularType >
typedef std::conditional< std::is_same<Orientation,row_major>::value, typename std::conditional< TriangularType::is_upper, major2_iterator<value_type const>, major1_iterator<value_type const> >::type, iterators::dense_storage_iterator<value_type const,iterators::packed_random_access_iterator_tag> >::type remora::triangular_matrix< T, Orientation, TriangularType >::const_column_iterator

Definition at line 410 of file triangular_matrix.hpp.

◆ const_reference

template<class T , class Orientation , class TriangularType >
typedef value_type remora::triangular_matrix< T, Orientation, TriangularType >::const_reference

Definition at line 48 of file triangular_matrix.hpp.

◆ const_row_iterator

template<class T , class Orientation , class TriangularType >
typedef std::conditional< std::is_same<Orientation,row_major>::value, iterators::dense_storage_iterator<value_type const,iterators::packed_random_access_iterator_tag>, typename std::conditional< TriangularType::is_upper, major1_iterator<value_type const>, major2_iterator<value_type const> >::type >::type remora::triangular_matrix< T, Orientation, TriangularType >::const_row_iterator

Definition at line 401 of file triangular_matrix.hpp.

◆ evaluation_category

template<class T , class Orientation , class TriangularType >
typedef elementwise<packed_tag> remora::triangular_matrix< T, Orientation, TriangularType >::evaluation_category

Definition at line 56 of file triangular_matrix.hpp.

◆ orientation

template<class T , class Orientation , class TriangularType >
typedef triangular<Orientation,TriangularType> remora::triangular_matrix< T, Orientation, TriangularType >::orientation

Definition at line 57 of file triangular_matrix.hpp.

◆ reference

template<class T , class Orientation , class TriangularType >
typedef value_type remora::triangular_matrix< T, Orientation, TriangularType >::reference

Definition at line 49 of file triangular_matrix.hpp.

◆ row_iterator

template<class T , class Orientation , class TriangularType >
typedef std::conditional< std::is_same<Orientation,row_major>::value, iterators::dense_storage_iterator<value_type,iterators::packed_random_access_iterator_tag>, typename std::conditional< TriangularType::is_upper, major1_iterator<value_type>, major2_iterator<value_type> >::type >::type remora::triangular_matrix< T, Orientation, TriangularType >::row_iterator

Definition at line 382 of file triangular_matrix.hpp.

Constructor & Destructor Documentation

◆ triangular_matrix() [1/5]

template<class T , class Orientation , class TriangularType >
remora::triangular_matrix< T, Orientation, TriangularType >::triangular_matrix ( )
inline

Default triangular_matrix constructor. Make a dense matrix of size (0,0)

Definition at line 62 of file triangular_matrix.hpp.

◆ triangular_matrix() [2/5]

template<class T , class Orientation , class TriangularType >
remora::triangular_matrix< T, Orientation, TriangularType >::triangular_matrix ( size_type  size)
inline

Packed matrix constructor with defined size

Parameters
sizenumber of rows and columns

Definition at line 67 of file triangular_matrix.hpp.

◆ triangular_matrix() [3/5]

template<class T , class Orientation , class TriangularType >
remora::triangular_matrix< T, Orientation, TriangularType >::triangular_matrix ( size_type  size,
value_type  init 
)
inline

Packed matrix constructor with defined size and an initial value for all triangular matrix elements

Parameters
sizenumber of rows and columns
initinitial value of the non-zero elements

Definition at line 73 of file triangular_matrix.hpp.

◆ triangular_matrix() [4/5]

template<class T , class Orientation , class TriangularType >
remora::triangular_matrix< T, Orientation, TriangularType >::triangular_matrix ( triangular_matrix< T, Orientation, TriangularType > const &  m)
inline

Copy-constructor of a dense matrix

Parameters
mis a dense matrix

Definition at line 78 of file triangular_matrix.hpp.

◆ triangular_matrix() [5/5]

template<class T , class Orientation , class TriangularType >
template<class E >
remora::triangular_matrix< T, Orientation, TriangularType >::triangular_matrix ( matrix_expression< E, cpu_tag > const &  e)
inline

Copy-constructor of a dense matrix from a matrix expression

Parameters
eis a matrix expression which has to be triangular

Definition at line 84 of file triangular_matrix.hpp.

References remora::assign().

Member Function Documentation

◆ clear()

template<class T , class Orientation , class TriangularType >
void remora::triangular_matrix< T, Orientation, TriangularType >::clear ( )
inline

Definition at line 127 of file triangular_matrix.hpp.

◆ column_begin() [1/2]

◆ column_begin() [2/2]

◆ column_end() [1/2]

◆ column_end() [2/2]

◆ non_zero()

template<class T , class Orientation , class TriangularType >
bool remora::triangular_matrix< T, Orientation, TriangularType >::non_zero ( size_type  i,
size_type  j 
) const
inline

◆ operator()()

template<class T , class Orientation , class TriangularType >
const_reference remora::triangular_matrix< T, Orientation, TriangularType >::operator() ( size_type  i,
size_type  j 
) const
inline

◆ operator=() [1/3]

template<class T , class Orientation , class TriangularType >
triangular_matrix& remora::triangular_matrix< T, Orientation, TriangularType >::operator= ( triangular_matrix< T, Orientation, TriangularType >  m)
inline
Note
"pass by value" the key idea to enable move semantics

Definition at line 156 of file triangular_matrix.hpp.

References remora::triangular_matrix< T, Orientation, TriangularType >::swap().

◆ operator=() [2/3]

template<class T , class Orientation , class TriangularType >
template<class C >
triangular_matrix& remora::triangular_matrix< T, Orientation, TriangularType >::operator= ( matrix_container< C, cpu_tag > const &  m)
inline

◆ operator=() [3/3]

template<class T , class Orientation , class TriangularType >
template<class E >
triangular_matrix& remora::triangular_matrix< T, Orientation, TriangularType >::operator= ( matrix_expression< E, cpu_tag > const &  e)
inline

◆ queue()

template<class T , class Orientation , class TriangularType >
device_traits<cpu_tag>::queue_type& remora::triangular_matrix< T, Orientation, TriangularType >::queue ( )
inline

Definition at line 107 of file triangular_matrix.hpp.

◆ raw_storage() [1/2]

template<class T , class Orientation , class TriangularType >
storage_type remora::triangular_matrix< T, Orientation, TriangularType >::raw_storage ( )
inline

Definition at line 99 of file triangular_matrix.hpp.

◆ raw_storage() [2/2]

template<class T , class Orientation , class TriangularType >
const_storage_type remora::triangular_matrix< T, Orientation, TriangularType >::raw_storage ( ) const
inline

Definition at line 103 of file triangular_matrix.hpp.

◆ resize() [1/2]

template<class T , class Orientation , class TriangularType >
void remora::triangular_matrix< T, Orientation, TriangularType >::resize ( size_type  size)
inline

Resize a matrix to new dimensions. If resizing is performed, the data is not preserved.

Parameters
sizethe new number of rows and columns

Definition at line 116 of file triangular_matrix.hpp.

Referenced by remora::triangular_matrix< T, Orientation, TriangularType >::operator=(), and remora::triangular_matrix< T, Orientation, TriangularType >::resize().

◆ resize() [2/2]

template<class T , class Orientation , class TriangularType >
void remora::triangular_matrix< T, Orientation, TriangularType >::resize ( size_type  size1,
size_type  size2 
)
inline

◆ row_begin() [1/2]

◆ row_begin() [2/2]

◆ row_end() [1/2]

◆ row_end() [2/2]

◆ serialize()

template<class T , class Orientation , class TriangularType >
template<class Archive >
void remora::triangular_matrix< T, Orientation, TriangularType >::serialize ( Archive &  ar,
const unsigned  int 
)
inline

Definition at line 482 of file triangular_matrix.hpp.

◆ set_element()

template<class T , class Orientation , class TriangularType >
void remora::triangular_matrix< T, Orientation, TriangularType >::set_element ( size_type  i,
size_type  j,
value_type  t 
)
inline

◆ size1()

◆ size2()

◆ swap()

template<class T , class Orientation , class TriangularType >
void remora::triangular_matrix< T, Orientation, TriangularType >::swap ( triangular_matrix< T, Orientation, TriangularType > &  m)
inline

Friends And Related Function Documentation

◆ swap

template<class T , class Orientation , class TriangularType >
void swap ( triangular_matrix< T, Orientation, TriangularType > &  m1,
triangular_matrix< T, Orientation, TriangularType > &  m2 
)
friend

Definition at line 179 of file triangular_matrix.hpp.


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