Boost logo

Boost :

From: Joerg Walter (jhr.walter_at_[hidden])
Date: 2002-07-17 02:23:35

----- Original Message -----
From: "Toon Knapen" <toon.knapen_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, July 16, 2002 2:48 PM
Subject: [boost] ublas: matrix_range< matrix_range< T > > == matrix_range< T

> Currently a matrix_range of a matrix_range is different in type than just
> matrix_range. Would'nt it be better that both are the same. IIRC, taking
> element of matrix_range< matrix_range > > will require two dereferences
> we could translate the ranges themselves when constructing piled ranges.
> This would increase performance AFAICT and improve flexibility !

For sufficient compatible compilers the following project() overloads in
matrix_pr.h should cause the desired effect

    template<class M>
    matrix_range<M> project (matrix_range<M> &data, const range &r1, const
range &r2) {
        return data.project (r1, r2);
    template<class M>
    const matrix_range<const M> project (const matrix_range<const M> &data,
const range &r1, const range &r2) {
        return data.project (r1, r2);



Boost list run by bdawes at, gregod at, cpdaniel at, john at