I'm having trouble finding the eigenvalues of a boost matrix using the boost LAPACK bindings. This is my best guess:
template<class T>
boost::numeric::ublas::vector<double> diagonalize(const boost::numeric::ublas::matrix<T>& input)
{
// create a working copy of the input
boost::numeric::ublas::banded_matrix<T,boost::numeric::ublas::column_major> A(input);
fortran_int_t n = input.size1();
// Calculate tridiagonal form
boost::numeric::ublas::vector<double> d(n); //diagonal elements of tridiagonal matrix
boost::numeric::ublas::vector<double> e(n-1); //offdiagonal elements of tridiagonal matrix
boost::numeric::ublas::vector<T> tau(n-1); //other stuff
boost::numeric::bindings::lapack::hetrd( A, d, e, tau );
//Calculate eigenvalues
boost::numeric::bindings::lapack::sterf(n,d,e);
return d;
}
where the compilation fails with:
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::banded_matrix<std::complex<double>,
boost::numeric::ublas::basic_column_major<long unsigned int, long int>,
boost::numeric::ublas::unbounded_array<std::complex<double>,
std::allocator<std::complex<double> > > >, void>
I know I'm probably messing up matrix types here but the compiler error leaves me a little helpless and I can't find any examples on the web.