Boost logo

Ublas :

From: pinacle (pinacle2000_at_[hidden])
Date: 2007-09-07 17:06:34

Hi Gunter

In the reply to Karl, I proposed the solution as changing the LINE 147 of
lu.cpp from
  project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i);

  project (mci, range (i + 1, size1)) *= value_type (1);
  project (mci, range (i + 1, size1)) /= m (i, i);

At least this works for me now.


-----Original Message-----
From: ublas-bounces_at_[hidden] [mailto:ublas-bounces_at_[hidden]]
On Behalf Of Gunter Winkler
Sent: Friday, September 07, 2007 2:05 PM
To: ublas mailing list
Subject: Re: [ublas] lu factorize cannot be compiled on sparse complex

Am Freitag, 7. September 2007 01:13 schrieb pinacle:
> Dear all,
> I've been using UBLAS for solving problems like Ax=b, where A is a
>complex dense matrix, and x and b are complex dense vectors. Today, I
>tried to change A to a sparse matrix, but I got compiling errors as:
> Error 10 error C2784: 'matrix_binary_scalar2_traits<E1,const
> T2,boost::numeric::ublas::scalar_divides<E1::value_type,T2>>::result_
>type boost::numeric::ublas::operator /(const
>boost::numeric::ublas::matrix_expression<E> &,const T2 &)' : could not
>deduce template argument for 'const
>boost::numeric::ublas::matrix_expression<E> &' from
> 'std::complex<double>' D:\boost\boost\numeric\ublas\lu.hpp 147

the code compiles fine with CVS-head and GCC. So this must be related to
your compiler. Unfortunately I have no idea how to debug this :-(

Maybe it helps if you change the offending line to:

project (mci, range (i + 1, size1))
  *= value_type (1) / value_type ( m (i, i) );