shark::blas::matrix_transpose< M > Class Template Reference

Matrix transpose. More...

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

+ Inheritance diagram for shark::blas::matrix_transpose< M >:

Public Types

typedef M::const_reference const_reference
 
typedef reference< M >::type reference
 
typedef M::const_pointer const_pointer
 
typedef pointer< M >::type pointer
 
typedef M::const_index_pointer const_index_pointer
 
typedef index_pointer< M >::type index_pointer
 
typedef M::orientation::transposed_orientation orientation
 
typedef M::storage_category storage_category
 
typedef elementwise_tag evaluation_category
 
typedef matrix_closure_type::const_column_iterator const_row_iterator
 
typedef matrix_closure_type::column_iterator row_iterator
 
typedef matrix_closure_type::const_row_iterator const_column_iterator
 
typedef matrix_closure_type::row_iterator column_iterator
 
typedef major_iterator< matrix_transpose< M > >::type major_iterator
 

Public Member Functions

 matrix_transpose (matrix_closure_type const &m)
 
template<class E >
 matrix_transpose (matrix_transpose< E > const &m, typename boost::disable_if< boost::mpl::or_< boost::is_same< matrix_transpose< E >, matrix_transpose >, boost::is_same< matrix_transpose< E >, matrix_closure_type > > >::type *dummy=0)
 
matrix_closure_type const & expression () const
 
matrix_closure_type expression ()
 
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...
 
difference_type stride1 () const
 Returns the stride in memory between two rows. More...
 
difference_type stride2 () const
 Returns the stride in memory between two columns. More...
 
size_type nnz () const
 Number of nonzero elements of the matrix. More...
 
const_pointer values () const
 Array of values of the nonzero elements. More...
 
index_pointer inner_indices () const
 Array of indices of the nonzero elements. More...
 
index_pointer outer_indices () const
 Returns an array containing the start of the rows. More...
 
index_pointer outer_indices_end () const
 Returns an array containing the end of the rows. More...
 
size_type inner_nnz (index_type i) const
 Returns the number of nonzero elements in the i-th row/column. More...
 
pointer storage () const
 Returns the pointer to the beginning of the matrix storage. More...
 
reference operator() (index_type i, index_type j) const
 
void set_element (size_type i, size_type j, value_type t)
 
const_row_iterator row_begin (index_type i) const
 
const_row_iterator row_end (index_type i) const
 
const_column_iterator column_begin (index_type j) const
 
const_column_iterator column_end (index_type j) const
 
row_iterator row_begin (index_type i)
 
row_iterator row_end (index_type i)
 
column_iterator column_begin (index_type j)
 
column_iterator column_end (index_type j)
 
major_iterator set_element (major_iterator pos, index_type index, value_type value)
 
major_iterator clear_range (major_iterator start, major_iterator end)
 
major_iterator clear_element (major_iterator elem)
 
void clear ()
 
void reserve (size_type non_zeros)
 
void reserve_row (size_type row, size_type non_zeros)
 
void reserve_column (size_type column, size_type non_zeros)
 
matrix_transposeoperator= (matrix_transpose const &m)
 
template<class E >
matrix_transposeoperator= (matrix_expression< E > const &e)
 
- Public Member Functions inherited from shark::blas::matrix_expression< matrix_transpose< M > >
const expression_type & operator() () const
 
expression_type & operator() ()
 

Detailed Description

template<class M>
class shark::blas::matrix_transpose< M >

Matrix transpose.

Definition at line 258 of file matrix_proxy.hpp.

Member Typedef Documentation

§ column_iterator

template<class M>
typedef matrix_closure_type::row_iterator shark::blas::matrix_transpose< M >::column_iterator

Definition at line 394 of file matrix_proxy.hpp.

§ const_column_iterator

template<class M>
typedef matrix_closure_type::const_row_iterator shark::blas::matrix_transpose< M >::const_column_iterator

Definition at line 393 of file matrix_proxy.hpp.

§ const_index_pointer

template<class M>
typedef M::const_index_pointer shark::blas::matrix_transpose< M >::const_index_pointer

Definition at line 270 of file matrix_proxy.hpp.

§ const_pointer

