Boost logo

Ublas :

From: Max Weinberg (max.weinberg_at_[hidden])
Date: 2006-11-18 12:04:21

it seems to be impossible to use any other type than std::size_t for the
sparse indices. I looked at this because I wanted to extend the possible
index range for sparse matrices/vectors by using an unlimited integer

For example, this does not work:

typedef long long IndexT;
typedef boost::numeric::ublas::compressed_matrix<
        0, //index base
> MatrixT;

You can pass an index type to the index array, but it is not supported
afterwards. Looks like this has never been tested. One of the problems is
this line in matrix_sparse:
        // FIXME difference type for sparse storage iterators should it be
in the container?
        typedef typename IA::difference_type difference_type;
I tried a workaround by "typedef IA::value_type difference_type", which
helps somewhat, but there are tons of other type-related problems, for
example attempted conversions from size_type to array_size_type.

Regards, Max

mymail - der unschlagbare und kostenlose E-Mail-Dienst der Schweiz!
Dein Foto auf Shirts, Tassen und Mousepads! In 48h versandfertig.