|
Ublas : |
Subject: Re: [ublas] Problem with nested products
From: Michael Wand (michael.wand_at_[hidden])
Date: 2010-12-23 07:00:38
Hello,
thanks to everyone for the information! As I said, I see that I've got NO idea
about linear algebra systems. And I honestly don't see any hint on
http://www.boost.org/doc/libs/1_45_0/libs/numeric/ublas/doc/operations_overview.htm
that nested products are prohibited/impossible. It just says they are not so
good.
The suggested solution works. But what is temp_type supposed to be? Anything
else besides matrix<double> (that's what I'm multiplying)? Is there any list
which temporary types should be used? Or am I thinking too complicated?
Have a nice Christmas!
- Michael Wand
On Dienstag, 21. Dezember 2010, Ryo IGARASHI wrote:
> Hi,
>
> On Tue, Dec 21, 2010 at 2:33 AM, Andrea Cassioli
>
> <cassioliandre_at_[hidden]> wrote:
> > I was just looking at the same thing few days ago! For what I have
> > understood, prod() returns a temporary object for which does not
> > exsist a corresponding prod, so the composition prod(matrix,
> > prod(matrix,matrix)) is allowed.
> >
> > Clearly one can use a vector instead, but it is not always the case.
> > It is a functionality that should be implemented.
>
> No. This kind of nested product operation is explicitly prohibited.
> See the "Controlling the complexity of nested product" section
> in the documentation:
> http://www.boost.org/doc/libs/1_45_0/libs/numeric/ublas/doc/operations_over
>view.htm