Boost logo

Ublas :

Subject: Re: [ublas] syev error
From: Nizar Khalifa Sallem (nksallem_at_[hidden])
Date: 2010-11-15 04:11:14


At Mon, 15 Nov 2010 10:03:49 +0100,
Rutger ter Borg wrote:
>
> On 11/15/2010 12:03 AM, Nizar Khalifa Sallem wrote:
> > Hi all,
> >
> > I am trying to migrate from the bindings_v1 to the 'official' bindings
> > but I am encountering some errors:
> > the former call to syev is :
> > int syev (char jobz, A& a, W& w)
> > the later is this one :
> > inline typename boost::disable_if< detail::is_workspace< VectorW>,
> > std::ptrdiff_t>::type
> > syev( const char jobz, MatrixA& a, VectorW& w )
> >
> > Here is my code:
> > lapack::syev('V',A,alpha);
> > with A a column major matrix and alpha a ublas::vector
> >
> > And here is corresponding gcc answer:
> > boost/numeric/bindings/detail/property_map.hpp:30: error: no type
> > named ‘property_map’ in ‘struct
> > boost::numeric::bindings::detail::adaptor_access<boost::numeric::ublas::matrix<double,
> > boost::numeric::ublas::basic_column_major<unsigned int, int>,
> > boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >>> , void>’
> >
> > --
> > Nizar
>
> I guess it's time for a FAQ. :-)
>
> Q: "This doesn't compile, the compiler is complaining about no type
> named 'property map'"
> A: You probably didn't include the binding for each of the containers
> you are passing to the algorithm. Add, e.g., #include
> <boost/numeric/bindings/ublas/vector.hpp>, to your code.
Hi Rutger,
I was about to say I've solved it :)
Actually that is what was going on:
CA is for complete answer
CA: 1. I was including ublas_matrix and ublas_vector from former
                binding/traits instead of ublas/matrix and ublas/vector
    2. For the 'official' bindings the matrix you pass to a symmetric
                routine needs to be explicitely symmetric i.e. not ublas::matrix
                but ublas::symmetric_matrix
May be this is worth sticking somewhere in the ublas FAQ for instance.
Anyway, thank you very much Rutger

>
> Cheers,
>
> Rutger
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: nksallem_at_[hidden]
>