Boost logo

Ublas :

From: Andreas Klöckner (kloeckner_at_[hidden])
Date: 2005-03-03 05:57:47

Hi again, (and sorry for replying to my own message,)

Andreas Klöckner wrote:
> If I read the code right,
> sparse_matrix_detail_traits<ublas::compressed_matrix<> >::ordering_type
> used to map directly to the "raw" ublas ordering type, i.e.
> ublas::row_major or ublas::column_major. Subsequently, that was changed
> to a bindings-specific type bindings::detail::ublas_ordering<>, for
> whatever reason. This change broke the static member function
> sparse_matrix_detail_traits<ublas::compressed_matrix<>
> >::index1_storage() by making the expression ordering_type::size1(s1,
> s2) undefined.

It seems that this subroutine has an even bigger problem that
overshadows the first one: It is trying to write to the
compressed_matrix which it is trying to reflect--and that fails (inside
std::fill()). I assume a fully-built-up index1 array is a requirement of
the bindings library (for example in the UMFPACK mapping? just
guessing). What would be the most suitable way to achieve this
requirement from the UBlas side? Should this be made an innate invariant
of compressed_matrix? Should there be a method
compressed_matrix<>::complete_index1_array()? What else would you
suggest? (I'm slightly biased towards the innate invariant, I must say.)