|
Ublas : |
From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2007-10-16 06:34:29
Daniele wrote:
> Ok, in a hurry, I think I've make some mistakes, but I've tracked down
> the problem to this:
> ublas::matrix<double> A(2, 2), B(2, 2), C(2, 2);
> // initialize A and B ...
> C = prod(A, ublas::matrix<double>(prod(B, A))); // C = A*B*A this
> works
> C = prod(A, prod(B, A)); // C = A*B*A this doesn't work
Nested prod is not allowed I think. You should use a temporary for
storing prod(B,A).
Karl