From 4b66414bdf20ffa6f369665c5d3b7fdd973daa7d Mon Sep 17 00:00:00 2001 From: Andrew Jewett Date: Sat, 5 Sep 2020 10:38:14 -0700 Subject: [PATCH] fixed a type error in math_eigen.h --- src/math_eigen.cpp | 8 ++++---- src/math_eigen.h | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/math_eigen.cpp b/src/math_eigen.cpp index b86b626309..18ca97200b 100644 --- a/src/math_eigen.cpp +++ b/src/math_eigen.cpp @@ -107,10 +107,10 @@ jacobi3(double const mat[3][3], // the 3x3 matrix you wish to diagonalize int MathEigen:: -jacobi3(double const **mat, // the 3x3 matrix you wish to diagonalize - double *eval, // store the eigenvalues here - double **evec, // store the eigenvectors here... - bool evec_as_columns, // ...as rows or columns? +jacobi3(double const* const* mat, // the 3x3 matrix you wish to diagonalize + double *eval, // store the eigenvalues here + double **evec, // store the eigenvectors here... + bool evec_as_columns, // ...as rows or columns? Jacobi::SortCriteria sort_criteria) { diff --git a/src/math_eigen.h b/src/math_eigen.h index 3a697584d7..17d234f0b9 100644 --- a/src/math_eigen.h +++ b/src/math_eigen.h @@ -242,7 +242,7 @@ namespace MathEigen { /// @note /// When invoked using default arguments, this function is a stand-in for /// the the version of "jacobi()" that was defined in "POEMS/fix_poems.cpp". - int jacobi3(double const **mat, + int jacobi3(double const* const* mat, double *eval, double **evec, // optional arguments: @@ -599,7 +599,6 @@ inline void normalize(std::vector& vec) { scalar_mul(1.0/l2_norm(vec), vec); } - template inline real_t l1_norm(const std::vector& vec) { real_t norm = real_t(); // Zero initialization @@ -628,6 +627,7 @@ Jacobi(int n, Scalar **workspace) { } } + template Jacobi:: ~Jacobi() { @@ -635,6 +635,7 @@ Jacobi:: Dealloc(); } + template int Jacobi:: Diagonalize(ConstMatrix mat, // the matrix you wish to diagonalize (size n)