Boost logo

Ublas :

From: Guimond, Alexandre (alexandre.guimond_at_[hidden])
Date: 2006-09-07 10:28:55


Thx Gunter. Just tried that, but I get a similar error when specifying
one or both template arguments as in the following. Other ideas? Thx.

ublas::lu_substitute< ublas::matrix< float >, ublas::vector< float > >(
triangular, /*pivot, */b );

(see attached file for code)

test.cpp(21) : error C2666: 'boost::numeric::ublas::lu_substitute' : 2
overloads have similar conversions
        C:\Program Files\boost\boost\numeric\ublas\lu.hpp(316): could be
'void
boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<T>,bo
ost::numeric::ublas::vector<T>>(boost::numeric::ublas::matrix_expression
<E> &,const M &)'
        with
        [
            T=float,
            E=boost::numeric::ublas::matrix<float>,
            M=boost::numeric::ublas::vector<float>
        ]
        C:\Program Files\boost\boost\numeric\ublas\lu.hpp(257): or
'void
boost::numeric::ublas::lu_substitute<boost::numeric::ublas::matrix<T>,bo
ost::numeric::ublas::vector<T>>(const M
&,boost::numeric::ublas::vector_expression<E> &)'
        with
        [
            T=float,
            M=boost::numeric::ublas::matrix<float>,
            E=boost::numeric::ublas::vector<float>
        ]
        while trying to match the argument list
'(boost::numeric::ublas::matrix<T>, boost::numeric::ublas::vector<T>)'
        with
        [
            T=float
        ]
        and
        [
            T=float
        ]

-----Original Message-----
From: ublas-bounces_at_[hidden]
[mailto:ublas-bounces_at_[hidden]] On Behalf Of Gunter Winkler
Sent: 07 September 2006 16:14
To: ublas mailing list
Subject: Re: [ublas] conflicting overloads for lu_substitute

On Thursday 07 September 2006 15:28, Guimond, Alexandre wrote:
> I get the error at the end of this email compiling this code with
MVC++
> 7.1 and boost 1.33.1:
>
> ==== code =====
> boost::numeric::ublas::matrix< float > triangular( 3, 3 );
> boost::numeric::ublas::vector<float> b( 3 );
> const int singular = boost::numeric::ublas::lu_factorize( triangular
);
> if( singular == 0 )
> {
> boost::numeric::ublas::lu_substitute( triangular, b );
> }

the compiler could not decide whether you want to solve Ax=b with a
single rhs
or A^T X = B with multiple rhs.

You should explicitly state the template arguments

lu_substitute< matrix<float> >( triangular, b );

mfg
Gunter
_______________________________________________
ublas mailing list
ublas_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/ublas