Boost logo

Ublas :

Subject: Re: [ublas] Why is there no constructor taking an initial value?
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2009-01-22 15:08:53


Am Donnerstag, 22. Januar 2009 16:13 schrieb Thorsten Ottosen:
> Hi,
>
> I was a bit surprised that there is no way to fill a
> triangular_matrix with a default value. Say, I would have expected
> this to work:
>
> triangular_matrix<double> m(42,42,42);
>
> Is there any reason why this constructor is not provided?

because it is not needed:

// untested
triangular_matrix<double,lower> m((
triangular_adaptor<lower>(scalar_matrix<double>(42,42,42))));

mfg
Gunter