mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-22 03:42:19 +00:00
Complete index1 fixes from Andreas
This commit is contained in:
@@ -2479,7 +2479,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef typename IA::value_type size_type;
|
||||
// size_type for the data arrays.
|
||||
typedef typename IA::size_type array_size_type;
|
||||
// FIXME difference type for sprase storage iterators should it be in the container?
|
||||
// FIXME difference type for sparse storage iterators should it be in the container?
|
||||
typedef typename IA::difference_type difference_type;
|
||||
typedef T value_type;
|
||||
typedef const T &const_reference;
|
||||
@@ -2598,6 +2598,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
value_array_type &value_data () {
|
||||
return value_data_;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
void complete_index1_data () {
|
||||
while (filled1_ <= layout_type::size1 (size1_, size2_)) {
|
||||
this->index1_data_ [filled1_] = k_based (filled2_);
|
||||
++ this->filled1_;
|
||||
}
|
||||
}
|
||||
|
||||
// Resizing
|
||||
private:
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
size_type col_index = layout_type::element2( e1.index1_data () [i], size1, e1.index2_data () [i], size2 );
|
||||
v( row_index ) += e1.value_data () [i] * e2 () (col_index);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
@@ -288,7 +289,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef typename V::size_type size_type;
|
||||
typedef typename V::value_type value_type;
|
||||
|
||||
for (size_type j = 0; j < e2.size2 (); ++ j) {
|
||||
for (size_type j = 0; j < e2.filled1 () -1; ++ j) {
|
||||
size_type begin = e2.index1_data () [j];
|
||||
size_type end = e2.index1_data () [j + 1];
|
||||
value_type t (v (j));
|
||||
@@ -307,7 +308,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
V &v, row_major_tag) {
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
for (size_type i = 0; i < e2.size1 (); ++ i) {
|
||||
for (size_type i = 0; i < e2.filled1 () -1; ++ i) {
|
||||
size_type begin = e2.index1_data () [i];
|
||||
size_type end = e2.index1_data () [i + 1];
|
||||
for (size_type j = begin; j < end; ++ j)
|
||||
|
||||
Reference in New Issue
Block a user