Boost.uBlas 1.49
Linear Algebra in C++: matrices, vectors and numeric algorithms

boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA > Class Template Reference

Present existing arrays as compressed array based sparse matrix. This class provides CRS / CCS storage layout. More...

#include <sparse_view.hpp>

Inheritance diagram for boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >:
Collaboration diagram for boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >:

List of all members.

Classes

class  const_iterator1
class  const_iterator2

Public Types

typedef vector_view_traits< JA >
::size_type 
array_size_type
typedef matrix_reference
< self_type
closure_type
typedef const matrix_reference
< const self_type
const_closure_type
typedef const value_typeconst_reference
typedef reverse_iterator_base1
< const_iterator1
const_reverse_iterator1
typedef reverse_iterator_base2
< const_iterator2
const_reverse_iterator2
typedef vector_view_traits< JA >
::difference_type 
difference_type
typedef compressed_matrix_view
< L, IB, IA, JA, TA > 
expression_type
typedef JA index_array_type
typedef boost::remove_cv
< typename vector_view_traits
< JA >::value_type >::type 
index_type
typedef L::orientation_category orientation_category
typedef IA rowptr_array_type
typedef index_type size_type
typedef sparse_tag storage_category
typedef matrix_tag type_category
typedef TA value_array_type
typedef vector_view_traits< TA >
::value_type 
value_type

Public Member Functions

BOOST_UBLAS_INLINE compressed_matrix_view (index_type n_rows, index_type n_cols, array_size_type nnz, const rowptr_array_type &iptr, const index_array_type &jptr, const value_array_type &values)
BOOST_UBLAS_INLINE compressed_matrix_view (const compressed_matrix_view &o)
BOOST_UBLAS_INLINE
expression_type
operator() ()
value_type operator() (index_type i, index_type j) const
 return value at position (i,j)
BOOST_UBLAS_INLINE const
expression_type
operator() () const
index_type size1 () const
 return the number of rows
index_type size2 () const
 return the number of columns

Static Public Attributes

static const unsigned complexity

Private Types

typedef const value_typeconst_pointer
typedef vector_view_traits
< index_array_type >
::const_iterator 
const_subiterator_type
typedef L layout_type
typedef value_typepointer
typedef compressed_matrix_view
< L, IB, IA, JA, TA > 
self_type
typedef value_typetrue_reference

Private Member Functions

BOOST_UBLAS_INLINE compressed_matrix_view ()
 private default constructor because data must be filled by caller
const_pointer find_element (index_type i, index_type j) const
const_subiterator_type find_index_in_row (const_subiterator_type it_start, const_subiterator_type it_end, index_type index) const
void storage_invariants () const

Static Private Member Functions

static BOOST_UBLAS_INLINE
index_type 
k_based (index_type zero_based_index)
static BOOST_UBLAS_INLINE
index_type 
zero_based (index_type k_based_index)

Private Attributes

const rowptr_array_typeindex1_data_
const index_array_typeindex2_data_
array_size_type nnz_
index_type size1_
index_type size2_
const value_array_typevalue_data_

Static Private Attributes

static const value_type zero_ = value_type()

Friends

class const_iterator1
class const_iterator2
class iterator1
class iterator2

Detailed Description

template<class L, std::size_t IB, class IA, class JA, class TA>
class boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >

Present existing arrays as compressed array based sparse matrix. This class provides CRS / CCS storage layout.

see also http://www.netlib.org/utk/papers/templates/node90.html

Parameters:
Llayout type, either row_major or column_major
IBindex base, use 0 for C indexing and 1 for FORTRAN indexing of the internal index arrays. This does not affect the operator()(int,int) where the first row/column has always index 0.
IAindex array type, e.g., int[]
TAvalue array type, e.g., double[]

Definition at line 116 of file sparse_view.hpp.


Member Typedef Documentation

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef vector_view_traits<TA>::value_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::value_type

Definition at line 120 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef value_type& boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::true_reference [private]

Definition at line 123 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef value_type* boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::pointer [private]

Definition at line 124 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef const value_type* boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_pointer [private]

Definition at line 125 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef L boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::layout_type [private]

Definition at line 126 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef compressed_matrix_view<L, IB, IA, JA, TA> boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::self_type [private]
template<class L, std::size_t IB, class IA, class JA, class TA>
typedef boost::remove_cv<typename vector_view_traits<JA>::value_type>::type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::index_type

Definition at line 135 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::size_type

Definition at line 137 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef vector_view_traits<JA>::size_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::array_size_type

Definition at line 139 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef vector_view_traits<JA>::difference_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::difference_type

Definition at line 140 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef const value_type& boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_reference

