Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Boost-Users] ublas: identity_matrix and row()

Expand Messages
  • jhr.walter@t-online.de
    Hi Alex, ... Ouch! Another bug. I ve added typedef matrix_reference closure_type; to identity_matrix (and zero_matrix and something similar to
    Message 1 of 1 , May 7, 2003
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.