|
Ublas : |
From: Max Weinberg (max.weinberg_at_[hidden])
Date: 2006-11-18 12:04:21
Hello,
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
class.
For example, this does not work:
typedef long long IndexT;
typedef boost::numeric::ublas::compressed_matrix<
double,
boost::numeric::ublas::column_major,
0, //index base
boost::numeric::ublas::unbounded_array<IndexT>,
boost::numeric::ublas::unbounded_array<double>
> 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!
http://mymail.ch/?redirect=9999
Dein Foto auf Shirts, Tassen und Mousepads! In 48h versandfertig.
http://ad.zanox.com/ppc/?4356508C218045186T