Boost logo

Boost Users :

From: jhr.walter_at_[hidden]
Date: 2003-05-07 19:25:26


Hi Alex,

you wrote:

> It seems that identity_matrix does not work with row(); is this
> supposed to be the case? For example:
>
> ----------- code excerpt -----------
> #include <boost/numeric/ublas/matrix.hpp>
> #include <boost/numeric/ublas/vector.hpp>
> int main () {
> using namespace boost::numeric::ublas;
> //matrix<double> im(3,3); // this works
> identity_matrix<double> im(3); // this does not
> boost::numeric::ublas::vector<double> v = row(im,1);
> }
> ------------------------------------
>
> Using matrix<> im, the code works fine, but using
> identity_matrix<> im, g++ blows up with four or five errors of the form
> included below, on lines 529, 61, 100, 104, and 84 of matrix_proxy.hpp.

Ouch! Another bug. I've added

        typedef matrix_reference<self_type> closure_type;

to identity_matrix<> (and zero_matrix<> and something similar to
unit_vector<> and zero_vector<>) in my local copy and your program compiles
now with g++.

> I've got quite a lot of questions on ublas, even after combing
> through the ublas and boost documentation, wiki, and mailing lists at
> great length. Is this an appropriate forum to pepper with questions, or is
> there some other manual I can RTFM first?

If all your questions are hidden bug reports, then please feel free to CC
your questions to http://groups.yahoo.com/group/ublas-dev ;-)

Thanks,

Joerg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net