3 #include <boost/numeric/ublas/matrix_expression.hpp>
4 #include <boost/numeric/ublas/detail/iterator.hpp>
16 class matrix_permuted:
public boost::numeric::ublas::matrix_expression <matrix_permuted <M> >
25 typedef typename boost::mpl::if_ <boost::is_const <M>,
typename M::const_reference,
typename M::reference>::type
reference;
26 typedef typename boost::mpl::if_ <boost::is_const <M>,
typename M::const_closure_type,
typename M::closure_type>::type
matrix_closure_type;
47 _data(matrix), _perm1(matrix.
size1()), _perm2(matrix.
size2())
116 return _data(_perm1(i), _perm2(j));
129 return _data(_perm1(i), _perm2(j));
150 typedef boost::numeric::ublas::detail::indexed_iterator1 <self_type, typename matrix_type::iterator1::iterator_category>
iterator1;
151 typedef boost::numeric::ublas::detail::indexed_iterator2 <self_type, typename matrix_type::iterator2::iterator_category>
iterator2;
152 typedef boost::numeric::ublas::detail::indexed_const_iterator1 <self_type, typename matrix_type::const_iterator1::iterator_category>
154 typedef boost::numeric::ublas::detail::indexed_const_iterator2 <self_type, typename matrix_type::const_iterator2::iterator_category>
167 template <
typename MatrixType>
170 matrix(row, column) = value;
177 template <
typename MatrixType>
195 template <
typename MatrixType>
209 template <
typename MatrixType>
223 template <
typename MatrixType>
229 template <
typename MatrixType>
232 return matrix.
perm1();
235 template <
typename MatrixType>
238 return matrix.
perm2();
241 template <
typename MatrixType>
247 template <
typename MatrixType>
253 template <
typename MatrixType>
259 template <
typename MatrixType>
265 template <
typename MatrixType>
271 template <
typename MatrixType>
Definition: matrix_permuted.hpp:17
permutation_type & perm2()
Definition: matrix_permuted.hpp:101
const permutation_type & perm2() const
Definition: matrix_permuted.hpp:92
const_reference operator()(size_type i, size_type j) const
Definition: matrix_permuted.hpp:114
matrix_permuted(matrix_type &matrix)
Definition: matrix_permuted.hpp:46
const self_type const_closure_type
Definition: matrix_permuted.hpp:27
const permutation_type & perm1() const
Definition: matrix_permuted.hpp:74
matrix_type & data()
Definition: matrix_permuted.hpp:136
boost::numeric::ublas::detail::indexed_const_iterator1< self_type, typename matrix_type::const_iterator1::iterator_category > const_iterator1
Definition: matrix_permuted.hpp:153
boost::numeric::ublas::detail::indexed_iterator1< self_type, typename matrix_type::iterator1::iterator_category > iterator1
Definition: matrix_permuted.hpp:150
M::difference_type difference_type
Definition: matrix_permuted.hpp:22
M matrix_type
Definition: matrix_permuted.hpp:20
matrix_permuted< M > self_type
Definition: matrix_permuted.hpp:19
M::orientation_category orientation_category
Definition: matrix_permuted.hpp:30
M::value_type value_type
Definition: matrix_permuted.hpp:23
M::storage_category storage_category
Definition: matrix_permuted.hpp:31
boost::numeric::ublas::detail::indexed_iterator2< self_type, typename matrix_type::iterator2::iterator_category > iterator2
Definition: matrix_permuted.hpp:151
self_type closure_type
Definition: matrix_permuted.hpp:28
permutation_type & perm1()
Definition: matrix_permuted.hpp:83
M::size_type size_type
Definition: matrix_permuted.hpp:21
size_type size2() const
Definition: matrix_permuted.hpp:65
size_type size1() const
Definition: matrix_permuted.hpp:56
boost::mpl::if_< boost::is_const< M >, typename M::const_closure_type, typename M::closure_type >::type matrix_closure_type
Definition: matrix_permuted.hpp:26
boost::mpl::if_< boost::is_const< M >, typename M::const_reference, typename M::reference >::type reference
Definition: matrix_permuted.hpp:25
boost::numeric::ublas::detail::indexed_const_iterator2< self_type, typename matrix_type::const_iterator2::iterator_category > const_iterator2
Definition: matrix_permuted.hpp:155
permutation permutation_type
Definition: matrix_permuted.hpp:29
const matrix_type & data() const
Definition: matrix_permuted.hpp:145
M::const_reference const_reference
Definition: matrix_permuted.hpp:24
Definition: matrix_transposed.hpp:47
matrix_type & data()
Definition: matrix_transposed.hpp:101
Definition: permutations.hpp:44
void swap(value_type a, value_type b)
Definition: permutations.hpp:187
size_type size() const
Definition: permutations.hpp:150
#define CMR_UNUSED(x)
Definition: env.h:24
Definition: algorithm.hpp:14
permutation matrix_get_perm2(matrix_permuted< MatrixType > &matrix)
Definition: matrix_permuted.hpp:236
permutation matrix_get_perm1(matrix_permuted< MatrixType > &matrix)
Definition: matrix_permuted.hpp:230
void matrix_permute1(MatrixType &matrix, size_t index1, size_t index2)
Definition: matrix.hpp:1723
void matrix_set_perm1(matrix_permuted< MatrixType > &matrix, const permutation &permutation)
Definition: matrix_permuted.hpp:254
void matrix_set_value(matrix_permuted< MatrixType > &matrix, size_t row, size_t column, typename MatrixType::value_type value)
Definition: matrix_permuted.hpp:168
void matrix_set_perm2(matrix_permuted< MatrixType > &matrix, const permutation &permutation)
Definition: matrix_permuted.hpp:260
void matrix_binary_pivot(matrix_permuted< MatrixType > &matrix, size_t i, size_t j)
Definition: matrix_permuted.hpp:224
void matrix_permute2(MatrixType &matrix, size_t index1, size_t index2)
Definition: matrix.hpp:1740