Boost logo

Ublas :

Subject: Re: [ublas] Problem with nested products
From: Ryo IGARASHI (rigarash_at_[hidden])
Date: 2010-12-20 19:17:20


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_overview.htm

-- 
Ryo IGARASHI, Ph.D.
rigarash_at_[hidden]