Definition at line 141 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef IA boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::rowptr_array_type

Definition at line 146 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef JA boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::index_array_type

Definition at line 147 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef TA boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::value_array_type

Definition at line 148 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef const matrix_reference<const self_type> boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_closure_type

Definition at line 149 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef matrix_reference<self_type> boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::closure_type

Definition at line 150 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef sparse_tag boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::storage_category

Definition at line 158 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef L::orientation_category boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::orientation_category

Definition at line 159 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef vector_view_traits<index_array_type>::const_iterator boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_subiterator_type [private]

Definition at line 166 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef reverse_iterator_base1<const_iterator1> boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_reverse_iterator1

Definition at line 207 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
typedef reverse_iterator_base2<const_iterator2> boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::const_reverse_iterator2

Definition at line 208 of file sparse_view.hpp.

Definition at line 314 of file expression_types.hpp.


Constructor & Destructor Documentation

template<class L, std::size_t IB, class IA, class JA, class TA>
BOOST_UBLAS_INLINE boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::compressed_matrix_view ( ) [inline, private]

private default constructor because data must be filled by caller

Definition at line 174 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
BOOST_UBLAS_INLINE boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::compressed_matrix_view ( index_type  n_rows,
index_type  n_cols,
array_size_type  nnz,
const rowptr_array_type iptr,
const index_array_type jptr,
const value_array_type values 
) [inline]

Definition at line 178 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
BOOST_UBLAS_INLINE boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::compressed_matrix_view ( const compressed_matrix_view< L, IB, IA, JA, TA > &  o) [inline]

Definition at line 192 of file sparse_view.hpp.


Member Function Documentation

template<class L, std::size_t IB, class IA, class JA, class TA>
index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::size1 ( ) const [inline]

return the number of rows

Definition at line 215 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::size2 ( ) const [inline]

return the number of columns

Definition at line 220 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
value_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::operator() ( index_type  i,
index_type  j 
) const [inline]

return value at position (i,j)

Definition at line 225 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const_pointer boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::find_element ( index_type  i,
index_type  j 
) const [inline, private]

Definition at line 240 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const_subiterator_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::find_index_in_row ( const_subiterator_type  it_start,
const_subiterator_type  it_end,
index_type  index 
) const [inline, private]

Definition at line 256 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
void boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::storage_invariants ( ) const [inline, private]

Definition at line 266 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
static BOOST_UBLAS_INLINE index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::zero_based ( index_type  k_based_index) [inline, static, private]

Definition at line 282 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
static BOOST_UBLAS_INLINE index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::k_based ( index_type  zero_based_index) [inline, static, private]

Definition at line 286 of file sparse_view.hpp.

BOOST_UBLAS_INLINE const expression_type& boost::numeric::ublas::matrix_expression< compressed_matrix_view< L, IB, IA, JA, TA > >::operator() ( ) const [inline, inherited]

Definition at line 320 of file expression_types.hpp.

BOOST_UBLAS_INLINE expression_type& boost::numeric::ublas::matrix_expression< compressed_matrix_view< L, IB, IA, JA, TA > >::operator() ( ) [inline, inherited]

Definition at line 324 of file expression_types.hpp.


Friends And Related Function Documentation

template<class L, std::size_t IB, class IA, class JA, class TA>
friend class iterator1 [friend]

Definition at line 290 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
friend class iterator2 [friend]

Definition at line 291 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
friend class const_iterator1 [friend]

Definition at line 292 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
friend class const_iterator2 [friend]

Definition at line 293 of file sparse_view.hpp.


Member Data Documentation

template<class L, std::size_t IB, class IA, class JA, class TA>
index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::size1_ [private]

Definition at line 270 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
index_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::size2_ [private]

Definition at line 271 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
array_size_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::nnz_ [private]

Definition at line 273 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const rowptr_array_type& boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::index1_data_ [private]

Definition at line 275 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const index_array_type& boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::index2_data_ [private]

Definition at line 276 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const value_array_type& boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::value_data_ [private]

Definition at line 277 of file sparse_view.hpp.

template<class L, std::size_t IB, class IA, class JA, class TA>
const compressed_matrix_view< L, IB, IA, JA, TA >::value_type boost::numeric::ublas::compressed_matrix_view< L, IB, IA, JA, TA >::zero_ = value_type() [static, private]

Definition at line 279 of file sparse_view.hpp.

const unsigned boost::numeric::ublas::matrix_expression< compressed_matrix_view< L, IB, IA, JA, TA > >::complexity [static, inherited]

Definition at line 312 of file expression_types.hpp.


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