mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-23 16:12:09 +00:00
Big improvement to type encapsulation
iterator_type, expersion_type, functo_type etc private svn path=/trunk/boost/boost/numeric/ublas/; revision=24769
This commit is contained in:
@@ -43,19 +43,19 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef F functor_type;
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef const matrix<T, F, A> const_self_type;
|
||||
typedef matrix<T, F, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
// This could be better for performance,
|
||||
// typedef typename unknown_orientation_tag orientation_category;
|
||||
@@ -264,6 +264,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
std::fill (data ().begin (), data ().end (), value_type ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use the storage array iterator
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_iterator1<self_type, dense_random_access_iterator_tag> iterator1;
|
||||
typedef indexed_iterator2<self_type, dense_random_access_iterator_tag> iterator2;
|
||||
@@ -321,7 +328,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
@@ -986,21 +992,19 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef F functor_type;
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef const vector_of_vector<T, F, A> const_self_type;
|
||||
typedef vector_of_vector<T, F, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::iterator iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
// This could be better for performance,
|
||||
// typedef typename unknown_orientation_tag orientation_category;
|
||||
@@ -1191,6 +1195,14 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
std::fill (data () [k].begin (), data () [k].end (), value_type ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use the vector iterator
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::iterator iterator_type;
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_iterator1<self_type, dense_random_access_iterator_tag> iterator1;
|
||||
typedef indexed_iterator2<self_type, dense_random_access_iterator_tag> iterator2;
|
||||
@@ -1248,7 +1260,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
@@ -1947,15 +1958,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const identity_matrix<T> const_self_type;
|
||||
typedef identity_matrix<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef size_type const_iterator_type;
|
||||
typedef packed_tag storage_category;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
|
||||
@@ -2033,6 +2045,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<self_type, packed_random_access_iterator_tag> iterator1;
|
||||
typedef indexed_const_iterator2<self_type, packed_random_access_iterator_tag> iterator2;
|
||||
@@ -2068,7 +2086,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator2 (*this, i, j);
|
||||
}
|
||||
|
||||
// Iterators simply are indices.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
@@ -2409,15 +2426,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const zero_matrix<T> const_self_type;
|
||||
typedef zero_matrix<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef size_type const_iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
|
||||
@@ -2495,6 +2513,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<self_type, sparse_bidirectional_iterator_tag> iterator1;
|
||||
typedef indexed_const_iterator2<self_type, sparse_bidirectional_iterator_tag> iterator2;
|
||||
@@ -2526,7 +2549,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator2 (*this, i, j);
|
||||
}
|
||||
|
||||
// Iterators simply are indices.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
@@ -2857,14 +2879,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const scalar_matrix<T> const_self_type;
|
||||
typedef scalar_matrix<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef size_type const_iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
|
||||
@@ -2935,6 +2958,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<self_type, dense_random_access_iterator_tag> iterator1;
|
||||
typedef indexed_const_iterator2<self_type, dense_random_access_iterator_tag> iterator2;
|
||||
@@ -2962,7 +2991,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator2 (*this, i, j);
|
||||
}
|
||||
|
||||
// Iterators simply are indices.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
@@ -3295,16 +3323,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const c_matrix<T, N, M> const_self_type;
|
||||
typedef c_matrix<T, N, M> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef const T *const_iterator_type;
|
||||
typedef T *iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
// This could be better for performance,
|
||||
// typedef typename unknown_orientation_tag orientation_category;
|
||||
@@ -3523,6 +3551,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
std::fill (data_ [i], data_ [i] + size2_, value_type ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use pointers for iterator
|
||||
typedef const T *const_iterator_type;
|
||||
typedef T *iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_iterator1<self_type, dense_random_access_iterator_tag> iterator1;
|
||||
typedef indexed_iterator2<self_type, dense_random_access_iterator_tag> iterator2;
|
||||
@@ -3580,7 +3615,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
|
||||
@@ -201,7 +201,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_const_reference<E> >::operator ();
|
||||
#endif
|
||||
typedef E expression_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename E::value_type value_type;
|
||||
@@ -209,9 +208,10 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef typename E::const_pointer const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E expression_type;
|
||||
public:
|
||||
typedef typename E::orientation_category orientation_category;
|
||||
typedef typename E::const_iterator1 const_iterator1_type;
|
||||
typedef typename E::const_iterator2 const_iterator2_type;
|
||||
typedef typename E::storage_category storage_category;
|
||||
typedef typename E::simd_category simd_category;
|
||||
|
||||
@@ -249,9 +249,10 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return &(*this).e_ == &mr.e_;
|
||||
}
|
||||
|
||||
typedef const_iterator1_type const_iterator1;
|
||||
// Iterator types
|
||||
typedef typename E::const_iterator1 const_iterator1;
|
||||
typedef const_iterator1 iterator1;
|
||||
typedef const_iterator2_type const_iterator2;
|
||||
typedef typename E::const_iterator2 const_iterator2;
|
||||
typedef const_iterator2 iterator2;
|
||||
|
||||
// Element lookup
|
||||
@@ -344,7 +345,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_reference<E> >::operator ();
|
||||
#endif
|
||||
typedef E expression_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename E::value_type value_type;
|
||||
@@ -363,26 +363,14 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typename E::const_pointer,
|
||||
typename E::pointer>::type pointer;
|
||||
#endif
|
||||
private:
|
||||
typedef E expression_type;
|
||||
typedef const matrix_reference<E> const_self_type;
|
||||
typedef matrix_reference<E> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E::orientation_category orientation_category;
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef typename E::const_iterator1 const_iterator1_type;
|
||||
typedef typename E::iterator1 iterator1_type;
|
||||
typedef typename E::const_iterator2 const_iterator2_type;
|
||||
typedef typename E::iterator2 iterator2_type;
|
||||
#else
|
||||
typedef typename E::const_iterator1 const_iterator1_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator1,
|
||||
typename E::iterator1>::type iterator1_type;
|
||||
typedef typename E::const_iterator2 const_iterator2_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator2,
|
||||
typename E::iterator2>::type iterator2_type;
|
||||
#endif
|
||||
typedef typename E::storage_category storage_category;
|
||||
typedef typename E::simd_category simd_category;
|
||||
|
||||
@@ -491,10 +479,22 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return &(*this).e_ == &mr.e_;
|
||||
}
|
||||
|
||||
typedef const_iterator1_type const_iterator1;
|
||||
typedef iterator1_type iterator1;
|
||||
typedef const_iterator2_type const_iterator2;
|
||||
typedef iterator2_type iterator2;
|
||||
// Iterator types
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef typename E::const_iterator1 const_iterator1;
|
||||
typedef typename E::iterator1 iterator1;
|
||||
typedef typename E::const_iterator2 const_iterator2;
|
||||
typedef typename E::iterator2 iterator2;
|
||||
#else
|
||||
typedef typename E::const_iterator1 const_iterator1;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator1,
|
||||
typename E::iterator1>::type iterator1;
|
||||
typedef typename E::const_iterator2 const_iterator2;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator2,
|
||||
typename E::iterator2>::type iterator2;
|
||||
#endif
|
||||
|
||||
// Element lookup
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -629,8 +629,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<vector_matrix_binary<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
@@ -639,15 +637,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const vector_matrix_binary<E1, E2, F> const_self_type;
|
||||
typedef vector_matrix_binary<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -689,6 +689,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (vmb.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef typename iterator_restrict_traits<typename const_iterator1_type::iterator_category,
|
||||
typename const_iterator2_type::iterator_category>::iterator_category iterator_category;
|
||||
@@ -1148,8 +1154,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_unary1<E, F> >::operator ();
|
||||
#endif
|
||||
typedef E expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -1157,14 +1161,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E::const_closure_type expression_closure_type;
|
||||
typedef const matrix_unary1<E, F> const_self_type;
|
||||
typedef matrix_unary1<E, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E::orientation_category orientation_category;
|
||||
typedef typename E::const_iterator1 const_iterator1_type;
|
||||
typedef typename E::const_iterator2 const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1201,6 +1207,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return (*this).expression ().same_closure (mu1.expression ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E::const_iterator1 const_iterator1_type;
|
||||
typedef typename E::const_iterator2 const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<const_closure_type, typename const_iterator1_type::iterator_category> const_iterator1;
|
||||
typedef const_iterator1 iterator1;
|
||||
@@ -1598,27 +1610,28 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_unary2<E, F> >::operator ();
|
||||
#endif
|
||||
// typedef E expression_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_same<F,
|
||||
scalar_identity<typename E::value_type> >::value,
|
||||
E,
|
||||
const E>::type expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
typedef value_type const_reference;
|
||||
typedef typename boost::mpl::if_c<boost::is_same<functor_type,
|
||||
typedef typename boost::mpl::if_c<boost::is_same<F,
|
||||
scalar_identity<value_type> >::value,
|
||||
typename E::reference,
|
||||
value_type>::type reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef typename boost::mpl::if_c<boost::is_same<F,
|
||||
scalar_identity<typename E::value_type> >::value,
|
||||
E,
|
||||
const E>::type expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<expression_type>::value,
|
||||
typename E::const_closure_type,
|
||||
typename E::closure_type>::type expression_closure_type;
|
||||
typedef const matrix_unary2<E, F> const_self_type;
|
||||
typedef matrix_unary2<E, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef self_type closure_type;
|
||||
// typedef typename E::orientation_category orientation_category;
|
||||
@@ -1629,8 +1642,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
column_major_tag>::value,
|
||||
row_major_tag,
|
||||
typename E::orientation_category>::type>::type orientation_category;
|
||||
typedef typename E::const_iterator1 const_iterator2_type;
|
||||
typedef typename E::const_iterator2 const_iterator1_type;
|
||||
// typedef unknown_storage_tag storage_category;
|
||||
typedef typename E::storage_category storage_category;
|
||||
|
||||
@@ -1674,6 +1685,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return (*this).expression ().same_closure (mu2.expression ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E::const_iterator1 const_iterator2_type;
|
||||
typedef typename E::const_iterator2 const_iterator1_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<const_closure_type, typename const_iterator1_type::iterator_category> const_iterator1;
|
||||
typedef const_iterator1 iterator1;
|
||||
@@ -2061,9 +2078,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_binary<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -2071,17 +2085,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const matrix_binary<E1, E2, F> const_self_type;
|
||||
typedef matrix_binary<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -2123,6 +2138,14 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mb.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef typename iterator_restrict_traits<typename const_iterator11_type::iterator_category,
|
||||
typename const_iterator21_type::iterator_category>::iterator_category iterator_category1;
|
||||
@@ -2805,9 +2828,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_binary_scalar1<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E2::size_type size_type;
|
||||
typedef typename E2::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -2815,16 +2835,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef E1 expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const matrix_binary_scalar1<E1, E2, F> const_self_type;
|
||||
typedef matrix_binary_scalar1<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E2::orientation_category orientation_category;
|
||||
typedef typename E1::value_type const_iterator1_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -2866,6 +2888,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mbs1.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::value_type const_iterator1_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<const_closure_type, typename const_iterator21_type::iterator_category> const_iterator1;
|
||||
typedef const_iterator1 iterator1;
|
||||
@@ -3254,9 +3283,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_binary_scalar2<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::size_type size_type;
|
||||
typedef typename E1::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -3264,16 +3290,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef E2 expression2_closure_type;
|
||||
typedef const matrix_binary_scalar2<E1, E2, F> const_self_type;
|
||||
typedef matrix_binary_scalar2<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::orientation_category orientation_category;
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::value_type const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -3315,6 +3343,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mbs2.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::value_type const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator1<const_closure_type, typename const_iterator11_type::iterator_category> const_iterator1;
|
||||
typedef const_iterator1 iterator1;
|
||||
@@ -3714,9 +3749,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
BOOST_UBLAS_USING vector_expression<matrix_vector_binary1<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT (int, complexity = 1);
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -3724,14 +3756,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const matrix_vector_binary1<E1, E2, F> const_self_type;
|
||||
typedef matrix_vector_binary1<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::const_iterator1 const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -3769,6 +3804,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mvb1.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator1 const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<const_closure_type, typename const_iterator1_type::iterator_category> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
@@ -3788,7 +3829,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterator simply is a pointer.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator:
|
||||
@@ -4108,9 +4148,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
BOOST_UBLAS_USING vector_expression<matrix_vector_binary2<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT (int, complexity = 1);
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -4118,14 +4155,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const matrix_vector_binary2<E1, E2, F> const_self_type;
|
||||
typedef matrix_vector_binary2<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator2 const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -4164,6 +4204,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mvb2.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator2 const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<const_closure_type, typename const_iterator2_type::iterator_category> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
@@ -4503,9 +4549,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
BOOST_UBLAS_USING matrix_expression<matrix_matrix_binary<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT (int, complexity = 1);
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -4513,17 +4556,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const matrix_matrix_binary<E1, E2, F> const_self_type;
|
||||
typedef matrix_matrix_binary<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef unknown_orientation_tag orientation_category;
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -4566,6 +4610,14 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (mmb.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator1 const_iterator11_type;
|
||||
typedef typename E1::const_iterator2 const_iterator12_type;
|
||||
typedef typename E2::const_iterator1 const_iterator21_type;
|
||||
typedef typename E2::const_iterator2 const_iterator22_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef typename iterator_restrict_traits<typename const_iterator11_type::iterator_category,
|
||||
typename const_iterator22_type::iterator_category>::iterator_category iterator_category;
|
||||
@@ -4617,7 +4669,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator1:
|
||||
|
||||
@@ -259,19 +259,19 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef F functor_type;
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef const sparse_matrix<T, F, A> const_self_type;
|
||||
typedef sparse_matrix<T, F, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef typename F::orientation_category orientation_category;
|
||||
|
||||
@@ -498,6 +498,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
data ().clear ();
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use a storage iterator
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator1;
|
||||
class iterator1;
|
||||
class const_iterator2;
|
||||
@@ -636,7 +643,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return iterator2 (*this, rank, i, j, it);
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator1:
|
||||
public container_const_reference<sparse_matrix>,
|
||||
@@ -1331,11 +1337,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef F functor_type;
|
||||
typedef const sparse_vector_of_sparse_vector<T, F, A> const_self_type;
|
||||
typedef sparse_vector_of_sparse_vector<T, F, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
@@ -1343,10 +1351,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename A::value_type::second_type vector_data_value_type;
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::second_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::second_type::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef typename F::orientation_category orientation_category;
|
||||
|
||||
@@ -1573,6 +1577,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
data_ [functor_type::size1 (size1_, size2_)] = vector_data_value_type ();
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use storage iterators
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::second_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::second_type::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator1;
|
||||
class iterator1;
|
||||
class const_iterator2;
|
||||
@@ -1747,7 +1760,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator1:
|
||||
public container_const_reference<sparse_vector_of_sparse_vector>,
|
||||
@@ -2513,21 +2525,19 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef IA index_array_type;
|
||||
typedef TA value_array_type;
|
||||
typedef F functor_type;
|
||||
typedef const compressed_matrix<T, F, IB, IA, TA> const_self_type;
|
||||
typedef compressed_matrix<T, F, IB, IA, TA> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename IA::const_iterator vector_const_iterator_type;
|
||||
typedef typename IA::iterator vector_iterator_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef typename F::orientation_category orientation_category;
|
||||
|
||||
@@ -2930,6 +2940,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
index1_data_ [filled1_ - 1] = k_based (filled2_);
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use index array iterator
|
||||
typedef typename IA::const_iterator vector_const_iterator_type;
|
||||
typedef typename IA::iterator vector_iterator_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator1;
|
||||
class iterator1;
|
||||
class const_iterator2;
|
||||
@@ -3112,7 +3131,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator1:
|
||||
public container_const_reference<compressed_matrix>,
|
||||
@@ -3844,21 +3862,19 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef IA index_array_type;
|
||||
typedef TA value_array_type;
|
||||
typedef F functor_type;
|
||||
typedef const coordinate_matrix<T, F, IB, IA, TA> const_self_type;
|
||||
typedef coordinate_matrix<T, F, IB, IA, TA> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const matrix_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename IA::const_iterator vector_const_iterator_type;
|
||||
typedef typename IA::iterator vector_iterator_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef typename F::orientation_category orientation_category;
|
||||
|
||||
@@ -4232,6 +4248,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
filled_ = 0;
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use index array iterator
|
||||
typedef typename IA::const_iterator vector_const_iterator_type;
|
||||
typedef typename IA::iterator vector_iterator_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator1;
|
||||
class iterator1;
|
||||
class const_iterator2;
|
||||
@@ -4418,7 +4443,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator1:
|
||||
public container_const_reference<coordinate_matrix>,
|
||||
|
||||
@@ -921,7 +921,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
// DEPRECATED typedef const value_type *const_pointer;
|
||||
// DEPRECATED typedef value_type *pointer;
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
// Construction and destruction
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -965,8 +964,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return ! (*this == r);
|
||||
}
|
||||
|
||||
// Iterator simply is a index.
|
||||
// Iterator types
|
||||
private:
|
||||
// Use and index
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<range, std::random_access_iterator_tag> const_iterator;
|
||||
#else
|
||||
@@ -1116,7 +1119,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
// DEPRECATED typedef const value_type *const_pointer;
|
||||
// DEPRECATED typedef value_type *pointer;
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
// Construction and destruction
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -1169,8 +1171,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return ! (*this == s);
|
||||
}
|
||||
|
||||
// Iterator simply is a index.
|
||||
// Iterator types
|
||||
private:
|
||||
// Use and index
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<slice, std::random_access_iterator_tag> const_iterator;
|
||||
#else
|
||||
@@ -1322,7 +1328,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef typename A::reference reference;
|
||||
typedef typename A::const_pointer const_pointer;
|
||||
typedef typename A::pointer pointer;
|
||||
typedef difference_type const_iterator_type;
|
||||
|
||||
// Construction and destruction
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -1418,8 +1423,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return ! (*this == ia);
|
||||
}
|
||||
|
||||
// Iterator simply is a index.
|
||||
// Iterator types
|
||||
private:
|
||||
// Use a index difference
|
||||
typedef difference_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<indirect_array, std::random_access_iterator_tag> const_iterator;
|
||||
#else
|
||||
|
||||
@@ -88,18 +88,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef const vector<T, A> const_self_type;
|
||||
typedef vector<T, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
typedef concrete_tag simd_category;
|
||||
|
||||
@@ -290,6 +290,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
std::fill (data ().begin (), data ().end (), value_type ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use the storage array iterator
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_iterator<self_type, dense_random_access_iterator_tag> iterator;
|
||||
typedef indexed_const_iterator<self_type, dense_random_access_iterator_tag> const_iterator;
|
||||
@@ -316,7 +323,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator:
|
||||
@@ -610,15 +616,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const unit_vector<T> const_self_type;
|
||||
typedef unit_vector<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef size_type const_iterator_type;
|
||||
typedef packed_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -690,6 +697,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<self_type, packed_random_access_iterator_tag> iterator;
|
||||
typedef indexed_const_iterator<self_type, packed_random_access_iterator_tag> const_iterator;
|
||||
@@ -705,8 +717,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator (*this, i);
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator:
|
||||
public container_const_reference<unit_vector>,
|
||||
@@ -854,15 +864,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const zero_vector<T> const_self_type;
|
||||
typedef zero_vector<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef size_type const_iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -928,6 +939,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
public:
|
||||
class const_iterator;
|
||||
|
||||
// Element lookup
|
||||
@@ -936,7 +952,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator (*this, i);
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator:
|
||||
public container_const_reference<zero_vector>,
|
||||
@@ -1058,14 +1073,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const scalar_vector<T> const_self_type;
|
||||
typedef scalar_vector<T> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef size_type const_iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1133,6 +1149,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
#endif
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use an index
|
||||
typedef size_type const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<self_type, dense_random_access_iterator_tag> iterator;
|
||||
typedef indexed_const_iterator<self_type, dense_random_access_iterator_tag> const_iterator;
|
||||
@@ -1146,7 +1168,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return const_iterator (*this, i);
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator:
|
||||
@@ -1286,16 +1307,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T &reference;
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef const c_vector<T, N> const_self_type;
|
||||
typedef c_vector<T, N> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef const T *const_iterator_type;
|
||||
typedef T *iterator_type;
|
||||
typedef dense_tag storage_category;
|
||||
typedef concrete_tag simd_category;
|
||||
|
||||
@@ -1487,6 +1508,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
std::fill (data_, data_ + size_, value_type ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use pointers for iterator
|
||||
typedef const T *const_iterator_type;
|
||||
typedef T *iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_iterator<self_type, dense_random_access_iterator_tag> iterator;
|
||||
typedef indexed_const_iterator<self_type, dense_random_access_iterator_tag> const_iterator;
|
||||
@@ -1513,7 +1541,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
#ifndef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
class const_iterator:
|
||||
|
||||
@@ -196,7 +196,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef typename E::const_pointer const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
typedef typename E::const_iterator const_iterator_type;
|
||||
typedef typename E::storage_category storage_category;
|
||||
typedef typename E::simd_category simd_category;
|
||||
|
||||
@@ -235,15 +234,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return &(*this).e_ == &vr.e_;
|
||||
}
|
||||
|
||||
typedef const_iterator_type const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
|
||||
// Element lookup
|
||||
BOOST_UBLAS_INLINE
|
||||
const_iterator find (size_type i) const {
|
||||
return expression ().find (i);
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
typedef typename E::const_iterator const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
|
||||
// Iterator is the iterator of the referenced expression.
|
||||
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -294,7 +294,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING vector_expression<vector_reference<E> >::operator ();
|
||||
#endif
|
||||
typedef E expression_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename E::value_type value_type;
|
||||
@@ -313,19 +312,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typename E::const_pointer,
|
||||
typename E::pointer>::type pointer;
|
||||
#endif
|
||||
private:
|
||||
typedef E expression_type;
|
||||
typedef const vector_reference<E> const_self_type;
|
||||
typedef vector_reference<E> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef typename E::const_iterator const_iterator_type;
|
||||
typedef typename E::iterator iterator_type;
|
||||
#else
|
||||
typedef typename E::const_iterator const_iterator_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator,
|
||||
typename E::iterator>::type iterator_type;
|
||||
#endif
|
||||
typedef typename E::storage_category storage_category;
|
||||
typedef typename E::simd_category simd_category;
|
||||
|
||||
@@ -444,8 +437,16 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return &(*this).e_ == &vr.e_;
|
||||
}
|
||||
|
||||
typedef const_iterator_type const_iterator;
|
||||
typedef iterator_type iterator;
|
||||
// Iterator types
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef typename E::const_iterator const_iterator;
|
||||
typedef typename E::iterator iterator;
|
||||
#else
|
||||
typedef typename E::const_iterator const_iterator;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<E>::value,
|
||||
typename E::const_iterator,
|
||||
typename E::iterator>::type iterator;
|
||||
#endif
|
||||
|
||||
// Element lookup
|
||||
BOOST_UBLAS_INLINE
|
||||
@@ -524,30 +525,30 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING vector_expression<vector_unary<E, F> >::operator ();
|
||||
#endif
|
||||
// typedef E expression_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_same<F,
|
||||
scalar_identity<typename E::value_type> >::value,
|
||||
E,
|
||||
const E>::type expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E::size_type size_type;
|
||||
typedef typename E::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
typedef value_type const_reference;
|
||||
typedef typename boost::mpl::if_c<boost::is_same<functor_type,
|
||||
typedef typename boost::mpl::if_c<boost::is_same<F,
|
||||
scalar_identity<value_type> >::value,
|
||||
typename E::reference,
|
||||
value_type>::type reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef F functor_type;
|
||||
typedef typename boost::mpl::if_c<boost::is_const<expression_type>::value,
|
||||
typename E::const_closure_type,
|
||||
typename E::closure_type>::type expression_closure_type;
|
||||
typedef const vector_unary<E, F> const_self_type;
|
||||
typedef vector_unary<E, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef self_type closure_type;
|
||||
typedef typename E::const_iterator const_iterator_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -596,6 +597,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return (*this).expression ().same_closure (vu.expression ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E::const_iterator const_iterator_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<const_closure_type, typename const_iterator_type::iterator_category> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
@@ -820,9 +826,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING vector_expression<vector_binary<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename promote_traits<typename E1::size_type, typename E2::size_type>::promote_type size_type;
|
||||
typedef typename promote_traits<typename E1::difference_type, typename E2::difference_type>::promote_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -830,14 +833,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const vector_binary<E1, E2, F> const_self_type;
|
||||
typedef vector_binary<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -880,6 +886,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (vb.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef typename iterator_restrict_traits<typename const_iterator1_type::iterator_category,
|
||||
typename const_iterator2_type::iterator_category>::iterator_category iterator_category;
|
||||
@@ -1209,9 +1220,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING vector_expression<vector_binary_scalar1<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E2::size_type size_type;
|
||||
typedef typename E2::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -1219,14 +1227,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef E1 expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef const vector_binary_scalar1<E1, E2, F> const_self_type;
|
||||
typedef vector_binary_scalar1<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::value_type const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1269,6 +1280,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (vbs1.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::value_type const_iterator1_type;
|
||||
typedef typename E2::const_iterator const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<const_closure_type, typename const_iterator2_type::iterator_category> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
@@ -1450,9 +1467,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#ifndef BOOST_UBLAS_NO_PROXY_SHORTCUTS
|
||||
BOOST_UBLAS_USING vector_expression<vector_binary_scalar2<E1, E2, F> >::operator ();
|
||||
#endif
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::size_type size_type;
|
||||
typedef typename E1::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
@@ -1460,14 +1474,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef const_reference reference;
|
||||
typedef const value_type *const_pointer;
|
||||
typedef const_pointer pointer;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef E2 expression2_closure_type;
|
||||
typedef const vector_binary_scalar2<E1, E2, F> const_self_type;
|
||||
typedef vector_binary_scalar2<E1, E2, F> self_type;
|
||||
public:
|
||||
typedef const_self_type const_closure_type;
|
||||
typedef const_closure_type closure_type;
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::value_type const_iterator2_type;
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1510,6 +1527,12 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
(*this).expression2 ().same_closure (vbs2.expression2 ());
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
typedef typename E1::const_iterator const_iterator1_type;
|
||||
typedef typename E2::value_type const_iterator2_type;
|
||||
|
||||
public:
|
||||
#ifdef BOOST_UBLAS_USE_INDEXED_ITERATOR
|
||||
typedef indexed_const_iterator<const_closure_type, typename const_iterator2_type::iterator_category> const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
@@ -1698,13 +1721,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
class vector_scalar_unary:
|
||||
public scalar_expression<typename F::result_type> {
|
||||
public:
|
||||
typedef E expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename F::size_type size_type;
|
||||
typedef typename F::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
private:
|
||||
typedef E expression_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E::const_closure_type expression_closure_type;
|
||||
typedef typename E::const_iterator::iterator_category iterator_category;
|
||||
public:
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1824,16 +1849,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
public scalar_expression<typename F::result_type> {
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT (int, complexity = 1);
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename F::size_type size_type;
|
||||
typedef typename F::difference_type difference_type;
|
||||
typedef typename F::result_type value_type;
|
||||
private:
|
||||
typedef E1 expression1_type;
|
||||
typedef E2 expression2_type;
|
||||
typedef F functor_type;
|
||||
typedef typename E1::const_closure_type expression1_closure_type;
|
||||
typedef typename E2::const_closure_type expression2_closure_type;
|
||||
typedef typename iterator_restrict_traits<typename E1::const_iterator::iterator_category,
|
||||
typename E2::const_iterator::iterator_category>::iterator_category iterator_category;
|
||||
public:
|
||||
typedef unknown_storage_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
|
||||
@@ -44,11 +44,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef F functor_type;
|
||||
typedef const generalized_vector_of_vector<T, F, A> const_self_type;
|
||||
typedef generalized_vector_of_vector<T, F, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const matrix_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
@@ -56,10 +58,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef matrix_reference<self_type> closure_type;
|
||||
typedef typename A::value_type vector_data_value_type;
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
typedef typename F::orientation_category orientation_category;
|
||||
|
||||
@@ -302,6 +300,15 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
data_ [functor_type::size1 (size1_, size2_)] = vector_data_value_type ();
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use vector iterator
|
||||
typedef typename A::const_iterator vector_const_iterator_type;
|
||||
typedef typename A::iterator vector_iterator_type;
|
||||
typedef typename A::value_type::const_iterator const_iterator_type;
|
||||
typedef typename A::value_type::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator1;
|
||||
class iterator1;
|
||||
class const_iterator2;
|
||||
@@ -476,7 +483,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator1:
|
||||
public container_const_reference<generalized_vector_of_vector>,
|
||||
|
||||
@@ -255,18 +255,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef A array_type;
|
||||
typedef const A const_array_type;
|
||||
typedef const sparse_vector<T, A> const_self_type;
|
||||
typedef sparse_vector<T, A> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -488,6 +488,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
data ().clear ();
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use storage iterator
|
||||
typedef typename A::const_iterator const_iterator_type;
|
||||
typedef typename A::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator;
|
||||
class iterator;
|
||||
|
||||
@@ -503,7 +510,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return iterator (*this, data ().lower_bound (i));
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator:
|
||||
public container_const_reference<sparse_vector>,
|
||||
@@ -738,18 +744,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef IA index_array_type;
|
||||
typedef TA value_array_type;
|
||||
typedef const compressed_vector<T, IB, IA, TA> const_self_type;
|
||||
typedef compressed_vector<T, IB, IA, TA> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1034,6 +1040,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
filled_ = 0;
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use index array iterator
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator;
|
||||
class iterator;
|
||||
|
||||
@@ -1049,7 +1062,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return iterator (*this, detail::lower_bound (index_data ().begin (), index_data ().begin () + filled_, k_based (i), std::less<size_type> ()));
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator:
|
||||
public container_const_reference<compressed_vector>,
|
||||
@@ -1296,18 +1308,18 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
#endif
|
||||
typedef const T *const_pointer;
|
||||
typedef T *pointer;
|
||||
private:
|
||||
typedef IA index_array_type;
|
||||
typedef TA value_array_type;
|
||||
typedef const coordinate_vector<T, IB, IA, TA> const_self_type;
|
||||
typedef coordinate_vector<T, IB, IA, TA> self_type;
|
||||
public:
|
||||
#ifndef BOOST_UBLAS_CT_REFERENCE_BASE_TYPEDEFS
|
||||
typedef const vector_const_reference<const_self_type> const_closure_type;
|
||||
#else
|
||||
typedef const vector_reference<const_self_type> const_closure_type;
|
||||
#endif
|
||||
typedef vector_reference<self_type> closure_type;
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
typedef sparse_tag storage_category;
|
||||
|
||||
// Construction and destruction
|
||||
@@ -1620,6 +1632,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
filled_ = 0;
|
||||
}
|
||||
|
||||
// Iterator types
|
||||
private:
|
||||
// Use index array iterator
|
||||
typedef typename IA::const_iterator const_iterator_type;
|
||||
typedef typename IA::iterator iterator_type;
|
||||
|
||||
public:
|
||||
class const_iterator;
|
||||
class iterator;
|
||||
|
||||
@@ -1637,7 +1656,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
return iterator (*this, detail::lower_bound (index_data ().begin (), index_data ().begin () + filled_, k_based (i), std::less<size_type> ()));
|
||||
}
|
||||
|
||||
// Iterators simply are pointers.
|
||||
|
||||
class const_iterator:
|
||||
public container_const_reference<coordinate_vector>,
|
||||
|
||||
Reference in New Issue
Block a user