Skip to content

Commit

Permalink
Eigen matrix doesn't support iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed May 17, 2024
1 parent ded45c0 commit 903d23c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/boost_math_issue_1131.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
#include <Eigen/Eigenvalues>
#include <boost/multiprecision/eigen.hpp>
#include <boost/multiprecision/cpp_bin_float.hpp>
#include <iostream>

using boost::multiprecision::cpp_bin_float_100;

int main() {

Eigen::Matrix<cpp_bin_float_100, Eigen::Dynamic, Eigen::Dynamic> A = Eigen::Matrix<cpp_bin_float_100, Eigen::Dynamic, Eigen::Dynamic>::Identity(3,3);
Eigen::EigenSolver<decltype(A)> es;
es.compute(A, /*computeEigenvectors=*/ false);

auto eigs = es.eigenvalues();
for (auto eig : eigs) {
std::cout << eig << "\n";
for (std::size_t i = 0; i < eigs.size(); ++i) {
std::cout << eigs[i] << "\n";
}

return 0;
Expand Down

0 comments on commit 903d23c

Please sign in to comment.