diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 68a9d3f8..a8cc1372 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -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) { diff --git a/include/boost/numeric/ublas/operation.hpp b/include/boost/numeric/ublas/operation.hpp index 48bf2056..0a624c48 100644 --- a/include/boost/numeric/ublas/operation.hpp +++ b/include/boost/numeric/ublas/operation.hpp @@ -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;