Find Eigenvalues โโof Forced Matrix Using LAPACK
I'm having trouble finding the eigenvalues โโof a boosting matrix using LAPACK boost 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 failed:
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 that I've probably messed up the matrix types here, but the compiler error leaves me a bit helpless and I can't find any examples on the internet.
+3
source to share
No one has answered this question yet
Check out similar questions: