mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-26 17:12:10 +00:00
FIX use new layout_type::index_Mm operations. Thanks Gunter for spoting this
svn path=/trunk/boost/boost/numeric/ublas/; revision=34554
This commit is contained in:
@@ -1100,11 +1100,11 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
// Element access
|
||||
BOOST_UBLAS_INLINE
|
||||
const_reference operator () (size_type i, size_type j) const {
|
||||
return data () [layout_type::element1 (i, size1_, j, size2_)] [layout_type::element2 (i, size1_, j, size2_)];
|
||||
return data () [layout_type::index_M (i, j)] [layout_type::index_m (i, j)];
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
reference at_element (size_type i, size_type j) {
|
||||
return data () [layout_type::element1 (i, size1_, j, size2_)] [layout_type::element2 (i, size1_, j, size2_)];
|
||||
return data () [layout_type::index_M (i, j)] [layout_type::index_m (i, j)];
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
reference operator () (size_type i, size_type j) {
|
||||
|
||||
@@ -119,8 +119,8 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
|
||||
for (size_type i = 0; i < e1.nnz(); ++i) {
|
||||
size_type row_index = layout_type::element1( e1.index1_data () [i], size1, e1.index2_data () [i], size2 );
|
||||
size_type col_index = layout_type::element2( e1.index1_data () [i], size1, e1.index2_data () [i], size2 );
|
||||
size_type row_index = layout_type::index_M( e1.index1_data () [i], e1.index2_data () [i] );
|
||||
size_type col_index = layout_type::index_m( e1.index1_data () [i], e1.index2_data () [i] );
|
||||
v( row_index ) += e1.value_data () [i] * e2 () (col_index);
|
||||
}
|
||||
return v;
|
||||
|
||||
Reference in New Issue
Block a user