Boost logo

Ublas :

From: Norman (norman_at_[hidden])
Date: 2007-02-26 07:41:08

Hi everybody!

I am trying to compute the outer product of two vectors using the atlas
bindings and more precisely atlas::syr, but apparently there is a
problem with the traits that defines the symmetric matrix, that is: it
works with symmetric_adaptor but not with symmetric_matrix directly!


#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/symmetric.hpp>

#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/ublas_symmetric.hpp>
#include <boost/numeric/bindings/traits/ublas_vector.hpp>
#include <boost/numeric/bindings/atlas/cblas2.hpp>

using namespace boost::numeric::bindings;
using namespace boost::numeric;

int main()
   ublas::vector<double> v(10);
   // fill v

   ublas::matrix<double> matrix(10,10);
   ublas::symmetric_adaptor< ublas::matrix<double> > sal (matrix);

   atlas::syr(v, sal); // OK

   ublas::symmetric_matrix<double> symMatrix(10,10);
   atlas::syr(v, symMatrix); // ERROR!

It seems that there is no typedef matrix_structure in
boost/numeric/bindings/traits/ublas_symmetric.hpp, and that's why the
static check fails.

Any suggestion?