Boost logo

Boost :

Subject: [boost] Question/Remark to your include/boost/numeric/ublas/lu.hpp
From: Ziehe, Dieter (dziehe_at_[hidden])
Date: 2017-08-29 06:49:30


Dear development community,

first of all, thanks for your work, I use boost sometimes to ease from it in my development of math algorithm.
Normally I try and check your code and documentation till it works (for example Edmonds karp, remez ...)

But now I came to one point, which I don't understand and only workarounded it (although I'm a mathematician
and the topic LU-Decomposition is easy). My Problem is lu.hpp:: lu_factorize and this part :

(*)
#if BOOST_UBLAS_TYPE_CHECK
        swap_rows (pm, cm);
        BOOST_UBLAS_CHECK (singular != 0 ||
                           detail::expression_type_check (prod (triangular_adaptor<matrix_type, unit_lower> (m),
                                                                triangular_adaptor<matrix_type, upper> (m)), cm), internal_logic ());
#endif
Despite the fact, that I can BOOST_UBLAS_TYPE_CHECK switch off (with BOOST_UBLAS_NDEBUG)
I don't understand the sense of these lines. As far as I know, LU is in every case possible, either a matrix
is singular or not. For example the ZERO-Matrix is also LU- decomposable (Solution ZERO-Matrix and
Identity Matrix). And so, IMHO the lines are too strong for this situation. These lines lead in remez to an
Exception : remez failed with exception: internal logic , but the remez algorithm is right
(without BOOST_UBLAS_TYPE_CHECK) I got the correct results.

Is it possible to weaken the lines (*) to a hint only (the return-value singular is also available for other user,
who need regularity). Maybe I'm wrong. But if so, I'd like to know the argument, which lead to such strong
reaction in the normal case of singular Matrix inside the LU-Algorithm ?

I'm looking forward to hear from you.
Many thanks. Dieter from Berlin






Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk