Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-01-16 14:16:55


Am Mittwoch, 16. Januar 2008 16:15 schrieb Song Chang:
> I am using LU decomposition to solve linear system with ublas,
> and I just cannot figure the error apeared like this:
>
> Check failed in file d:\lib\boost_1_34_1\boost\numeric\ublas\lu.hpp
> at line 272:
> detail::expression_type_check (prod
> (triangular_adaptor<const_matrix_type, upper
>
> > (m), e), cv2)
>
> lu_factorize(A,pm) seems working well, but lu_substitute(A, pm, x)
> sometimes throws
> the exception above.

This error is usually triggered when the matrix is ill conditioned
(nearly singular). Then the internal checks fail because the result
depends on the order of the floating point operations.

There are several solutions possible:

* disable debugging (define NDEBUG)
* disable type checks (see [1], keyword: BOOST_UBLAS_TYPE_CHECK)
* use a better solver (see http://www.guwi17.de/ublas/examples/)

HTH
Gunter

[1]
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS