Boost logo

Ublas :

From: Michael Stevens (mail_at_[hidden])
Date: 2006-12-12 14:28:44


On Monday, 9. October 2006 18:14, Michael Stevens wrote:
> On Monday, 9. October 2006 08:41, Gunter Winkler wrote:
> > On Saturday 07 October 2006 20:53, Michael Stevens wrote:
> > > Hi Gunter, Hi Guimond,
> > >
> > > On Thursday, 7. September 2006 17:32, Gunter Winkler wrote:
> > > > On Thursday 07 September 2006 16:28, Guimond, Alexandre wrote:
> > > > Interesting, the functions can not be distinguished. I always use the
> > > > version with pivoting, which works perfectly.
> > >
> > > GCC agrees the two function definitions are ambigeous. The two
> > > functions in question are.
> > >
> > > line 258:
> > > template<class M, class E>
> > > void lu_substitute (const M &m, vector_expression<E> &e) {
> > > inplace_solve (m, e, unit_lower_tag ());
> > > inplace_solve (m, e, upper_tag ());
> > >
> > > line 317:
> > > template<class E, class M>
> > > void lu_substitute (matrix_expression<E> &e, const M &m) {
> > > inplace_solve (e, m, upper_tag ());
> > > inplace_solve (e, m, unit_lower_tag ());
> > >
> > > > Maybe one should drop the (IMHO strange) versions of lu substitute
> > > > for solving X A = B .
> > >
> > > The function (defined at line 317 ) certainly looks wrong. The argument
> > > 'm' is const. This 'm' is passed to inplace_solver as the second
> > > argument this is not const and is modified to contain the result.
> >
> > No, its correct. m is the factorized matrix, e contains the right hand
> > sides.
>
> The calls to inplace_solve seem wrong however. e is mutable and passed to a
> const parameter, m is const and is passed to the parameter that recieves
> the result. Or am I missinterpreting the code in "triangular.hpp"

I need some feedback on what to do here. At present:
a) the code is not compilable because the two overloads as they are defined
are ambigeous.
b) the second overload seems to be incorrectly implemented anyway (see my
comments above)

Can we simply drop the second version?
Michael

-- 
___________________________________
Michael Stevens Systems Engineering
34128 Kassel, Germany
Phone/Fax: +49 561 5218038
Navigation Systems, Estimation  and
                 Bayesian Filtering
    http://bayesclasses.sf.net
___________________________________