Boost logo

Ublas :

Subject: [ublas] blas_1::rot and matrix proxies
From: Matwey V. Kornilov (matwey.kornilov_at_[hidden])
Date: 2011-02-06 12:56:38


Hi,

There is an issue with the following code:

        matrix< double > A(2,2);
        A(0,0)=A(1,1)=2;
        A(1,0)=A(0,1)=0;
        std::cout << A << std::endl;
        blas_1::rot(1.0,column(A,0),0.0,column(A,1)); // here
        std::cout << A << std::endl;

It isn't possible to convert from T to T& and this way the code is wrong. I
ought to declare two matrix_column objects to pass matrix_column&. But it is
two more lines of code. I would like to keep it simple.

Is there a trick to allow me write this code?