Glas :Re: [glas] value_type |
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-10-03 16:14:13
Matthias Troyer wrote:
>
> These requirements are fine. However, a restriction just to float,
> double, long double and the corresponding complex types would be too
> restrictive.
Currently the DenseVector and SparseVector concept are documented as
only requiring their value_type to be a model of NumericValue so that is
fine than.
Another option would be that the containers (or collection) only require
their value_type to be copy-constructible and assignable. Additionaly
requirements would only have to be fullfilled depending on the
operations on the collection. E.g. When you're only adding vector's it's
not necessary to require that the value_type of the vector supports
multiplication.
Basically the difference is:
1) or we specify a set of requirements the value_type's need to fullfill
so that you can use any algorithm in the glas-library
2) or we specify the set of requiments on the value_type's per algorithm