Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56397 - in sandbox/statistics/monomials_horner: boost/monomials_horner libs/monomials_horner/doc
From: erwann.rogard_at_[hidden]
Date: 2009-09-26 19:49:16


Author: e_r
Date: 2009-09-26 19:49:15 EDT (Sat, 26 Sep 2009)
New Revision: 56397
URL: http://svn.boost.org/trac/boost/changeset/56397

Log:
m
Text files modified:
   sandbox/statistics/monomials_horner/boost/monomials_horner/multi_indexes.hpp | 60 ++++++++++++++++++++++++++++++++-------
   sandbox/statistics/monomials_horner/libs/monomials_horner/doc/readme.txt | 7 ++++
   2 files changed, 55 insertions(+), 12 deletions(-)

Modified: sandbox/statistics/monomials_horner/boost/monomials_horner/multi_indexes.hpp
==============================================================================
--- sandbox/statistics/monomials_horner/boost/monomials_horner/multi_indexes.hpp (original)
+++ sandbox/statistics/monomials_horner/boost/monomials_horner/multi_indexes.hpp 2009-09-26 19:49:15 EDT (Sat, 26 Sep 2009)
@@ -15,7 +15,7 @@
 #include <boost/tuple/tuple.hpp>
 #include <boost/bind.hpp>
 #include <boost/assert.hpp>
-#include <boost/matrix_view/iterator/row_iterator.hpp>
+#include <boost/view/rows_iterator.hpp>
 #include <boost/monomials_horner/monomials_properties.hpp>
 
 namespace boost{
@@ -29,7 +29,8 @@
     // {(2,0,0) (1,1,0) (1,0,1)} = {(1,0,0) (0,1,0) (0,0,1)} + (1,0,0)
     // {(0,2,0) (0,1,1)} = {(0,1,0) (0,0,1)} + (0,1,0) etc.
 
- template<unsigned int N>
+ // N is the dimension of the multivariate monomial
+ template<unsigned N>
     class multi_indexes{
       public:
         typedef std::vector<unsigned> storage_type;
@@ -37,7 +38,8 @@
         typedef typename storage_type::size_type size_type;
         typedef storage_type::value_type base_value_type;
 
- typedef matrix_view::row_iterator<base_iter_type> iter_type;
+// typedef matrix_view::row_iterator<base_iter_type> iter_type;
+ typedef view::detail::rows_iterator<base_iter_type> iter_type;
         typedef std::vector<iter_type> iters_type;
         typedef typename iter_type::value_type value_type;
         typedef iterator_range<iter_type> iter_range_type;
@@ -70,8 +72,13 @@
                 size_type sz_new
                     = properties::number_degree_less_than(degree,N);
                 storage.resize(sz_new*N);
- iter_type write_b = matrix_view::make_row_iterator(
+// iter_type write_b = matrix_view::make_row_iterator(
+// begin(storage),
+// N
+// );
+ iter_type write_b = view::detail::make_rows_iterator(
                     begin(storage),
+ end(storage),
                     N
                 );
                 std::advance(write_b,sz_old);
@@ -92,8 +99,13 @@
                     end(read_bs_dists),
                     back_inserter(read_bs),
                     unary_op(
- matrix_view::make_row_iterator(
+// matrix_view::make_row_iterator(
+// begin(storage),
+// N
+// )
+ view::detail::make_rows_iterator(
                             begin(storage),
+ end(storage),
                             N
                         )
                     )
@@ -102,11 +114,22 @@
                 while(i<n){
                     BOOST_ASSERT(size(read_bs_dists)==N);
                     BOOST_ASSERT(std::distance(
- matrix_view::make_row_iterator(
+// matrix_view::make_row_iterator(
+// begin(variables),
+// N
+// ),
+// matrix_view::make_end_row_iterator(
+// begin(variables),
+// end(variables),
+// N
+// )
+
+ view::detail::make_rows_iterator(
                             begin(variables),
+ end(variables),
                             N
                         ),
- matrix_view::make_end_row_iterator(
+ view::detail::make_end_rows_iterator(
                                 begin(variables),
                                 end(variables),
                                 N
@@ -118,8 +141,13 @@
                         make_zip_iterator(
                             make_tuple(
                                 begin(read_bs),
- matrix_view::make_row_iterator(
+// matrix_view::make_row_iterator(
+// begin(variables),
+// N
+// )
+ view::detail::make_rows_iterator(
                                     begin(variables),
+ end(variables),
                                     N
                                 )
                             )
@@ -127,7 +155,12 @@
                         make_zip_iterator(
                             make_tuple(
                                 end(read_bs),
- matrix_view::make_end_row_iterator(
+// matrix_view::make_end_row_iterator(
+// begin(variables),
+// end(variables),
+// N
+// )
+ view::detail::make_end_rows_iterator(
                                     begin(variables),
                                     end(variables),
                                     N
@@ -145,8 +178,13 @@
                     back_inserter(read_bs_dists),
                     bind(
                         std::distance<iter_type>,
- matrix_view::make_row_iterator(
+// matrix_view::make_row_iterator(
+// begin(storage),
+// N
+// ),
+ view::detail::make_rows_iterator(
                             begin(storage),
+ end(storage),
                             N
                         ),
                         _1
@@ -157,7 +195,7 @@
 
             size_type dist
                 = properties::number_degree_less_than(degree,N);
- iter_type b(begin(storage),N);
+ iter_type b(begin(storage),end(storage),N);
             iter_type e = b;
             std::advance(e,dist);
             iter_range_type(b,e);

Modified: sandbox/statistics/monomials_horner/libs/monomials_horner/doc/readme.txt
==============================================================================
--- sandbox/statistics/monomials_horner/libs/monomials_horner/doc/readme.txt (original)
+++ sandbox/statistics/monomials_horner/libs/monomials_horner/doc/readme.txt 2009-09-26 19:49:15 EDT (Sat, 26 Sep 2009)
@@ -18,7 +18,7 @@
 [Dependencies]
 
 /boost_1_39_0/
-/sandbox/statistics/matrix_view/
+/sandbox/statistics/view/
 
 [ Overview ]
 
@@ -36,6 +36,11 @@
 b coefficient
 x range of size D
 
+[ History ]
+
+Sep 09 Refactored to account for the change from matrix::view::row_iterator
+ to view::detail::rows_iterator
+
 
 [ Output ]
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk