|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-24 03:47:49
On Friday 24 June 2005 00:13, Vardan Akopian wrote:
> Am I correct that the workaround of assigning to a dense matrix first
> (as in my sample code) has an additional cost of copying the whole
> data (in other words A is not lazily evaluated)? Is there a better
> workaround to avoid that cost?
Yes.
> > diagonal_matrix<double> z(sz), x(sz);
> > matrix<double> y(sz, sz);
> > matrix<double> B = prod(z, x - y);
y -= x;
B = prod(z, -y);
y += x;
{
// for the experienced user:
y .minus_assign( x );
B .assign( z, -y );
y .plus_assign( x );
}
> Thank you. I'm new to the list, what is the normal way (if any) to
> find out if a fix has been committed to cvs (besides checking the cvs
> periodically)?
Usually the fixes are posted to this list, or at least announced. BTW. You can
use the CVS-web interface to check files.
mfg
Gunter