Index map based sparse matrix of values of type T
.
More...
#include <matrix_sparse.hpp>
Classes | |
class | const_iterator1 |
class | const_iterator2 |
class | iterator1 |
class | iterator2 |
Public Types | |
typedef A::size_type | size_type |
typedef A::difference_type | difference_type |
typedef T | value_type |
typedef A | array_type |
typedef const T & | const_reference |
typedef detail::map_traits< A, T >::reference | reference |
typedef const matrix_reference < const self_type > | const_closure_type |
typedef matrix_reference < self_type > | closure_type |
typedef mapped_vector< T, A > | vector_temporary_type |
typedef self_type | matrix_temporary_type |
typedef sparse_tag | storage_category |
typedef L::orientation_category | orientation_category |
typedef reverse_iterator_base1 < const_iterator1 > | const_reverse_iterator1 |
typedef reverse_iterator_base1 < iterator1 > | reverse_iterator1 |
typedef reverse_iterator_base2 < const_iterator2 > | const_reverse_iterator2 |
typedef reverse_iterator_base2 < iterator2 > | reverse_iterator2 |
typedef mapped_matrix< T, L, A > | container_type |
typedef matrix_tag | type_category |
typedef E | expression_type |
Public Member Functions | |
BOOST_UBLAS_INLINE | mapped_matrix () |
BOOST_UBLAS_INLINE | mapped_matrix (size_type size1, size_type size2, size_type non_zeros=0) |
BOOST_UBLAS_INLINE | mapped_matrix (const mapped_matrix &m) |
template<class AE > | |
BOOST_UBLAS_INLINE | mapped_matrix (const matrix_expression< AE > &ae, size_type non_zeros=0) |
BOOST_UBLAS_INLINE size_type | size1 () const |
BOOST_UBLAS_INLINE size_type | size2 () const |
BOOST_UBLAS_INLINE size_type | nnz_capacity () const |
BOOST_UBLAS_INLINE size_type | nnz () const |
BOOST_UBLAS_INLINE const array_type & | data () const |
BOOST_UBLAS_INLINE array_type & | data () |
BOOST_UBLAS_INLINE void | resize (size_type size1, size_type size2, bool preserve=true) |
BOOST_UBLAS_INLINE void | reserve (size_type non_zeros, bool preserve=true) |
BOOST_UBLAS_INLINE pointer | find_element (size_type i, size_type j) |
BOOST_UBLAS_INLINE const_pointer | find_element (size_type i, size_type j) const |
BOOST_UBLAS_INLINE const_reference | operator() (size_type i, size_type j) const |
BOOST_UBLAS_INLINE reference | operator() (size_type i, size_type j) |
BOOST_UBLAS_INLINE true_reference | insert_element (size_type i, size_type j, const_reference t) |
BOOST_UBLAS_INLINE void | erase_element (size_type i, size_type j) |
BOOST_UBLAS_INLINE void | clear () |
BOOST_UBLAS_INLINE mapped_matrix & | operator= (const mapped_matrix &m) |
template<class C > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator= (const matrix_container< C > &m) |
BOOST_UBLAS_INLINE mapped_matrix & | assign_temporary (mapped_matrix &m) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator= (const matrix_expression< AE > &ae) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | assign (const matrix_expression< AE > &ae) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator+= (const matrix_expression< AE > &ae) |
template<class C > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator+= (const matrix_container< C > &m) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | plus_assign (const matrix_expression< AE > &ae) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator-= (const matrix_expression< AE > &ae) |
template<class C > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator-= (const matrix_container< C > &m) |
template<class AE > | |
BOOST_UBLAS_INLINE mapped_matrix & | minus_assign (const matrix_expression< AE > &ae) |
template<class AT > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator*= (const AT &at) |
template<class AT > | |
BOOST_UBLAS_INLINE mapped_matrix & | operator/= (const AT &at) |
BOOST_UBLAS_INLINE void | swap (mapped_matrix &m) |
const_iterator1 | find1 (int rank, size_type i, size_type j, int direction=1) const |
iterator1 | find1 (int rank, size_type i, size_type j, int direction=1) |
const_iterator2 | find2 (int rank, size_type i, size_type j, int direction=1) const |
iterator2 | find2 (int rank, size_type i, size_type j, int direction=1) |
BOOST_UBLAS_INLINE const_iterator1 | begin1 () const |
BOOST_UBLAS_INLINE const_iterator1 | cbegin1 () const |
BOOST_UBLAS_INLINE const_iterator1 | end1 () const |
BOOST_UBLAS_INLINE const_iterator1 | cend1 () const |
BOOST_UBLAS_INLINE iterator1 | begin1 () |
BOOST_UBLAS_INLINE iterator1 | end1 () |
BOOST_UBLAS_INLINE const_iterator2 | begin2 () const |
BOOST_UBLAS_INLINE const_iterator2 | cbegin2 () const |
BOOST_UBLAS_INLINE const_iterator2 | end2 () const |
BOOST_UBLAS_INLINE const_iterator2 | cend2 () const |
BOOST_UBLAS_INLINE iterator2 | begin2 () |
BOOST_UBLAS_INLINE iterator2 | end2 () |
BOOST_UBLAS_INLINE const_reverse_iterator1 | rbegin1 () const |
BOOST_UBLAS_INLINE const_reverse_iterator1 | crbegin1 () const |
BOOST_UBLAS_INLINE const_reverse_iterator1 | rend1 () const |
BOOST_UBLAS_INLINE const_reverse_iterator1 | crend1 () const |
BOOST_UBLAS_INLINE reverse_iterator1 | rbegin1 () |
BOOST_UBLAS_INLINE reverse_iterator1 | rend1 () |
BOOST_UBLAS_INLINE const_reverse_iterator2 | rbegin2 () const |
BOOST_UBLAS_INLINE const_reverse_iterator2 | crbegin2 () const |
BOOST_UBLAS_INLINE const_reverse_iterator2 | rend2 () const |
BOOST_UBLAS_INLINE const_reverse_iterator2 | crend2 () const |
BOOST_UBLAS_INLINE reverse_iterator2 | rbegin2 () |
BOOST_UBLAS_INLINE reverse_iterator2 | rend2 () |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
BOOST_UBLAS_INLINE const container_type & | operator() () const |
BOOST_UBLAS_INLINE container_type & | operator() () |
Static Public Attributes | |
static const unsigned | complexity |
Friends | |
BOOST_UBLAS_INLINE friend void | swap (mapped_matrix &m1, mapped_matrix &m2) |
Index map based sparse matrix of values of type T
.
This class represents a matrix by using a key
to value mapping. The default type is
So, by default a STL map container is used to associate keys and values. The key is computed depending on the layout type L
as
which means
for a row major matrix. Limitations: The matrix size must not exceed
. The find1() and find2() operations have a complexity of at least , depending on the efficiency of std::lower_bound
on the key set of the map. Orientation and storage can also be specified, otherwise a row major orientation is used. It is not required by the storage to initialize elements of the matrix. By default, the orientation is row_major
.
T | the type of object stored in the matrix (like double, float, complex, etc...) |
L | the storage organization. It can be either row_major or column_major . By default it is row_major |
typedef A boost::numeric::ublas::mapped_matrix< T, L, A >::array_type |
typedef matrix_reference<self_type> boost::numeric::ublas::mapped_matrix< T, L, A >::closure_type |
typedef const matrix_reference<const self_type> boost::numeric::ublas::mapped_matrix< T, L, A >::const_closure_type |
typedef const T& boost::numeric::ublas::mapped_matrix< T, L, A >::const_reference |
typedef reverse_iterator_base1<const_iterator1> boost::numeric::ublas::mapped_matrix< T, L, A >::const_reverse_iterator1 |
typedef reverse_iterator_base2<const_iterator2> boost::numeric::ublas::mapped_matrix< T, L, A >::const_reverse_iterator2 |
|
inherited |
typedef A::difference_type boost::numeric::ublas::mapped_matrix< T, L, A >::difference_type |
|
inherited |
typedef self_type boost::numeric::ublas::mapped_matrix< T, L, A >::matrix_temporary_type |
typedef L::orientation_category boost::numeric::ublas::mapped_matrix< T, L, A >::orientation_category |
typedef detail::map_traits<A, T>::reference boost::numeric::ublas::mapped_matrix< T, L, A >::reference |
typedef reverse_iterator_base1<iterator1> boost::numeric::ublas::mapped_matrix< T, L, A >::reverse_iterator1 |
typedef reverse_iterator_base2<iterator2> boost::numeric::ublas::mapped_matrix< T, L, A >::reverse_iterator2 |
typedef A::size_type boost::numeric::ublas::mapped_matrix< T, L, A >::size_type |
typedef sparse_tag boost::numeric::ublas::mapped_matrix< T, L, A >::storage_category |
|
inherited |
typedef T boost::numeric::ublas::mapped_matrix< T, L, A >::value_type |
typedef mapped_vector<T, A> boost::numeric::ublas::mapped_matrix< T, L, A >::vector_temporary_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::operator=().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::clear(), boost::numeric::ublas::mapped_matrix< T, L, A >::erase_element(), boost::numeric::ublas::mapped_matrix< T, L, A >::find1(), boost::numeric::ublas::mapped_matrix< T, L, A >::find2(), boost::numeric::ublas::mapped_matrix< T, L, A >::find_element(), boost::numeric::ublas::mapped_matrix< T, L, A >::insert_element(), boost::numeric::ublas::mapped_matrix< T, L, A >::mapped_matrix(), boost::numeric::ublas::mapped_matrix< T, L, A >::nnz(), boost::numeric::ublas::mapped_matrix< T, L, A >::nnz_capacity(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator()(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator+=(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator-=(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator=(), boost::numeric::ublas::mapped_matrix< T, L, A >::reserve(), boost::numeric::ublas::mapped_matrix< T, L, A >::resize(), and boost::numeric::ublas::mapped_matrix< T, L, A >::swap().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References boost::numeric::ublas::mapped_matrix< T, L, A >::data(), boost::numeric::ublas::end(), boost::multiprecision::backends::i, boost::it, and boost::numeric::ublas::detail::lower_bound().
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::begin1(), boost::numeric::ublas::mapped_matrix< T, L, A >::end1(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::operator++(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::operator++(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::operator--(), and boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::operator--().
|
inline |
|
inline |
References boost::numeric::ublas::mapped_matrix< T, L, A >::data(), boost::numeric::ublas::end(), boost::it, and boost::numeric::ublas::detail::lower_bound().
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::begin2(), boost::numeric::ublas::mapped_matrix< T, L, A >::end2(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::operator++(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::operator++(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::operator--(), and boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::operator--().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inline |
References boost::xpressive::at.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References boost::xpressive::at.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::index1(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator=(), and boost::numeric::ublas::mapped_matrix< T, L, A >::resize().
|
inline |
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::index2(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator1::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator1::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::const_iterator2::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::iterator2::operator*(), boost::numeric::ublas::mapped_matrix< T, L, A >::operator=(), and boost::numeric::ublas::mapped_matrix< T, L, A >::resize().
|
inline |
References boost::numeric::ublas::mapped_matrix< T, L, A >::data(), and boost::swap.
Referenced by boost::numeric::ublas::mapped_matrix< T, L, A >::assign_temporary().
|
friend |
|
staticinherited |