template<class M>
typedef M::const_pointer shark::blas::matrix_transpose< M >::const_pointer

Definition at line 266 of file matrix_proxy.hpp.

§ const_reference

template<class M>
typedef M::const_reference shark::blas::matrix_transpose< M >::const_reference

Definition at line 264 of file matrix_proxy.hpp.

§ const_row_iterator

template<class M>
typedef matrix_closure_type::const_column_iterator shark::blas::matrix_transpose< M >::const_row_iterator

Definition at line 391 of file matrix_proxy.hpp.

§ evaluation_category

template<class M>
typedef elementwise_tag shark::blas::matrix_transpose< M >::evaluation_category

Definition at line 278 of file matrix_proxy.hpp.

§ index_pointer

template<class M>
typedef index_pointer<M>::type shark::blas::matrix_transpose< M >::index_pointer

Definition at line 271 of file matrix_proxy.hpp.

§ major_iterator

Definition at line 423 of file matrix_proxy.hpp.

§ orientation

template<class M>
typedef M::orientation::transposed_orientation shark::blas::matrix_transpose< M >::orientation

Definition at line 276 of file matrix_proxy.hpp.

§ pointer

template<class M>
typedef pointer<M>::type shark::blas::matrix_transpose< M >::pointer

Definition at line 267 of file matrix_proxy.hpp.

§ reference

template<class M>
typedef reference<M>::type shark::blas::matrix_transpose< M >::reference

Definition at line 265 of file matrix_proxy.hpp.

§ row_iterator

template<class M>
typedef matrix_closure_type::column_iterator shark::blas::matrix_transpose< M >::row_iterator

Definition at line 392 of file matrix_proxy.hpp.

§ storage_category

template<class M>
typedef M::storage_category shark::blas::matrix_transpose< M >::storage_category

Definition at line 277 of file matrix_proxy.hpp.

Constructor & Destructor Documentation

§ matrix_transpose() [1/2]

template<class M>
shark::blas::matrix_transpose< M >::matrix_transpose ( matrix_closure_type const &  m)
inlineexplicit

Definition at line 281 of file matrix_proxy.hpp.

§ matrix_transpose() [2/2]

template<class M>
template<class E >
shark::blas::matrix_transpose< M >::matrix_transpose ( matrix_transpose< E > const &  m,
typename boost::disable_if< boost::mpl::or_< boost::is_same< matrix_transpose< E >, matrix_transpose< M > >, boost::is_same< matrix_transpose< E >, matrix_closure_type > > >::type *  dummy = 0 
)
inline

Definition at line 286 of file matrix_proxy.hpp.

Member Function Documentation

§ clear()

template<class M>
void shark::blas::matrix_transpose< M >::clear ( )
inline

§ clear_element()

template<class M>
major_iterator shark::blas::matrix_transpose< M >::clear_element ( major_iterator  elem)
inline

§ clear_range()

template<class M>
major_iterator shark::blas::matrix_transpose< M >::clear_range ( major_iterator  start,
major_iterator  end 
)
inline

§ column_begin() [1/2]

template<class M>
const_column_iterator shark::blas::matrix_transpose< M >::column_begin ( index_type  j) const
inline

§ column_begin() [2/2]

template<class M>
column_iterator shark::blas::matrix_transpose< M >::column_begin ( index_type  j)
inline

§ column_end() [1/2]

template<class M>
const_column_iterator shark::blas::matrix_transpose< M >::column_end ( index_type  j) const
inline

§ column_end() [2/2]

template<class M>
column_iterator shark::blas::matrix_transpose< M >::column_end ( index_type  j)
inline

§ expression() [1/2]

template<class M>
matrix_closure_type const& shark::blas::matrix_transpose< M >::expression ( ) const
inline

Definition at line 297 of file matrix_proxy.hpp.

Referenced by shark::blas::matrix_transpose< M >::operator=().

§ expression() [2/2]

template<class M>
matrix_closure_type shark::blas::matrix_transpose< M >::expression ( )
inline

Definition at line 300 of file matrix_proxy.hpp.

§ inner_indices()

template<class M>
index_pointer shark::blas::matrix_transpose< M >::inner_indices ( ) const
inline

