On Wed, Mar 9, 2011 at 4:09 AM, Mathias Gaunard <mathias.gaunard@ens-lyon.org> wrote:
On 09/03/2011 09:59, sguazt wrote:
namespace ublas = ::boost::numeric::ublas;

template<typename MatrixT>
inline
ublas::matrix_range<MatrixT>  topleft(MatrixT&  M)
{
  return ublas::subrange(M, 0, 3, 0, 3);
}
You might want to provide a const overload as well.
 
Why would I want a const overload?  I want to be able to change the values in the matrix passed to the function.
 
Ryan