Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-10-22 19:06:45


Manoj Rajagopalan schrieb:
> hi all,
>
> I noticed this member function of the matrix<> class. what use is
> this? how is it different from a regular assignment between two matrix
> objects?
>
if you use
  x.assign_temporary(y);
then x and y swap its content (by swapping its storage instance) if
possible. Thus the content of y is undefined after assign_temporary.

x.assign(y) (which is nearly the same as x = y)
copy the content of y into x. Both have equal data after this assignement.

mfg
Gunter