blob: aeae509657355696a046bc5a7ea8957f2a72fefd [file] [log] [blame]
diff -aruN a/boost/archive/basic_archive.hpp b/boost/archive/basic_archive.hpp
--- a/boost/archive/basic_archive.hpp 2010-11-06 09:31:31.000000000 -0700
+++ b/boost/archive/basic_archive.hpp 2012-02-07 15:25:24.619334954 -0800
@@ -254,7 +254,7 @@
#define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D) \
class D : public T { \
public: \
- explicit D(const T t) : T(t){} \
+ explicit D(const T t) : T(type){} \
}; \
/**/
diff -aruN a/boost/numeric/ublas/banded.hpp b/boost/numeric/ublas/banded.hpp
--- a/boost/numeric/ublas/banded.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/banded.hpp 2012-02-07 15:25:24.623735807 -0800
@@ -63,16 +63,16 @@
size1_ (0), size2_ (0),
lower_ (0), upper_ (0), data_ (0) {}
BOOST_UBLAS_INLINE
- banded_matrix (size_type size1, size_type size2, size_type lower = 0, size_type upper = 0):
+ banded_matrix (size_type s1, size_type s2, size_type l = 0, size_type u = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2),
- lower_ (lower), upper_ (upper), data_ ((std::max) (size1, size2) * (lower + 1 + upper)) {
+ size1_ (s1), size2_ (s2),
+ lower_ (l), upper_ (u), data_ ((std::max) (s1, s2) * (l + 1 + u)) {
}
BOOST_UBLAS_INLINE
- banded_matrix (size_type size1, size_type size2, size_type lower, size_type upper, const array_type &data):
+ banded_matrix (size_type s1, size_type s2, size_type l, size_type u, const array_type &d):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2),
- lower_ (lower), upper_ (upper), data_ (data) {}
+ size1_ (s1), size2_ (s2),
+ lower_ (l), upper_ (u), data_ (d) {}
BOOST_UBLAS_INLINE
banded_matrix (const banded_matrix &m):
matrix_container<self_type> (),
@@ -80,10 +80,10 @@
lower_ (m.lower_), upper_ (m.upper_), data_ (m.data_) {}
template<class AE>
BOOST_UBLAS_INLINE
- banded_matrix (const matrix_expression<AE> &ae, size_type lower = 0, size_type upper = 0):
+ banded_matrix (const matrix_expression<AE> &ae, size_type l = 0, size_type u = 0):
matrix_container<self_type> (),
size1_ (ae ().size1 ()), size2_ (ae ().size2 ()),
- lower_ (lower), upper_ (upper),
+ lower_ (l), upper_ (u),
data_ ((std::max) (size1_, size2_) * (lower_ + 1 + upper_)) {
matrix_assign<scalar_assign> (*this, ae);
}
@@ -118,27 +118,27 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, size_type lower = 0, size_type upper = 0, bool preserve = true) {
+ void resize (size_type s1, size_type s2, size_type l = 0, size_type u = 0, bool preserve = true) {
if (preserve) {
- self_type temporary (size1, size2, lower, upper);
+ self_type temporary (s1, s2, l, u);
detail::matrix_resize_preserve<layout_type> (*this, temporary);
}
else {
- data ().resize ((std::max) (size1, size2) * (lower + 1 + upper));
- size1_ = size1;
- size2_ = size2;
- lower_ = lower;
- upper_ = upper;
+ data ().resize ((std::max) (s1, s2) * (l + 1 + u));
+ size1_ = s1;
+ size2_ = s2;
+ lower_ = l;
+ upper_ = u;
}
}
BOOST_UBLAS_INLINE
- void resize_packed_preserve (size_type size1, size_type size2, size_type lower = 0, size_type upper = 0) {
- size1_ = size1;
- size2_ = size2;
- lower_ = lower;
- upper_ = upper;
- data ().resize ((std::max) (size1, size2) * (lower + 1 + upper), value_type ());
+ void resize_packed_preserve (size_type s1, size_type s2, size_type l = 0, size_type u = 0) {
+ size1_ = s1;
+ size2_ = s2;
+ lower_ = l;
+ upper_ = u;
+ data ().resize ((std::max) (size1, size2) * (l + 1 + u), value_type ());
}
// Element access
@@ -1082,9 +1082,9 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- banded_adaptor (matrix_type &data, size_type lower = 0, size_type upper = 0):
+ banded_adaptor (matrix_type &d, size_type l = 0, size_type u = 0):
matrix_expression<self_type> (),
- data_ (data), lower_ (lower), upper_ (upper) {}
+ data_ (d), lower_ (l), upper_ (u) {}
BOOST_UBLAS_INLINE
banded_adaptor (const banded_adaptor &m):
matrix_expression<self_type> (),
diff -aruN a/boost/numeric/ublas/detail/matrix_assign.hpp b/boost/numeric/ublas/detail/matrix_assign.hpp
--- a/boost/numeric/ublas/detail/matrix_assign.hpp 2010-10-19 00:01:35.000000000 -0700
+++ b/boost/numeric/ublas/detail/matrix_assign.hpp 2012-02-07 15:25:24.623735807 -0800
@@ -75,21 +75,21 @@
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
- difference_type compare = it2_index - it2e_index;
- if (compare == 0) {
+ difference_type compare2 = it2_index - it2e_index;
+ if (compare2 == 0) {
++ it2, ++ it2e;
if (it2 != it2_end && it2e != it2e_end) {
it2_index = it2.index2 ();
it2e_index = it2e.index2 ();
} else
break;
- } else if (compare < 0) {
- increment (it2, it2_end, - compare);
+ } else if (compare2 < 0) {
+ increment (it2, it2_end, - compare2);
if (it2 != it2_end)
it2_index = it2.index2 ();
else
break;
- } else if (compare > 0) {
+ } else if (compare2 > 0) {
if (conformant_restrict_type::other (it2e.index1 (), it2e.index2 ()))
if (static_cast<value_type>(*it2e) != value_type/*zero*/())
index.push_back (std::pair<size_type, size_type> (it2e.index1 (), it2e.index2 ()));
@@ -178,21 +178,21 @@
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
- difference_type compare = it1_index - it1e_index;
- if (compare == 0) {
+ difference_type compare2 = it1_index - it1e_index;
+ if (compare2 == 0) {
++ it1, ++ it1e;
if (it1 != it1_end && it1e != it1e_end) {
it1_index = it1.index1 ();
it1e_index = it1e.index1 ();
} else
break;
- } else if (compare < 0) {
- increment (it1, it1_end, - compare);
+ } else if (compare2 < 0) {
+ increment (it1, it1_end, - compare2);
if (it1 != it1_end)
it1_index = it1.index1 ();
else
break;
- } else if (compare > 0) {
+ } else if (compare2 > 0) {
if (conformant_restrict_type::other (it1e.index1 (), it1e.index2 ()))
if (static_cast<value_type>(*it1e) != value_type/*zero*/())
index.push_back (std::pair<size_type, size_type> (it1e.index1 (), it1e.index2 ()));
@@ -997,8 +997,8 @@
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
- difference_type compare = it2_index - it2e_index;
- if (compare == 0) {
+ difference_type compare2 = it2_index - it2e_index;
+ if (compare2 == 0) {
functor_type::apply (*it2, *it2e);
++ it2, ++ it2e;
if (it2 != it2_end && it2e != it2e_end) {
@@ -1006,18 +1006,18 @@
it2e_index = it2e.index2 ();
} else
break;
- } else if (compare < 0) {
+ } else if (compare2 < 0) {
if (!functor_type::computed) {
functor_type::apply (*it2, expr_value_type/*zero*/());
++ it2;
} else
- increment (it2, it2_end, - compare);
+ increment (it2, it2_end, - compare2);
if (it2 != it2_end)
it2_index = it2.index2 ();
else
break;
- } else if (compare > 0) {
- increment (it2e, it2e_end, compare);
+ } else if (compare2 > 0) {
+ increment (it2e, it2e_end, compare2);
if (it2e != it2e_end)
it2e_index = it2e.index2 ();
else
@@ -1118,8 +1118,8 @@
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
- difference_type compare = it1_index - it1e_index;
- if (compare == 0) {
+ difference_type compare2 = it1_index - it1e_index;
+ if (compare2 == 0) {
functor_type::apply (*it1, *it1e);
++ it1, ++ it1e;
if (it1 != it1_end && it1e != it1e_end) {
@@ -1127,18 +1127,18 @@
it1e_index = it1e.index1 ();
} else
break;
- } else if (compare < 0) {
+ } else if (compare2 < 0) {
if (!functor_type::computed) {
functor_type::apply (*it1, expr_value_type/*zero*/()); // zeroing
++ it1;
} else
- increment (it1, it1_end, - compare);
+ increment (it1, it1_end, - compare2);
if (it1 != it1_end)
it1_index = it1.index1 ();
else
break;
- } else if (compare > 0) {
- increment (it1e, it1e_end, compare);
+ } else if (compare2 > 0) {
+ increment (it1e, it1e_end, compare2);
if (it1e != it1e_end)
it1e_index = it1e.index1 ();
else
@@ -1386,8 +1386,8 @@
if (it2 != it2_end && it2e != it2e_end) {
size_type it2_index = it2.index2 (), it2e_index = it2e.index2 ();
while (true) {
- difference_type compare = it2_index - it2e_index;
- if (compare == 0) {
+ difference_type compare2 = it2_index - it2e_index;
+ if (compare2 == 0) {
functor_type::apply (*it2, *it2e);
++ it2, ++ it2e;
if (it2 != it2_end && it2e != it2e_end) {
@@ -1395,14 +1395,14 @@
it2e_index = it2e.index2 ();
} else
break;
- } else if (compare < 0) {
- increment (it2, it2_end, - compare);
+ } else if (compare2 < 0) {
+ increment (it2, it2_end, - compare2);
if (it2 != it2_end)
it2_index = it2.index2 ();
else
break;
- } else if (compare > 0) {
- increment (it2e, it2e_end, compare);
+ } else if (compare2 > 0) {
+ increment (it2e, it2e_end, compare2);
if (it2e != it2e_end)
it2e_index = it2e.index2 ();
else
@@ -1511,8 +1511,8 @@
if (it1 != it1_end && it1e != it1e_end) {
size_type it1_index = it1.index1 (), it1e_index = it1e.index1 ();
while (true) {
- difference_type compare = it1_index - it1e_index;
- if (compare == 0) {
+ difference_type compare2 = it1_index - it1e_index;
+ if (compare2 == 0) {
functor_type::apply (*it1, *it1e);
++ it1, ++ it1e;
if (it1 != it1_end && it1e != it1e_end) {
@@ -1520,14 +1520,14 @@
it1e_index = it1e.index1 ();
} else
break;
- } else if (compare < 0) {
- increment (it1, it1_end, - compare);
+ } else if (compare2 < 0) {
+ increment (it1, it1_end, - compare2);
if (it1 != it1_end)
it1_index = it1.index1 ();
else
break;
- } else if (compare > 0) {
- increment (it1e, it1e_end, compare);
+ } else if (compare2 > 0) {
+ increment (it1e, it1e_end, compare2);
if (it1e != it1e_end)
it1e_index = it1e.index1 ();
else
diff -aruN a/boost/numeric/ublas/hermitian.hpp b/boost/numeric/ublas/hermitian.hpp
--- a/boost/numeric/ublas/hermitian.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/hermitian.hpp 2012-02-07 15:25:24.627228060 -0800
@@ -284,14 +284,14 @@
size_ (BOOST_UBLAS_SAME (size, size)), data_ (triangular_type::packed_size (layout_type (), size, size)) {
}
BOOST_UBLAS_INLINE
- hermitian_matrix (size_type size1, size_type size2):
+ hermitian_matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size_ (BOOST_UBLAS_SAME (size1, size2)), data_ (triangular_type::packed_size (layout_type (), size1, size2)) {
+ size_ (BOOST_UBLAS_SAME (s1, s2)), data_ (triangular_type::packed_size (layout_type (), s1, s2)) {
}
BOOST_UBLAS_INLINE
- hermitian_matrix (size_type size, const array_type &data):
+ hermitian_matrix (size_type s, const array_type &d):
matrix_container<self_type> (),
- size_ (size), data_ (data) {}
+ size_ (s), data_ (d) {}
BOOST_UBLAS_INLINE
hermitian_matrix (const hermitian_matrix &m):
matrix_container<self_type> (),
@@ -338,8 +338,8 @@
}
}
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
- resize (BOOST_UBLAS_SAME (size1, size2), preserve);
+ void resize (size_type s1, size_type s2, bool preserve = true) {
+ resize (BOOST_UBLAS_SAME (s1, s2), preserve);
}
BOOST_UBLAS_INLINE
void resize_packed_preserve (size_type size) {
@@ -1192,9 +1192,9 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- hermitian_adaptor (matrix_type &data):
+ hermitian_adaptor (matrix_type &d):
matrix_expression<self_type> (),
- data_ (data) {
+ data_ (d) {
BOOST_UBLAS_CHECK (data_.size1 () == data_.size2 (), bad_size ());
}
BOOST_UBLAS_INLINE
@@ -1508,11 +1508,11 @@
it1_begin_ (), it1_end_ (), it1_ (),
it2_begin_ (), it2_end_ (), it2_ () {}
BOOST_UBLAS_INLINE
- const_iterator1 (const self_type &m, int begin, int end,
+ const_iterator1 (const self_type &m, int b, int e,
const const_subiterator1_type &it1_begin, const const_subiterator1_type &it1_end,
const const_subiterator2_type &it2_begin, const const_subiterator2_type &it2_end):
container_const_reference<self_type> (m),
- begin_ (begin), end_ (end), current_ (begin),
+ begin_ (b), end_ (e), current_ (b),
it1_begin_ (it1_begin), it1_end_ (it1_end), it1_ (it1_begin_),
it2_begin_ (it2_begin), it2_end_ (it2_end), it2_ (it2_begin_) {
if (current_ == 0 && it1_ == it1_end_)
@@ -1962,11 +1962,11 @@
it1_begin_ (), it1_end_ (), it1_ (),
it2_begin_ (), it2_end_ (), it2_ () {}
BOOST_UBLAS_INLINE
- const_iterator2 (const self_type &m, int begin, int end,
+ const_iterator2 (const self_type &m, int b, int e,
const const_subiterator1_type &it1_begin, const const_subiterator1_type &it1_end,
const const_subiterator2_type &it2_begin, const const_subiterator2_type &it2_end):
container_const_reference<self_type> (m),
- begin_ (begin), end_ (end), current_ (begin),
+ begin_ (b), end_ (e), current_ (b),
it1_begin_ (it1_begin), it1_end_ (it1_end), it1_ (it1_begin_),
it2_begin_ (it2_begin), it2_end_ (it2_end), it2_ (it2_begin_) {
if (current_ == 0 && it1_ == it1_end_)
diff -aruN a/boost/numeric/ublas/matrix_expression.hpp b/boost/numeric/ublas/matrix_expression.hpp
--- a/boost/numeric/ublas/matrix_expression.hpp 2009-10-06 16:31:22.000000000 -0700
+++ b/boost/numeric/ublas/matrix_expression.hpp 2012-02-07 15:25:24.627228060 -0800
@@ -1918,39 +1918,39 @@
// Sparse specializations
BOOST_UBLAS_INLINE
void increment (sparse_bidirectional_iterator_tag) {
- size_type index1 = (*this) ().size1 ();
+ size_type temp_index1 = (*this) ().size1 ();
if (it1_ != it1_end_) {
if (it1_.index1 () <= i_)
++ it1_;
if (it1_ != it1_end_)
- index1 = it1_.index1 ();
+ temp_index1 = it1_.index1 ();
}
- size_type index2 = (*this) ().size1 ();
+ size_type temp_index2 = (*this) ().size1 ();
if (it2_ != it2_end_)
if (it2_.index1 () <= i_)
++ it2_;
if (it2_ != it2_end_) {
- index2 = it2_.index1 ();
+ temp_index2 = it2_.index1 ();
}
- i_ = (std::min) (index1, index2);
+ i_ = (std::min) (temp_index1, temp_index2);
}
BOOST_UBLAS_INLINE
void decrement (sparse_bidirectional_iterator_tag) {
- size_type index1 = (*this) ().size1 ();
+ size_type temp_index1 = (*this) ().size1 ();
if (it1_ != it1_end_) {
if (i_ <= it1_.index1 ())
-- it1_;
if (it1_ != it1_end_)
- index1 = it1_.index1 ();
+ temp_index1 = it1_.index1 ();
}
- size_type index2 = (*this) ().size1 ();
+ size_type temp_index2 = (*this) ().size1 ();
if (it2_ != it2_end_) {
if (i_ <= it2_.index1 ())
-- it2_;
if (it2_ != it2_end_)
- index2 = it2_.index1 ();
+ temp_index2 = it2_.index1 ();
}
- i_ = (std::max) (index1, index2);
+ i_ = (std::max) (temp_index1, temp_index2);
}
BOOST_UBLAS_INLINE
void increment (sparse_bidirectional_iterator_tag, difference_type n) {
@@ -2233,39 +2233,39 @@
// Sparse specializations
BOOST_UBLAS_INLINE
void increment (sparse_bidirectional_iterator_tag) {
- size_type index1 = (*this) ().size2 ();
+ size_type temp_index1 = (*this) ().size2 ();
if (it1_ != it1_end_) {
if (it1_.index2 () <= j_)
++ it1_;
if (it1_ != it1_end_)
index1 = it1_.index2 ();
}
- size_type index2 = (*this) ().size2 ();
+ size_type temp_index2 = (*this) ().size2 ();
if (it2_ != it2_end_) {
if (it2_.index2 () <= j_)
++ it2_;
if (it2_ != it2_end_)
index2 = it2_.index2 ();
}
- j_ = (std::min) (index1, index2);
+ j_ = (std::min) (temp_index1, temp_index2);
}
BOOST_UBLAS_INLINE
void decrement (sparse_bidirectional_iterator_tag) {
- size_type index1 = (*this) ().size2 ();
+ size_type temp_index1 = (*this) ().size2 ();
if (it1_ != it1_end_) {
if (j_ <= it1_.index2 ())
-- it1_;
if (it1_ != it1_end_)
index1 = it1_.index2 ();
}
- size_type index2 = (*this) ().size2 ();
+ size_type temp_index2 = (*this) ().size2 ();
if (it2_ != it2_end_) {
if (j_ <= it2_.index2 ())
-- it2_;
if (it2_ != it2_end_)
index2 = it2_.index2 ();
}
- j_ = (std::max) (index1, index2);
+ j_ = (std::max) (temp_index1, temp_index2);
}
BOOST_UBLAS_INLINE
void increment (sparse_bidirectional_iterator_tag, difference_type n) {
diff -aruN a/boost/numeric/ublas/matrix.hpp b/boost/numeric/ublas/matrix.hpp
--- a/boost/numeric/ublas/matrix.hpp 2010-10-19 00:01:35.000000000 -0700
+++ b/boost/numeric/ublas/matrix.hpp 2012-02-07 15:25:24.631348942 -0800
@@ -126,9 +126,9 @@
* \param size2 number of columns
*/
BOOST_UBLAS_INLINE
- matrix (size_type size1, size_type size2):
+ matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (layout_type::storage_size (size1, size2)) {
+ size1_ (s1), size2_ (s2), data_ (layout_type::storage_size (s1, s2)) {
}
/** Dense matrix constructor with defined size a initial value for all the matrix elements
@@ -136,9 +136,9 @@
* \param size2 number of columns
* \param init initial value assigned to all elements
*/
- matrix (size_type size1, size_type size2, const value_type &init):
+ matrix (size_type s1, size_type s2, const value_type &init):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (layout_type::storage_size (size1, size2), init) {
+ size1_ (s1), size2_ (s2), data_ (layout_type::storage_size (s1, s2), init) {
}
/** Dense matrix constructor with defined size and an initial data array
@@ -147,9 +147,9 @@
* \param data array to copy into the matrix. Must have the same dimension as the matrix
*/
BOOST_UBLAS_INLINE
- matrix (size_type size1, size_type size2, const array_type &data):
+ matrix (size_type s1, size_type s2, const array_type &d):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (data) {}
+ size1_ (s1), size2_ (s2), data_ (d) {}
/** Copy-constructor of a dense matrix
* \param m is a dense matrix
@@ -212,15 +212,15 @@
* \param preserve a boolean to say if one wants the data to be preserved during the resizing. Default is true.
*/
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
if (preserve) {
- self_type temporary (size1, size2);
+ self_type temporary (s1, s2);
detail::matrix_resize_preserve<layout_type> (*this, temporary);
}
else {
- data ().resize (layout_type::storage_size (size1, size2));
- size1_ = size1;
- size2_ = size2;
+ data ().resize (layout_type::storage_size (s1, s2));
+ size1_ = s1;
+ size2_ = s2;
}
}
@@ -1186,10 +1186,10 @@
matrix_container<self_type> (),
size1_ (0), size2_ (0), data_ (1) {}
BOOST_UBLAS_INLINE
- vector_of_vector (size_type size1, size_type size2):
+ vector_of_vector (size_type s1, size_type s2):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (1) {
- resize (size1, size2, true);
+ size1_ (s1), size2_ (s2), data_ (1) {
+ resize (s1, s2, true);
}
BOOST_UBLAS_INLINE
vector_of_vector (const vector_of_vector &m):
@@ -1227,18 +1227,18 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
- size1_ = size1;
- size2_ = size2;
+ void resize (size_type s1, size_type s2, bool preserve = true) {
+ size1_ = s1;
+ size2_ = s2;
if (preserve)
- data ().resize (layout_type::size_M (size1, size2) + 1, typename array_type::value_type ());
+ data ().resize (layout_type::size_M (s1, s2) + 1, typename array_type::value_type ());
else
- data ().resize (layout_type::size_M (size1, size2) + 1);
- for (size_type k = 0; k < layout_type::size_M (size1, size2); ++ k) {
+ data ().resize (layout_type::size_M (s1, s2) + 1);
+ for (size_type k = 0; k < layout_type::size_M (s1, s2); ++ k) {
if (preserve)
- data () [k].resize (layout_type::size_m (size1, size2), value_type ());
+ data () [k].resize (layout_type::size_m (s1, s2), value_type ());
else
- data () [k].resize (layout_type::size_m (size1, size2));
+ data () [k].resize (layout_type::size_m (s1, s2));
}
}
@@ -2171,9 +2171,9 @@
matrix_container<self_type> (),
size1_ (size), size2_ (size) {}
BOOST_UBLAS_INLINE
- zero_matrix (size_type size1, size_type size2):
+ zero_matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2) {}
+ size1_ (s1), size2_ (s2) {}
BOOST_UBLAS_INLINE
zero_matrix (const zero_matrix &m):
matrix_container<self_type> (),
@@ -2196,9 +2196,9 @@
size2_ = size;
}
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool /*preserve*/ = true) {
- size1_ = size1;
- size2_ = size2;
+ void resize (size_type s1, size_type s2, bool /*preserve*/ = true) {
+ size1_ = s1;
+ size2_ = s2;
}
// Element access
@@ -2558,9 +2558,9 @@
matrix_container<self_type> (),
size1_ (size), size2_ (size), size_common_ ((std::min) (size1_, size2_)) {}
BOOST_UBLAS_INLINE
- identity_matrix (size_type size1, size_type size2):
+ identity_matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), size_common_ ((std::min) (size1_, size2_)) {}
+ size1_ (s1), size2_ (s2), size_common_ ((std::min) (size1_, size2_)) {}
BOOST_UBLAS_INLINE
identity_matrix (const identity_matrix &m):
matrix_container<self_type> (),
@@ -2584,9 +2584,9 @@
size_common_ = ((std::min)(size1_, size2_));
}
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool /*preserve*/ = true) {
- size1_ = size1;
- size2_ = size2;
+ void resize (size_type s1, size_type s2, bool /*preserve*/ = true) {
+ size1_ = s1;
+ size2_ = s2;
size_common_ = ((std::min)(size1_, size2_));
}
@@ -2970,9 +2970,9 @@
matrix_container<self_type> (),
size1_ (0), size2_ (0), value_ () {}
BOOST_UBLAS_INLINE
- scalar_matrix (size_type size1, size_type size2, const value_type &value = value_type(1)):
+ scalar_matrix (size_type s1, size_type s2, const value_type &value = value_type(1)):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), value_ (value) {}
+ size1_ (s1), size2_ (s2), value_ (value) {}
BOOST_UBLAS_INLINE
scalar_matrix (const scalar_matrix &m):
matrix_container<self_type> (),
@@ -2990,9 +2990,9 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool /*preserve*/ = true) {
- size1_ = size1;
- size2_ = size2;
+ void resize (size_type s1, size_type s2, bool /*preserve*/ = true) {
+ size1_ = s1;
+ size2_ = s2;
}
// Element access
@@ -3446,8 +3446,8 @@
size1_ (N), size2_ (M) /* , data_ () */ {
}
BOOST_UBLAS_INLINE
- c_matrix (size_type size1, size_type size2):
- size1_ (size1), size2_ (size2) /* , data_ () */ {
+ c_matrix (size_type s1, size_type s2):
+ size1_ (s1), size2_ (s2) /* , data_ () */ {
if (size1_ > N || size2_ > M)
bad_size ().raise ();
}
@@ -3487,14 +3487,14 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
- if (size1 > N || size2 > M)
+ void resize (size_type s1, size_type s2, bool preserve = true) {
+ if (s1 > N || s2 > M)
bad_size ().raise ();
if (preserve) {
- self_type temporary (size1, size2);
+ self_type temporary (s1, s2);
// Common elements to preserve
- const size_type size1_min = (std::min) (size1, size1_);
- const size_type size2_min = (std::min) (size2, size2_);
+ const size_type size1_min = (std::min) (s1, size1_);
+ const size_type size2_min = (std::min) (s2, size2_);
for (size_type i = 0; i != size1_min; ++i) { // indexing copy over major
for (size_type j = 0; j != size2_min; ++j) {
temporary.data_[i][j] = data_[i][j];
@@ -3503,8 +3503,8 @@
assign_temporary (temporary);
}
else {
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
}
}
diff -aruN a/boost/numeric/ublas/matrix_proxy.hpp b/boost/numeric/ublas/matrix_proxy.hpp
--- a/boost/numeric/ublas/matrix_proxy.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/matrix_proxy.hpp 2012-02-07 15:25:24.631348942 -0800
@@ -51,8 +51,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_row (matrix_type &data, size_type i):
- data_ (data), i_ (i) {
+ matrix_row (matrix_type &d, size_type i):
+ data_ (d), i_ (i) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (i_ < data_.size1 (), bad_index ());
}
@@ -508,8 +508,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_column (matrix_type &data, size_type j):
- data_ (data), j_ (j) {
+ matrix_column (matrix_type &d, size_type j):
+ data_ (d), j_ (j) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (j_ < data_.size2 (), bad_index ());
}
@@ -965,8 +965,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_vector_range (matrix_type &data, const range_type &r1, const range_type &r2):
- data_ (data), r1_ (r1.preprocess (data.size1 ())), r2_ (r2.preprocess (data.size2 ())) {
+ matrix_vector_range (matrix_type &d, const range_type &r1, const range_type &r2):
+ data_ (d), r1_ (r1.preprocess (d.size1 ())), r2_ (r2.preprocess (d.size2 ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (r1_.start () <= data_.size1 () &&
// r1_.start () + r1_.size () <= data_.size1 (), bad_index ());
@@ -1421,8 +1421,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_vector_slice (matrix_type &data, const slice_type &s1, const slice_type &s2):
- data_ (data), s1_ (s1.preprocess (data.size1 ())), s2_ (s2.preprocess (data.size2 ())) {
+ matrix_vector_slice (matrix_type &d, const slice_type &s1, const slice_type &s2):
+ data_ (d), s1_ (s1.preprocess (d.size1 ())), s2_ (s2.preprocess (d.size2 ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (s1_.start () <= data_.size1 () &&
// s1_.start () + s1_.stride () * (s1_.size () - (s1_.size () > 0)) <= data_.size1 (), bad_index ());
@@ -1886,11 +1886,11 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_vector_indirect (matrix_type &data, size_type size):
- data_ (data), ia1_ (size), ia2_ (size) {}
+ matrix_vector_indirect (matrix_type &d, size_type s):
+ data_ (d), ia1_ (s), ia2_ (s) {}
BOOST_UBLAS_INLINE
- matrix_vector_indirect (matrix_type &data, const indirect_array_type &ia1, const indirect_array_type &ia2):
- data_ (data), ia1_ (ia1), ia2_ (ia2) {
+ matrix_vector_indirect (matrix_type &d, const indirect_array_type &ia1, const indirect_array_type &ia2):
+ data_ (d), ia1_ (ia1), ia2_ (ia2) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (ia1_.size () == ia2_.size (), bad_size ());
}
@@ -2351,8 +2351,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_range (matrix_type &data, const range_type &r1, const range_type &r2):
- data_ (data), r1_ (r1.preprocess (data.size1 ())), r2_ (r2.preprocess (data.size2 ())) {
+ matrix_range (matrix_type &d, const range_type &r1, const range_type &r2):
+ data_ (d), r1_ (r1.preprocess (d.size1 ())), r2_ (r2.preprocess (d.size2 ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (r1_.start () <= data_.size1 () &&
// r1_.start () + r1_.size () <= data_.size1 (), bad_index ());
@@ -2360,8 +2360,8 @@
// r2_.start () + r2_.size () <= data_.size2 (), bad_index ());
}
BOOST_UBLAS_INLINE
- matrix_range (const matrix_closure_type &data, const range_type &r1, const range_type &r2, int):
- data_ (data), r1_ (r1.preprocess (data.size1 ())), r2_ (r2.preprocess (data.size2 ())) {
+ matrix_range (const matrix_closure_type &d, const range_type &r1, const range_type &r2, int):
+ data_ (d), r1_ (r1.preprocess (d.size1 ())), r2_ (r2.preprocess (d.size2 ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (r1_.start () <= data_.size1 () &&
// r1_.start () + r1_.size () <= data_.size1 (), bad_index ());
@@ -3255,8 +3255,8 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_slice (matrix_type &data, const slice_type &s1, const slice_type &s2):
- data_ (data), s1_ (s1.preprocess (data.size1 ())), s2_ (s2.preprocess (data.size2 ())) {
+ matrix_slice (matrix_type &d, const slice_type &s1, const slice_type &s2):
+ data_ (d), s1_ (s1.preprocess (d.size1 ())), s2_ (s2.preprocess (d.size2 ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (s1_.start () <= data_.size1 () &&
// s1_.start () + s1_.stride () * (s1_.size () - (s1_.size () > 0)) <= data_.size1 (), bad_index ());
@@ -3264,8 +3264,8 @@
// s2_.start () + s2_.stride () * (s2_.size () - (s2_.size () > 0)) <= data_.size2 (), bad_index ());
}
BOOST_UBLAS_INLINE
- matrix_slice (const matrix_closure_type &data, const slice_type &s1, const slice_type &s2, int):
- data_ (data), s1_ (s1.preprocess (data.size1 ())), s2_ (s2.preprocess (data.size2 ())) {
+ matrix_slice (const matrix_closure_type &d, const slice_type &s1, const slice_type &s2, int):
+ data_ (d), s1_ (s1.preprocess (d.size1 ())), s2_ (s2.preprocess (d.size2 ())) {
// Early checking of preconditions.
// BOOST_UBLAS_CHECK (s1_.start () <= data_.size1 () &&
// s1_.start () + s1_.stride () * (s1_.size () - (s1_.size () > 0)) <= data_.size1 (), bad_index ());
@@ -4213,14 +4213,14 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- matrix_indirect (matrix_type &data, size_type size1, size_type size2):
- data_ (data), ia1_ (size1), ia2_ (size2) {}
+ matrix_indirect (matrix_type &d, size_type s1, size_type s2):
+ data_ (d), ia1_ (s1), ia2_ (s2) {}
BOOST_UBLAS_INLINE
- matrix_indirect (matrix_type &data, const indirect_array_type &ia1, const indirect_array_type &ia2):
- data_ (data), ia1_ (ia1.preprocess (data.size1 ())), ia2_ (ia2.preprocess (data.size2 ())) {}
+ matrix_indirect (matrix_type &d, const indirect_array_type &ia1, const indirect_array_type &ia2):
+ data_ (d), ia1_ (ia1.preprocess (d.size1 ())), ia2_ (ia2.preprocess (d.size2 ())) {}
BOOST_UBLAS_INLINE
- matrix_indirect (const matrix_closure_type &data, const indirect_array_type &ia1, const indirect_array_type &ia2, int):
- data_ (data), ia1_ (ia1.preprocess (data.size1 ())), ia2_ (ia2.preprocess (data.size2 ())) {}
+ matrix_indirect (const matrix_closure_type &d, const indirect_array_type &ia1, const indirect_array_type &ia2, int):
+ data_ (d), ia1_ (ia1.preprocess (d.size1 ())), ia2_ (ia2.preprocess (d.size2 ())) {}
// Accessors
BOOST_UBLAS_INLINE
diff -aruN a/boost/numeric/ublas/matrix_sparse.hpp b/boost/numeric/ublas/matrix_sparse.hpp
--- a/boost/numeric/ublas/matrix_sparse.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/matrix_sparse.hpp 2012-02-07 15:25:24.635307503 -0800
@@ -300,9 +300,9 @@
matrix_container<self_type> (),
size1_ (0), size2_ (0), data_ () {}
BOOST_UBLAS_INLINE
- mapped_matrix (size_type size1, size_type size2, size_type non_zeros = 0):
+ mapped_matrix (size_type s1, size_type s2, size_type non_zeros = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ () {
+ size1_ (s1), size2_ (s2), data_ () {
detail::map_reserve (data (), restrict_capacity (non_zeros));
}
BOOST_UBLAS_INLINE
@@ -358,11 +358,11 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
// FIXME preserve unimplemented
BOOST_UBLAS_CHECK (!preserve, internal_logic ());
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
data ().clear ();
}
@@ -1373,9 +1373,9 @@
data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type ();
}
BOOST_UBLAS_INLINE
- mapped_vector_of_mapped_vector (size_type size1, size_type size2, size_type non_zeros = 0):
+ mapped_vector_of_mapped_vector (size_type s1, size_type s2, size_type non_zeros = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ () {
+ size1_ (s1), size2_ (s2), data_ () {
data_ [layout_type::size_M (size1_, size2_)] = vector_data_value_type ();
}
BOOST_UBLAS_INLINE
@@ -1427,11 +1427,11 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
// FIXME preserve unimplemented
BOOST_UBLAS_CHECK (!preserve, internal_logic ());
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
data ().clear ();
data () [layout_type::size_M (size1_, size2_)] = vector_data_value_type ();
}
@@ -2666,9 +2666,9 @@
storage_invariants ();
}
BOOST_UBLAS_INLINE
- compressed_matrix (size_type size1, size_type size2, size_type non_zeros = 0):
+ compressed_matrix (size_type s1, size_type s2, size_type non_zeros = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), capacity_ (restrict_capacity (non_zeros)),
+ size1_ (s1), size2_ (s2), capacity_ (restrict_capacity (non_zeros)),
filled1_ (1), filled2_ (0),
index1_data_ (layout_type::size_M (size1_, size2_) + 1), index2_data_ (capacity_), value_data_ (capacity_) {
index1_data_ [filled1_ - 1] = k_based (filled2_);
@@ -2764,9 +2764,9 @@
return value_data_;
}
BOOST_UBLAS_INLINE
- void set_filled (const array_size_type& filled1, const array_size_type& filled2) {
- filled1_ = filled1;
- filled2_ = filled2;
+ void set_filled (const array_size_type& f1, const array_size_type& f2) {
+ filled1_ = f1;
+ filled2_ = f2;
storage_invariants ();
}
BOOST_UBLAS_INLINE
@@ -2802,11 +2802,11 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
// FIXME preserve unimplemented
BOOST_UBLAS_CHECK (!preserve, internal_logic ());
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
capacity_ = restrict_capacity (capacity_);
filled1_ = 1;
filled2_ = 0;
@@ -4045,9 +4045,9 @@
storage_invariants ();
}
BOOST_UBLAS_INLINE
- coordinate_matrix (size_type size1, size_type size2, array_size_type non_zeros = 0):
+ coordinate_matrix (size_type s1, size_type s2, array_size_type non_zeros = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), capacity_ (restrict_capacity (non_zeros)),
+ size1_ (s1), size2_ (s2), capacity_ (restrict_capacity (non_zeros)),
filled_ (0), sorted_filled_ (filled_), sorted_ (true),
index1_data_ (capacity_), index2_data_ (capacity_), value_data_ (capacity_) {
storage_invariants ();
@@ -4111,13 +4111,13 @@
return value_data_;
}
BOOST_UBLAS_INLINE
- void set_filled (const array_size_type &filled) {
+ void set_filled (const array_size_type &f) {
// Make sure that storage_invariants() succeeds
- if (sorted_ && filled < filled_)
- sorted_filled_ = filled;
+ if (sorted_ && f < filled_)
+ sorted_filled_ = f;
else
- sorted_ = (sorted_filled_ == filled);
- filled_ = filled;
+ sorted_ = (sorted_filled_ == f);
+ filled_ = f;
storage_invariants ();
}
BOOST_UBLAS_INLINE
@@ -4144,11 +4144,11 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
// FIXME preserve unimplemented
BOOST_UBLAS_CHECK (!preserve, internal_logic ());
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
capacity_ = restrict_capacity (capacity_);
index1_data_.resize (capacity_);
index2_data_.resize (capacity_);
@@ -4403,21 +4403,21 @@
std::inplace_merge (ita.begin (), iunsorted, ita.end ());
// sum duplicates with += and remove
- array_size_type filled = 0;
+ array_size_type f = 0;
for (array_size_type i = 1; i < filled_; ++ i) {
- if (index1_data_ [filled] != index1_data_ [i] ||
- index2_data_ [filled] != index2_data_ [i]) {
- ++ filled;
- if (filled != i) {
- index1_data_ [filled] = index1_data_ [i];
- index2_data_ [filled] = index2_data_ [i];
- value_data_ [filled] = value_data_ [i];
+ if (index1_data_ [f] != index1_data_ [i] ||
+ index2_data_ [f] != index2_data_ [i]) {
+ ++ f;
+ if (f != i) {
+ index1_data_ [f] = index1_data_ [i];
+ index2_data_ [f] = index2_data_ [i];
+ value_data_ [f] = value_data_ [i];
}
} else {
- value_data_ [filled] += value_data_ [i];
+ value_data_ [f] += value_data_ [i];
}
}
- filled_ = filled + 1;
+ filled_ = f + 1;
sorted_filled_ = filled_;
sorted_ = true;
storage_invariants ();
diff -aruN a/boost/numeric/ublas/storage.hpp b/boost/numeric/ublas/storage.hpp
--- a/boost/numeric/ublas/storage.hpp 2010-04-06 13:09:04.000000000 -0700
+++ b/boost/numeric/ublas/storage.hpp 2012-02-07 15:25:24.635307503 -0800
@@ -62,8 +62,8 @@
data_ = 0;
}
explicit BOOST_UBLAS_INLINE
- unbounded_array (size_type size, const ALLOC &a = ALLOC()):
- alloc_(a), size_ (size) {
+ unbounded_array (size_type s, const ALLOC &a = ALLOC()):
+ alloc_(a), size_ (s) {
if (size_) {
data_ = alloc_.allocate (size_);
if (! detail::has_trivial_constructor<T>::value) {
@@ -76,8 +76,8 @@
}
// No value initialised, but still be default constructed
BOOST_UBLAS_INLINE
- unbounded_array (size_type size, const value_type &init, const ALLOC &a = ALLOC()):
- alloc_ (a), size_ (size) {
+ unbounded_array (size_type s, const value_type &init, const ALLOC &a = ALLOC()):
+ alloc_ (a), size_ (s) {
if (size_) {
data_ = alloc_.allocate (size_);
std::uninitialized_fill (begin(), end(), init);
@@ -113,33 +113,33 @@
// Resizing
private:
BOOST_UBLAS_INLINE
- void resize_internal (const size_type size, const value_type init, const bool preserve) {
- if (size != size_) {
+ void resize_internal (const size_type s, const value_type init, const bool preserve) {
+ if (s != size_) {
pointer p_data = data_;
- if (size) {
- data_ = alloc_.allocate (size);
+ if (s) {
+ data_ = alloc_.allocate (s);
if (preserve) {
pointer si = p_data;
pointer di = data_;
- if (size < size_) {
- for (; di != data_ + size; ++di) {
+ if (s < size_) {
+ for (; di != data_ + s; ++di) {
alloc_.construct (di, *si);
++si;
}
}
else {
- for (pointer si = p_data; si != p_data + size_; ++si) {
- alloc_.construct (di, *si);
+ for (pointer si2 = p_data; si2 != p_data + size_; ++si) {
+ alloc_.construct (di, *si2);
++di;
}
- for (; di != data_ + size; ++di) {
+ for (; di != data_ + s; ++di) {
alloc_.construct (di, init);
}
}
}
else {
if (! detail::has_trivial_constructor<T>::value) {
- for (pointer di = data_; di != data_ + size; ++di)
+ for (pointer di = data_; di != data_ + s; ++di)
alloc_.construct (di, value_type());
}
}
@@ -153,19 +153,19 @@
alloc_.deallocate (p_data, size_);
}
- if (!size)
+ if (!s)
data_ = 0;
- size_ = size;
+ size_ = s;
}
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size) {
- resize_internal (size, value_type (), false);
+ void resize (size_type s) {
+ resize_internal (s, value_type (), false);
}
BOOST_UBLAS_INLINE
- void resize (size_type size, value_type init) {
- resize_internal (size, init, true);
+ void resize (size_type s, value_type init) {
+ resize_internal (s, init, true);
}
// Random Access Container
@@ -318,14 +318,14 @@
size_ (0) /*, data_ ()*/ { // size 0 - use bounded_vector to default construct with size N
}
explicit BOOST_UBLAS_INLINE
- bounded_array (size_type size):
- size_ (size) /*, data_ ()*/ {
+ bounded_array (size_type s):
+ size_ (s) /*, data_ ()*/ {
BOOST_UBLAS_CHECK (size_ <= N, bad_size ());
// data_ (an array) elements are already default constructed
}
BOOST_UBLAS_INLINE
- bounded_array (size_type size, const value_type &init):
- size_ (size) /*, data_ ()*/ {
+ bounded_array (size_type s, const value_type &init):
+ size_ (s) /*, data_ ()*/ {
BOOST_UBLAS_CHECK (size_ <= N, bad_size ());
// ISSUE elements should be value constructed here, but we must fill instead as already default constructed
std::fill (begin(), end(), init) ;
@@ -339,16 +339,16 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size) {
- BOOST_UBLAS_CHECK (size <= N, bad_size ());
- size_ = size;
+ void resize (size_type s) {
+ BOOST_UBLAS_CHECK (s <= N, bad_size ());
+ size_ = s;
}
BOOST_UBLAS_INLINE
- void resize (size_type size, value_type init) {
- BOOST_UBLAS_CHECK (size <= N, bad_size ());
- if (size > size_)
- std::fill (data_ + size_, data_ + size, init);
- size_ = size;
+ void resize (size_type s, value_type init) {
+ BOOST_UBLAS_CHECK (s <= N, bad_size ());
+ if (s > size_)
+ std::fill (data_ + size_, data_ + s, init);
+ size_ = s;
}
// Random Access Container
@@ -489,17 +489,17 @@
size_ (0), own_ (true), data_ (new value_type [0]) {
}
explicit BOOST_UBLAS_INLINE
- array_adaptor (size_type size):
- size_ (size), own_ (true), data_ (new value_type [size]) {
+ array_adaptor (size_type s):
+ size_ (s), own_ (true), data_ (new value_type [s]) {
}
BOOST_UBLAS_INLINE
- array_adaptor (size_type size, const value_type &init):
- size_ (size), own_ (true), data_ (new value_type [size]) {
+ array_adaptor (size_type s, const value_type &init):
+ size_ (s), own_ (true), data_ (new value_type [s]) {
std::fill (data_, data_ + size_, init);
}
BOOST_UBLAS_INLINE
- array_adaptor (size_type size, pointer data):
- size_ (size), own_ (false), data_ (data) {}
+ array_adaptor (size_type s, pointer d):
+ size_ (s), own_ (false), data_ (d) {}
BOOST_UBLAS_INLINE
array_adaptor (const array_adaptor &a):
storage_array<self_type> (),
@@ -516,26 +516,26 @@
// Resizing
private:
BOOST_UBLAS_INLINE
- void resize_internal (size_type size, value_type init, bool preserve = true) {
- if (size != size_) {
- pointer data = new value_type [size];
+ void resize_internal (size_type s, value_type init, bool preserve = true) {
+ if (s != size_) {
+ pointer data = new value_type [s];
if (preserve) {
- std::copy (data_, data_ + (std::min) (size, size_), data);
- std::fill (data + (std::min) (size, size_), data + size, init);
+ std::copy (data_, data_ + (std::min) (s, size_), data);
+ std::fill (data + (std::min) (s, size_), data + s, init);
}
if (own_)
delete [] data_;
- size_ = size;
+ size_ = s;
own_ = true;
data_ = data;
}
}
BOOST_UBLAS_INLINE
- void resize_internal (size_type size, pointer data, value_type init, bool preserve = true) {
+ void resize_internal (size_type s, pointer data, value_type init, bool preserve = true) {
if (data != data_) {
if (preserve) {
- std::copy (data_, data_ + (std::min) (size, size_), data);
- std::fill (data + (std::min) (size, size_), data + size, init);
+ std::copy (data_, data_ + (std::min) (s, size_), data);
+ std::fill (data + (std::min) (s, size_), data + s, init);
}
if (own_)
delete [] data_;
@@ -543,26 +543,26 @@
data_ = data;
}
else {
- std::fill (data + (std::min) (size, size_), data + size, init);
+ std::fill (data + (std::min) (s, size_), data + s, init);
}
- size_ = size;
+ size_ = s;
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size) {
- resize_internal (size, value_type (), false);
+ void resize (size_type s) {
+ resize_internal (s, value_type (), false);
}
BOOST_UBLAS_INLINE
- void resize (size_type size, value_type init) {
- resize_internal (size, init, true);
+ void resize (size_type s, value_type init) {
+ resize_internal (s, init, true);
}
BOOST_UBLAS_INLINE
- void resize (size_type size, pointer data) {
- resize_internal (size, data, value_type (), false);
+ void resize (size_type s, pointer data) {
+ resize_internal (s, data, value_type (), false);
}
BOOST_UBLAS_INLINE
- void resize (size_type size, pointer data, value_type init) {
- resize_internal (size, data, init, true);
+ void resize (size_type s, pointer data, value_type init) {
+ resize_internal (s, data, init, true);
}
BOOST_UBLAS_INLINE
@@ -882,9 +882,9 @@
basic_range ():
start_ (0), size_ (0) {}
BOOST_UBLAS_INLINE
- basic_range (size_type start, size_type stop):
- start_ (start), size_ (stop - start) {
- BOOST_UBLAS_CHECK (start_ <= stop, bad_index ());
+ basic_range (size_type in_start, size_type in_stop):
+ start_ (in_start), size_ (in_stop - in_start) {
+ BOOST_UBLAS_CHECK (start_ <= in_stop, bad_index ());
}
BOOST_UBLAS_INLINE
@@ -1055,10 +1055,10 @@
}
BOOST_UBLAS_INLINE
- basic_range preprocess (size_type size) const {
+ basic_range preprocess (size_type s) const {
if (this != &all_)
return *this;
- return basic_range (0, size);
+ return basic_range (0, s);
}
static
BOOST_UBLAS_INLINE
@@ -1094,8 +1094,8 @@
basic_slice ():
start_ (0), stride_ (0), size_ (0) {}
BOOST_UBLAS_INLINE
- basic_slice (size_type start, difference_type stride, size_type size):
- start_ (start), stride_ (stride), size_ (size) {}
+ basic_slice (size_type in_start, difference_type in_stride, size_type in_size):
+ start_ (in_start), stride_ (in_stride), size_ (in_size) {}
BOOST_UBLAS_INLINE
size_type start () const {
@@ -1274,10 +1274,10 @@
}
BOOST_UBLAS_INLINE
- basic_slice preprocess (size_type size) const {
+ basic_slice preprocess (size_type s) const {
if (this != &all_)
return *this;
- return basic_slice (0, 1, size);
+ return basic_slice (0, 1, s);
}
static
BOOST_UBLAS_INLINE
@@ -1316,11 +1316,11 @@
indirect_array ():
size_ (), data_ () {}
explicit BOOST_UBLAS_INLINE
- indirect_array (size_type size):
- size_ (size), data_ (size) {}
+ indirect_array (size_type s):
+ size_ (s), data_ (s) {}
BOOST_UBLAS_INLINE
- indirect_array (size_type size, const array_type &data):
- size_ (size), data_ (data) {}
+ indirect_array (size_type s, const array_type &d):
+ size_ (s), data_ (d) {}
BOOST_UBLAS_INLINE
indirect_array (pointer start, pointer stop):
size_ (stop - start), data_ (stop - start) {
@@ -1376,27 +1376,27 @@
BOOST_UBLAS_INLINE
indirect_array compose (const basic_range<size_type, difference_type> &r) const {
BOOST_UBLAS_CHECK (r.start () + r.size () <= size_, bad_size ());
- array_type data (r.size ());
+ array_type local_data (r.size ());
for (size_type i = 0; i < r.size (); ++ i)
- data [i] = data_ [r.start () + i];
- return indirect_array (r.size (), data);
+ local_data [i] = data_ [r.start () + i];
+ return indirect_array (r.size (), local_data);
}
BOOST_UBLAS_INLINE
indirect_array compose (const basic_slice<size_type, difference_type> &s) const {
BOOST_UBLAS_CHECK (s.start () + s.stride () * (s.size () - (s.size () > 0)) <= size (), bad_size ());
- array_type data (s.size ());
+ array_type local_data (s.size ());
for (size_type i = 0; i < s.size (); ++ i)
- data [i] = data_ [s.start () + s.stride () * i];
- return indirect_array (s.size (), data);
+ local_data [i] = data_ [s.start () + s.stride () * i];
+ return indirect_array (s.size (), local_data);
}
BOOST_UBLAS_INLINE
indirect_array compose (const indirect_array &ia) const {
- array_type data (ia.size_);
+ array_type local_data (ia.size_);
for (size_type i = 0; i < ia.size_; ++ i) {
BOOST_UBLAS_CHECK (ia.data_ [i] <= size_, bad_size ());
- data [i] = data_ [ia.data_ [i]];
+ local_data [i] = data_ [ia.data_ [i]];
}
- return indirect_array (ia.size_, data);
+ return indirect_array (ia.size_, local_data);
}
// Comparison
@@ -1534,11 +1534,11 @@
}
BOOST_UBLAS_INLINE
- indirect_array preprocess (size_type size) const {
+ indirect_array preprocess (size_type s) const {
if (this != &all_)
return *this;
- indirect_array ia (size);
- for (size_type i = 0; i < size; ++ i)
+ indirect_array ia (s);
+ for (size_type i = 0; i < s; ++ i)
ia (i) = i;
return ia;
}
@@ -1666,8 +1666,8 @@
typedef const value_type const_reference;
BOOST_UBLAS_INLINE
- index_pair_array(size_type size, V1& data1, V2& data2) :
- size_(size),data1_(data1),data2_(data2) {}
+ index_pair_array(size_type s, V1& data1, V2& data2) :
+ size_(s),data1_(data1),data2_(data2) {}
BOOST_UBLAS_INLINE
size_type size() const {
@@ -1841,8 +1841,8 @@
typedef const value_type const_reference;
BOOST_UBLAS_INLINE
- index_triple_array(size_type size, V1& data1, V2& data2, V3& data3) :
- size_(size),data1_(data1),data2_(data2),data3_(data3) {}
+ index_triple_array(size_type s, V1& data1, V2& data2, V3& data3) :
+ size_(s),data1_(data1),data2_(data2),data3_(data3) {}
BOOST_UBLAS_INLINE
size_type size() const {
diff -aruN a/boost/numeric/ublas/storage_sparse.hpp b/boost/numeric/ublas/storage_sparse.hpp
--- a/boost/numeric/ublas/storage_sparse.hpp 2009-03-09 13:24:11.000000000 -0700
+++ b/boost/numeric/ublas/storage_sparse.hpp 2012-02-07 15:25:24.635307503 -0800
@@ -263,38 +263,38 @@
private:
// Resizing - implicitly exposses uninitialized (but default constructed) mapped_type
BOOST_UBLAS_INLINE
- void resize (size_type size) {
+ void resize (size_type s) {
BOOST_UBLAS_CHECK (size_ <= capacity_, internal_logic ());
- if (size > capacity_) {
- const size_type capacity = size << 1;
- BOOST_UBLAS_CHECK (capacity, internal_logic ());
- pointer data = alloc_.allocate (capacity);
- std::uninitialized_copy (data_, data_ + (std::min) (size, size_), data);
- std::uninitialized_fill (data + (std::min) (size, size_), data + capacity, value_type ());
+ if (s > capacity_) {
+ const size_type cap = s << 1;
+ BOOST_UBLAS_CHECK (cap, internal_logic ());
+ pointer data = alloc_.allocate (cap);
+ std::uninitialized_copy (data_, data_ + (std::min) (s, size_), data);
+ std::uninitialized_fill (data + (std::min) (s, size_), data + cap, value_type ());
if (capacity_) {
std::for_each (data_, data_ + capacity_, static_destroy);
alloc_.deallocate (data_, capacity_);
}
- capacity_ = capacity;
+ capacity_ = cap;
data_ = data;
}
- size_ = size;
+ size_ = s;
BOOST_UBLAS_CHECK (size_ <= capacity_, internal_logic ());
}
public:
// Reserving
BOOST_UBLAS_INLINE
- void reserve (size_type capacity) {
+ void reserve (size_type cap) {
BOOST_UBLAS_CHECK (size_ <= capacity_, internal_logic ());
// Reduce capacity_ if size_ allows
- BOOST_UBLAS_CHECK (capacity >= size_, bad_size ());
+ BOOST_UBLAS_CHECK (cap >= size_, bad_size ());
pointer data;
- if (capacity) {
- data = alloc_.allocate (capacity);
+ if (cap) {
+ data = alloc_.allocate (cap);
std::uninitialized_copy (data_, data_ + size_, data);
- std::uninitialized_fill (data + size_, data + capacity, value_type ());
+ std::uninitialized_fill (data + size_, data + cap, value_type ());
}
else
data = 0;
@@ -303,7 +303,7 @@
std::for_each (data_, data_ + capacity_, static_destroy);
alloc_.deallocate (data_, capacity_);
}
- capacity_ = capacity;
+ capacity_ = cap;
data_ = data;
BOOST_UBLAS_CHECK (size_ <= capacity_, internal_logic ());
}
diff -aruN a/boost/numeric/ublas/symmetric.hpp b/boost/numeric/ublas/symmetric.hpp
--- a/boost/numeric/ublas/symmetric.hpp 2009-10-06 16:53:19.000000000 -0700
+++ b/boost/numeric/ublas/symmetric.hpp 2012-02-07 15:25:24.635307503 -0800
@@ -76,14 +76,14 @@
size_ (BOOST_UBLAS_SAME (size, size)), data_ (triangular_type::packed_size (layout_type (), size, size)) {
}
BOOST_UBLAS_INLINE
- symmetric_matrix (size_type size1, size_type size2):
+ symmetric_matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size_ (BOOST_UBLAS_SAME (size1, size2)), data_ (triangular_type::packed_size (layout_type (), size1, size2)) {
+ size_ (BOOST_UBLAS_SAME (s1, s2)), data_ (triangular_type::packed_size (layout_type (), s1, s2)) {
}
BOOST_UBLAS_INLINE
- symmetric_matrix (size_type size, const array_type &data):
+ symmetric_matrix (size_type size, const array_type &d):
matrix_container<self_type> (),
- size_ (size), data_ (data) {}
+ size_ (size), data_ (d) {}
BOOST_UBLAS_INLINE
symmetric_matrix (const symmetric_matrix &m):
matrix_container<self_type> (),
@@ -130,8 +130,8 @@
}
}
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
- resize (BOOST_UBLAS_SAME (size1, size2), preserve);
+ void resize (size_type s1, size_type s2, bool preserve = true) {
+ resize (BOOST_UBLAS_SAME (s1, s2), preserve);
}
BOOST_UBLAS_INLINE
void resize_packed_preserve (size_type size) {
@@ -944,9 +944,9 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- symmetric_adaptor (matrix_type &data):
+ symmetric_adaptor (matrix_type &d):
matrix_expression<self_type> (),
- data_ (data) {
+ data_ (d) {
BOOST_UBLAS_CHECK (data_.size1 () == data_.size2 (), bad_size ());
}
BOOST_UBLAS_INLINE
@@ -1201,11 +1201,11 @@
it1_begin_ (), it1_end_ (), it1_ (),
it2_begin_ (), it2_end_ (), it2_ () {}
BOOST_UBLAS_INLINE
- const_iterator1 (const self_type &m, int begin, int end,
+ const_iterator1 (const self_type &m, int b, int e,
const const_subiterator1_type &it1_begin, const const_subiterator1_type &it1_end,
const const_subiterator2_type &it2_begin, const const_subiterator2_type &it2_end):
container_const_reference<self_type> (m),
- begin_ (begin), end_ (end), current_ (begin),
+ begin_ (b), end_ (e), current_ (b),
it1_begin_ (it1_begin), it1_end_ (it1_end), it1_ (it1_begin_),
it2_begin_ (it2_begin), it2_end_ (it2_end), it2_ (it2_begin_) {
if (current_ == 0 && it1_ == it1_end_)
@@ -1648,11 +1648,11 @@
it1_begin_ (), it1_end_ (), it1_ (),
it2_begin_ (), it2_end_ (), it2_ () {}
BOOST_UBLAS_INLINE
- const_iterator2 (const self_type &m, int begin, int end,
+ const_iterator2 (const self_type &m, int b, int e,
const const_subiterator1_type &it1_begin, const const_subiterator1_type &it1_end,
const const_subiterator2_type &it2_begin, const const_subiterator2_type &it2_end):
container_const_reference<self_type> (m),
- begin_ (begin), end_ (end), current_ (begin),
+ begin_ (b), end_ (e), current_ (b),
it1_begin_ (it1_begin), it1_end_ (it1_end), it1_ (it1_begin_),
it2_begin_ (it2_begin), it2_end_ (it2_end), it2_ (it2_begin_) {
if (current_ == 0 && it1_ == it1_end_)
diff -aruN a/boost/numeric/ublas/triangular.hpp b/boost/numeric/ublas/triangular.hpp
--- a/boost/numeric/ublas/triangular.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/triangular.hpp 2012-02-07 15:25:24.639286239 -0800
@@ -106,14 +106,14 @@
matrix_container<self_type> (),
size1_ (0), size2_ (0), data_ (0) {}
BOOST_UBLAS_INLINE
- triangular_matrix (size_type size1, size_type size2):
+ triangular_matrix (size_type s1, size_type s2):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (triangular_type::packed_size (layout_type (), size1, size2)) {
+ size1_ (s1), size2_ (s2), data_ (triangular_type::packed_size (layout_type (), s1, s2)) {
}
BOOST_UBLAS_INLINE
- triangular_matrix (size_type size1, size_type size2, const array_type &data):
+ triangular_matrix (size_type s1, size_type s2, const array_type &d):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (data) {}
+ size1_ (s1), size2_ (s2), data_ (d) {}
BOOST_UBLAS_INLINE
triangular_matrix (const triangular_matrix &m):
matrix_container<self_type> (),
@@ -149,21 +149,21 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
if (preserve) {
- self_type temporary (size1, size2);
+ self_type temporary (s1, s2);
detail::matrix_resize_preserve<layout_type, triangular_type> (*this, temporary);
}
else {
- data ().resize (triangular_type::packed_size (layout_type (), size1, size2));
- size1_ = size1;
- size2_ = size2;
+ data ().resize (triangular_type::packed_size (layout_type (), s1, s2));
+ size1_ = s1;
+ size2_ = s2;
}
}
BOOST_UBLAS_INLINE
- void resize_packed_preserve (size_type size1, size_type size2) {
- size1_ = size1;
- size2_ = size2;
+ void resize_packed_preserve (size_type s1, size_type s2) {
+ size1_ = s1;
+ size2_ = s2;
data ().resize (triangular_type::packed_size (layout_type (), size1_, size2_), value_type ());
}
@@ -996,9 +996,9 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- triangular_adaptor (matrix_type &data):
+ triangular_adaptor (matrix_type &d):
matrix_expression<self_type> (),
- data_ (data) {}
+ data_ (d) {}
BOOST_UBLAS_INLINE
triangular_adaptor (const triangular_adaptor &m):
matrix_expression<self_type> (),
diff -aruN a/boost/numeric/ublas/vector.hpp b/boost/numeric/ublas/vector.hpp
--- a/boost/numeric/ublas/vector.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/vector.hpp 2012-02-07 15:25:24.639286239 -0800
@@ -72,9 +72,9 @@
/// By default, its elements are initialized to 0.
/// \param size initial size of the vector
explicit BOOST_UBLAS_INLINE
- vector (size_type size):
+ vector (size_type s):
vector_container<self_type> (),
- data_ (size) {
+ data_ (s) {
}
/// \brief Constructor of a vector by copying from another container
@@ -83,25 +83,25 @@
/// \param data container of type \c A
/// \todo remove this definition because \c size is not used
BOOST_UBLAS_INLINE
- vector (size_type size, const array_type &data):
+ vector (size_type s, const array_type &d):
vector_container<self_type> (),
- data_ (data) {}
+ data_ (d) {}
/// \brief Constructor of a vector by copying from another container
/// This type has the generic name \c array_typ within the vector definition.
/// \param data container of type \c A
BOOST_UBLAS_INLINE
- vector (const array_type &data):
+ vector (const array_type &d):
vector_container<self_type> (),
- data_ (data) {}
+ data_ (d) {}
/// \brief Constructor of a vector with a predefined size and a unique initial value
/// \param size of the vector
/// \param init value to assign to each element of the vector
BOOST_UBLAS_INLINE
- vector (size_type size, const value_type &init):
+ vector (size_type s, const value_type &init):
vector_container<self_type> (),
- data_ (size, init) {}
+ data_ (s, init) {}
/// \brief Copy-constructor of a vector
/// \param v is the vector to be duplicated
@@ -175,11 +175,11 @@
/// \param size new size of the vector
/// \param preserve if true, keep values
BOOST_UBLAS_INLINE
- void resize (size_type size, bool preserve = true) {
+ void resize (size_type s, bool preserve = true) {
if (preserve)
- data ().resize (size, typename A::value_type ());
+ data ().resize (s, typename A::value_type ());
else
- data ().resize (size);
+ data ().resize (s);
}
// ---------------
@@ -900,9 +900,9 @@
vector_container<self_type> (),
size_ (0) {}
explicit BOOST_UBLAS_INLINE
- zero_vector (size_type size):
+ zero_vector (size_type s):
vector_container<self_type> (),
- size_ (size) {}
+ size_ (s) {}
BOOST_UBLAS_INLINE
zero_vector (const zero_vector &v):
vector_container<self_type> (),
@@ -916,8 +916,8 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size, bool /*preserve*/ = true) {
- size_ = size;
+ void resize (size_type s, bool /*preserve*/ = true) {
+ size_ = s;
}
// Element support
@@ -1110,9 +1110,9 @@
/// \param size is the dimension of the vector
/// \param index is the order of the vector
BOOST_UBLAS_INLINE
- explicit unit_vector (size_type size, size_type index = 0):
+ explicit unit_vector (size_type s, size_type i = 0):
vector_container<self_type> (),
- size_ (size), index_ (index) {}
+ size_ (s), index_ (i) {}
/// \brief Copy-constructor
BOOST_UBLAS_INLINE
@@ -1141,8 +1141,8 @@
/// \brief Resize the vector. The values are preserved by default (i.e. the index does not change)
/// \param size is the new size of the vector
BOOST_UBLAS_INLINE
- void resize (size_type size, bool /*preserve*/ = true) {
- size_ = size;
+ void resize (size_type s, bool /*preserve*/ = true) {
+ size_ = s;
}
// Element support
@@ -1352,9 +1352,9 @@
vector_container<self_type> (),
size_ (0), value_ () {}
BOOST_UBLAS_INLINE
- explicit scalar_vector (size_type size, const value_type &value = value_type(1)):
+ explicit scalar_vector (size_type s, const value_type &value = value_type(1)):
vector_container<self_type> (),
- size_ (size), value_ (value) {}
+ size_ (s), value_ (value) {}
BOOST_UBLAS_INLINE
scalar_vector (const scalar_vector &v):
vector_container<self_type> (),
@@ -1368,8 +1368,8 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size, bool /*preserve*/ = true) {
- size_ = size;
+ void resize (size_type s, bool /*preserve*/ = true) {
+ size_ = s;
}
// Element support
@@ -1594,8 +1594,8 @@
c_vector ():
size_ (N) /* , data_ () */ {}
explicit BOOST_UBLAS_INLINE
- c_vector (size_type size):
- size_ (size) /* , data_ () */ {
+ c_vector (size_type s):
+ size_ (s) /* , data_ () */ {
if (size_ > N)
bad_size ().raise ();
}
@@ -1631,10 +1631,10 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size, bool preserve = true) {
- if (size > N)
+ void resize (size_type s, bool preserve = true) {
+ if (s > N)
bad_size ().raise ();
- size_ = size;
+ size_ = s;
}
// Element support
diff -aruN a/boost/numeric/ublas/vector_of_vector.hpp b/boost/numeric/ublas/vector_of_vector.hpp
--- a/boost/numeric/ublas/vector_of_vector.hpp 2007-11-25 10:07:19.000000000 -0800
+++ b/boost/numeric/ublas/vector_of_vector.hpp 2012-02-07 15:25:24.639286239 -0800
@@ -66,9 +66,9 @@
storage_invariants ();
}
BOOST_UBLAS_INLINE
- generalized_vector_of_vector (size_type size1, size_type size2, size_type non_zeros = 0):
+ generalized_vector_of_vector (size_type s1, size_type s2, size_type non_zeros = 0):
matrix_container<self_type> (),
- size1_ (size1), size2_ (size2), data_ (layout_type::size_M (size1_, size2_) + 1) {
+ size1_ (s1), size2_ (s2), data_ (layout_type::size_M (size1_, size2_) + 1) {
const size_type sizeM = layout_type::size_M (size1_, size2_);
const size_type sizem = layout_type::size_m (size1_, size2_);
for (size_type i = 0; i < sizeM; ++ i) // create size1 vector elements
@@ -132,10 +132,10 @@
// Resizing
BOOST_UBLAS_INLINE
- void resize (size_type size1, size_type size2, bool preserve = true) {
+ void resize (size_type s1, size_type s2, bool preserve = true) {
const size_type oldM = layout_type::size_M (size1_, size2_);
- size1_ = size1;
- size2_ = size2;
+ size1_ = s1;
+ size2_ = s2;
const size_type sizeM = layout_type::size_M (size1_, size2_);
const size_type sizem = layout_type::size_m (size1_, size2_);
data ().resize (sizeM + 1, preserve);
diff -aruN a/boost/numeric/ublas/vector_proxy.hpp b/boost/numeric/ublas/vector_proxy.hpp
--- a/boost/numeric/ublas/vector_proxy.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/vector_proxy.hpp 2012-02-07 15:25:24.639286239 -0800
@@ -59,15 +59,15 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- vector_range (vector_type &data, const range_type &r):
- data_ (data), r_ (r.preprocess (data.size ())) {
+ vector_range (vector_type &d, const range_type &r):
+ data_ (d), r_ (r.preprocess (d.size ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (r_.start () <= data_.size () &&
// r_.start () + r_.size () <= data_.size (), bad_index ());
}
BOOST_UBLAS_INLINE
- vector_range (const vector_closure_type &data, const range_type &r, bool):
- data_ (data), r_ (r.preprocess (data.size ())) {
+ vector_range (const vector_closure_type &d, const range_type &r, bool):
+ data_ (d), r_ (r.preprocess (d.size ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (r_.start () <= data_.size () &&
// r_.start () + r_.size () <= data_.size (), bad_index ());
@@ -614,15 +614,15 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- vector_slice (vector_type &data, const slice_type &s):
- data_ (data), s_ (s.preprocess (data.size ())) {
+ vector_slice (vector_type &d, const slice_type &s):
+ data_ (d), s_ (s.preprocess (d.size ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (s_.start () <= data_.size () &&
// s_.start () + s_.stride () * (s_.size () - (s_.size () > 0)) <= data_.size (), bad_index ());
}
BOOST_UBLAS_INLINE
- vector_slice (const vector_closure_type &data, const slice_type &s, int):
- data_ (data), s_ (s.preprocess (data.size ())) {
+ vector_slice (const vector_closure_type &d, const slice_type &s, int):
+ data_ (d), s_ (s.preprocess (d.size ())) {
// Early checking of preconditions here.
// BOOST_UBLAS_CHECK (s_.start () <= data_.size () &&
// s_.start () + s_.stride () * (s_.size () - (s_.size () > 0)) <= data_.size (), bad_index ());
@@ -1159,14 +1159,14 @@
// Construction and destruction
BOOST_UBLAS_INLINE
- vector_indirect (vector_type &data, size_type size):
- data_ (data), ia_ (size) {}
+ vector_indirect (vector_type &d, size_type s):
+ data_ (d), ia_ (s) {}
BOOST_UBLAS_INLINE
- vector_indirect (vector_type &data, const indirect_array_type &ia):
- data_ (data), ia_ (ia.preprocess (data.size ())) {}
+ vector_indirect (vector_type &d, const indirect_array_type &ia):
+ data_ (d), ia_ (ia.preprocess (d.size ())) {}
BOOST_UBLAS_INLINE
- vector_indirect (const vector_closure_type &data, const indirect_array_type &ia, int):
- data_ (data), ia_ (ia.preprocess (data.size ())) {}
+ vector_indirect (const vector_closure_type &d, const indirect_array_type &ia, int):
+ data_ (d), ia_ (ia.preprocess (d.size ())) {}
// Accessors
BOOST_UBLAS_INLINE
diff -aruN a/boost/numeric/ublas/vector_sparse.hpp b/boost/numeric/ublas/vector_sparse.hpp
--- a/boost/numeric/ublas/vector_sparse.hpp 2010-07-04 23:06:24.000000000 -0700
+++ b/boost/numeric/ublas/vector_sparse.hpp 2012-02-07 15:25:24.639286239 -0800
@@ -309,9 +309,9 @@
vector_container<self_type> (),
size_ (0), data_ () {}
BOOST_UBLAS_INLINE
- mapped_vector (size_type size, size_type non_zeros = 0):
+ mapped_vector (size_type s, size_type non_zeros = 0):
vector_container<self_type> (),
- size_ (size), data_ () {
+ size_ (s), data_ () {
detail::map_reserve (data(), restrict_capacity (non_zeros));
}
BOOST_UBLAS_INLINE
@@ -360,8 +360,8 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size, bool preserve = true) {
- size_ = size;
+ void resize (size_type s, bool preserve = true) {
+ size_ = s;
if (preserve) {
data ().erase (data ().lower_bound(size_), data ().end());
}
@@ -832,9 +832,9 @@
storage_invariants ();
}
explicit BOOST_UBLAS_INLINE
- compressed_vector (size_type size, size_type non_zeros = 0):
+ compressed_vector (size_type s, size_type non_zeros = 0):
vector_container<self_type> (),
- size_ (size), capacity_ (restrict_capacity (non_zeros)), filled_ (0),
+ size_ (s), capacity_ (restrict_capacity (non_zeros)), filled_ (0),
index_data_ (capacity_), value_data_ (capacity_) {
storage_invariants ();
}
@@ -887,8 +887,8 @@
return value_data_;
}
BOOST_UBLAS_INLINE
- void set_filled (const typename index_array_type::size_type & filled) {
- filled_ = filled;
+ void set_filled (const typename index_array_type::size_type & f) {
+ filled_ = f;
storage_invariants ();
}
BOOST_UBLAS_INLINE
@@ -910,14 +910,14 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size, bool preserve = true) {
- size_ = size;
+ void resize (size_type s, bool preserve = true) {
+ size_ = s;
capacity_ = restrict_capacity (capacity_);
if (preserve) {
index_data_. resize (capacity_, size_type ());
value_data_. resize (capacity_, value_type ());
filled_ = (std::min) (capacity_, filled_);
- while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= size)) {
+ while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= s)) {
--filled_;
}
}
@@ -1473,9 +1473,9 @@
storage_invariants ();
}
explicit BOOST_UBLAS_INLINE
- coordinate_vector (size_type size, size_type non_zeros = 0):
+ coordinate_vector (size_type s, size_type non_zeros = 0):
vector_container<self_type> (),
- size_ (size), capacity_ (restrict_capacity (non_zeros)),
+ size_ (s), capacity_ (restrict_capacity (non_zeros)),
filled_ (0), sorted_filled_ (filled_), sorted_ (true),
index_data_ (capacity_), value_data_ (capacity_) {
storage_invariants ();
@@ -1531,9 +1531,9 @@
return value_data_;
}
BOOST_UBLAS_INLINE
- void set_filled (const typename index_array_type::size_type &sorted, const typename index_array_type::size_type &filled) {
+ void set_filled (const typename index_array_type::size_type &sorted, const typename index_array_type::size_type &f) {
sorted_filled_ = sorted;
- filled_ = filled;
+ filled_ = f;
storage_invariants ();
}
BOOST_UBLAS_INLINE
@@ -1556,16 +1556,16 @@
}
public:
BOOST_UBLAS_INLINE
- void resize (size_type size, bool preserve = true) {
+ void resize (size_type s, bool preserve = true) {
if (preserve)
sort (); // remove duplicate elements.
- size_ = size;
+ size_ = s;
capacity_ = restrict_capacity (capacity_);
if (preserve) {
index_data_. resize (capacity_, size_type ());
value_data_. resize (capacity_, value_type ());
filled_ = (std::min) (capacity_, filled_);
- while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= size)) {
+ while ((filled_ > 0) && (zero_based(index_data_[filled_ - 1]) >= s)) {
--filled_;
}
}
@@ -1813,19 +1813,19 @@
std::inplace_merge (ipa.begin (), iunsorted, ipa.end ());
// sum duplicates with += and remove
- size_type filled = 0;
+ size_type f = 0;
for (size_type i = 1; i < filled_; ++ i) {
- if (index_data_ [filled] != index_data_ [i]) {
- ++ filled;
- if (filled != i) {
- index_data_ [filled] = index_data_ [i];
- value_data_ [filled] = value_data_ [i];
+ if (index_data_ [f] != index_data_ [i]) {
+ ++ f;
+ if (f != i) {
+ index_data_ [f] = index_data_ [i];
+ value_data_ [f] = value_data_ [i];
}
} else {
- value_data_ [filled] += value_data_ [i];
+ value_data_ [f] += value_data_ [i];
}
}
- filled_ = filled + 1;
+ filled_ = f + 1;
sorted_filled_ = filled_;
sorted_ = true;
storage_invariants ();