Boost logo

Ublas :

From: Max Weinberg (max.weinberg_at_[hidden])
Date: 2006-11-20 10:29:38


For 1): If I get you right, the index type used for matrix and vector has
to be identical. That sounds logical. There has to be a template parameter
for IA that specifies the difference_type (now difference_type is taken
from the allocator, which makes no sense at all).

For 2): No, a cast from IA::value_type to size_t makes no sense.

There is another type "array_size_type" that you didn't mention. It is
intended to be used for indexing values in the index array. This could be a
small integer for most applications, since it is related to the number of
non-zeros you want to store in a sparse container.
If you want to store elements with big coordinates, you need a big integer
type for the index type (which is IA::value_type and matrix::size_type).
Unfortunately, in the current code array_size_type and size_type are not
used properly.

> I'd really like to have a solution, because using sparse matrices on
64-Bit
> machines forces me to have 64-Bit integers as indices all over - but I
never
> expect to solve systems with 2 Mrd. of unknowns or more.

That is the other way round - memory is wasted because the index type is
larger than needed. By the way, I am not trying to solve giant systems, I
am only trying to store a few elements with big coordinates.

Greetings,
Max
____________________________________________________________________________
_____
mymail - der unschlagbare und kostenlose E-Mail-Dienst der Schweiz!
http://mymail.ch/?redirect=9999
Disdata Newsletter - Aktuelle Aktionen, Top Neuigkeiten! Jetzt gratis
abonnieren!
http://clk.tradedoubler.com/click?p=45001&a=1036965&g=16379448