Boost logo

Boost Users :

From: Alexander G Winbow (awinbow_at_[hidden])
Date: 2003-05-07 15:37:39


        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.

        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?

                                                Thanks,
                                                        -Alex

-------- errors excerpt compiling the above ---------
/home/linux/phcomp/ph141w/ph141wam/libraries/boost_1_30_0/boost/numeric/ublas/matrix_proxy.hpp:
In instantiation of
`boost::numeric::ublas::matrix_row<boost::numeric::ublas::identity_matrix<double>
>':
rowtest.cpp:10: instantiated from here
/home/linux/phcomp/ph141w/ph141wam/libraries/boost_1_30_0/boost/numeric/ublas/matrix_proxy.hpp:529:
no
type named `closure_type' in `class
boost::numeric::ublas::identity_matrix<double>'
/home/linux/phcomp/ph141w/ph141wam/libraries/boost_1_30_0/boost/numeric/ublas/matrix_proxy.hpp:529:
template
argument 3 is invalid
-----------------------------------------------------------


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