|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56611 - trunk/boost/numeric/ublas
From: guwi17_at_[hidden]
Date: 2009-10-05 18:31:09
Author: guwi17
Date: 2009-10-05 18:31:08 EDT (Mon, 05 Oct 2009)
New Revision: 56611
URL: http://svn.boost.org/trac/boost/changeset/56611
Log:
see #3230: coordinate_vector::set_filled() has a bug (Incomplete)
* removed wrong return statement
Text files modified:
trunk/boost/numeric/ublas/vector_sparse.hpp | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
Modified: trunk/boost/numeric/ublas/vector_sparse.hpp
==============================================================================
--- trunk/boost/numeric/ublas/vector_sparse.hpp (original)
+++ trunk/boost/numeric/ublas/vector_sparse.hpp 2009-10-05 18:31:08 EDT (Mon, 05 Oct 2009)
@@ -53,8 +53,8 @@
else
*p = s;
}
-
- public:
+
+ public:
// Construction and destruction
sparse_vector_element (vector_type &v, size_type i):
container_reference<vector_type> (v), i_ (i) {
@@ -428,7 +428,7 @@
return;
data ().erase (it);
}
-
+
// Zeroing
BOOST_UBLAS_INLINE
void clear () {
@@ -552,11 +552,11 @@
class iterator;
// Element lookup
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
const_iterator find (size_type i) const {
return const_iterator (*this, data ().lower_bound (i));
}
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
iterator find (size_type i) {
return iterator (*this, data ().lower_bound (i));
}
@@ -992,7 +992,7 @@
}
storage_invariants ();
}
-
+
// Zeroing
BOOST_UBLAS_INLINE
void clear () {
@@ -1143,11 +1143,11 @@
class iterator;
// Element lookup
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
const_iterator find (size_type i) const {
return const_iterator (*this, detail::lower_bound (index_data_.begin (), index_data_.begin () + filled_, k_based (i), std::less<size_type> ()));
}
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
iterator find (size_type i) {
return iterator (*this, detail::lower_bound (index_data_.begin (), index_data_.begin () + filled_, k_based (i), std::less<size_type> ()));
}
@@ -1479,7 +1479,6 @@
sorted_filled_ = sorted;
filled_ = filled;
storage_invariants ();
- return filled_;
}
BOOST_UBLAS_INLINE
index_array_type &index_data () {
@@ -1627,7 +1626,7 @@
}
storage_invariants ();
}
-
+
// Zeroing
BOOST_UBLAS_INLINE
void clear () {
@@ -1636,7 +1635,7 @@
sorted_ = true;
storage_invariants ();
}
-
+
// Assignment
BOOST_UBLAS_INLINE
coordinate_vector &operator = (const coordinate_vector &v) {
@@ -1756,7 +1755,7 @@
// sort new elements and merge
std::sort (iunsorted, ipa.end ());
std::inplace_merge (ipa.begin (), iunsorted, ipa.end ());
-
+
// sum duplicates with += and remove
size_type filled = 0;
for (size_type i = 1; i < filled_; ++ i) {
@@ -1821,12 +1820,12 @@
class iterator;
// Element lookup
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
const_iterator find (size_type i) const {
sort ();
return const_iterator (*this, detail::lower_bound (index_data_.begin (), index_data_.begin () + filled_, k_based (i), std::less<size_type> ()));
}
- // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
+ // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it.
iterator find (size_type i) {
sort ();
return iterator (*this, detail::lower_bound (index_data_.begin (), index_data_.begin () + filled_, k_based (i), std::less<size_type> ()));
@@ -2038,7 +2037,7 @@
size_type size_;
size_type capacity_;
mutable typename index_array_type::size_type filled_;
- mutable typename index_array_type::size_type sorted_filled_;
+ mutable typename index_array_type::size_type sorted_filled_;
mutable bool sorted_;
mutable index_array_type index_data_;
mutable value_array_type value_data_;
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