Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-03-09 15:25:45


Am Freitag, 9. März 2007 21:06 schrieb Gross, Steve:
> I just started learning ublas recently. I see that the containers do
> not initialize their values by default. What's the best way to
> quickly assign all the values in a vector or matrix?

using scalar_matrix, zero_matrix or simply std::fill().

matrix<double> A = scalar_matrix<double>(5,5,3.0);
matrix<double> A = zero_matrix<double>(5,5);

mfg
Gunter