|
Ublas : |
From: Nico Galoppo (ngaloppo_at_[hidden])
Date: 2008-02-20 11:50:13
Hi,
This somehow struck me by surprise... what is wrong with this code?
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/blas/blas2.hpp>
#include <boost/numeric/bindings/blas/blas3.hpp>
#include <boost/numeric/bindings/lapack/gesv.hpp>
#include <boost/numeric/bindings/lapack/geqrf.hpp>
#include <boost/numeric/bindings/lapack/ormqr.hpp>
#include <boost/numeric/bindings/lapack/syev.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/operation_sparse.hpp>
#include <boost/numeric/ublas/io.hpp>
namespace ublas = boost::numeric::ublas;
namespace lapack = boost::numeric::bindings::lapack;
namespace blas = boost::numeric::bindings::blas;
typedef ublas::matrix<double> Matrix;
typedef ublas::vector<double> Vector;
int main(int argc, char *argv[])
{
size_t n = 3;
Matrix K(ublas::identity_matrix<double>(n));
Matrix U(n,n);
U.assign(K);
Vector D(n);
lapack::syev('V','U', U, D, lapack::optimal_workspace() );
return 0;
}
/Users/nico/Code/lma/lma_lapack.cpp|31| error: no matching function
for call to 'boost::numeric::ublas::matrix<double,
boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
boost::numeric::ublas::unbounded_array<double, std::allocator<double>
> >::assign(Matrix (&)(boost::numeric::ublas::identity_matrix<double,
std::allocator<double> >))'
-- Nico Galoppo :: http://www.ngaloppo.org