Array of indices of the nonzero elements.

Note that there is a pair of indices needed: When accessing the j-th element in row i you have to write code like this: index_type start = outer_indices()[i] //aquire start of the i-th row index = inner_indices()[start+j]; All elements in the row are contained in the range [outer_indices()[i],outer_indices_end()[i]) there might be gaps between the end of the one line and the start of the next!

Definition at line 347 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ inner_nnz()

template<class M>
size_type shark::blas::matrix_transpose< M >::inner_nnz ( index_type  i) const
inline

Returns the number of nonzero elements in the i-th row/column.

Definition at line 366 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ nnz()

template<class M>
size_type shark::blas::matrix_transpose< M >::nnz ( ) const
inline

Number of nonzero elements of the matrix.

Definition at line 331 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ operator()()

template<class M>
reference shark::blas::matrix_transpose< M >::operator() ( index_type  i,
index_type  j 
) const
inline

§ operator=() [1/2]

§ operator=() [2/2]

template<class M>
template<class E >
matrix_transpose& shark::blas::matrix_transpose< M >::operator= ( matrix_expression< E > const &  e)
inline

§ outer_indices()

template<class M>
index_pointer shark::blas::matrix_transpose< M >::outer_indices ( ) const
inline

Returns an array containing the start of the rows.

See documentation of inner_indices() for more details.

Definition at line 354 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ outer_indices_end()

template<class M>
index_pointer shark::blas::matrix_transpose< M >::outer_indices_end ( ) const
inline

Returns an array containing the end of the rows.

See documentation of inner_indices() for more details.

Definition at line 361 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ reserve()

template<class M>
void shark::blas::matrix_transpose< M >::reserve ( size_type  non_zeros)
inline

§ reserve_column()

template<class M>
void shark::blas::matrix_transpose< M >::reserve_column ( size_type  column,
size_type  non_zeros 
)
inline

§ reserve_row()

template<class M>
void shark::blas::matrix_transpose< M >::reserve_row ( size_type  row,
size_type  non_zeros 
)
inline

§ row_begin() [1/2]

template<class M>
const_row_iterator shark::blas::matrix_transpose< M >::row_begin ( index_type  i) const
inline

§ row_begin() [2/2]

template<class M>
row_iterator shark::blas::matrix_transpose< M >::row_begin ( index_type  i)
inline

§ row_end() [1/2]

template<class M>
const_row_iterator shark::blas::matrix_transpose< M >::row_end ( index_type  i) const
inline

§ row_end() [2/2]

template<class M>
row_iterator shark::blas::matrix_transpose< M >::row_end ( index_type  i)
inline

§ set_element() [1/2]

template<class M>
void shark::blas::matrix_transpose< M >::set_element ( size_type  i,
size_type  j,
value_type  t 
)
inline

§ set_element() [2/2]

template<class M>
major_iterator shark::blas::matrix_transpose< M >::set_element ( major_iterator  pos,
index_type  index,
value_type  value 
)
inline

§ size1()

template<class M>
size_type shark::blas::matrix_transpose< M >::size1 ( ) const
inline

Returns the number of rows of the matrix.

Definition at line 305 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ size2()

template<class M>
size_type shark::blas::matrix_transpose< M >::size2 ( ) const
inline

Returns the number of columns of the matrix.

Definition at line 309 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ storage()

template<class M>
pointer shark::blas::matrix_transpose< M >::storage ( ) const
inline

Returns the pointer to the beginning of the matrix storage.

Grants low-level access to the matrix internals. Element order depends on whether the matrix is row_major or column_major. to access element (i,j) use storage()[i*stride1()+j*stride2()].

Definition at line 374 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ stride1()

template<class M>
difference_type shark::blas::matrix_transpose< M >::stride1 ( ) const
inline

Returns the stride in memory between two rows.

Definition at line 318 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ stride2()

template<class M>
difference_type shark::blas::matrix_transpose< M >::stride2 ( ) const
inline

Returns the stride in memory between two columns.

Definition at line 322 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

§ values()

template<class M>
const_pointer shark::blas::matrix_transpose< M >::values ( ) const
inline

Array of values of the nonzero elements.

Definition at line 335 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().


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