fixed a type error in math_eigen.h

This commit is contained in:
Andrew Jewett
2020-09-05 10:38:14 -07:00
parent 58fa72ddc5
commit 4b66414bdf
2 changed files with 7 additions and 6 deletions

View File

@ -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<double,double*,double**,double const*const*>::SortCriteria
sort_criteria)
{

View File

@ -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<T>& vec) {
scalar_mul(1.0/l2_norm(vec), vec);
}
template <typename T>
inline real_t<T> l1_norm(const std::vector<T>& vec) {
real_t<T> norm = real_t<T>(); // Zero initialization
@ -628,6 +627,7 @@ Jacobi(int n, Scalar **workspace) {
}
}
template<typename Scalar,typename Vector,typename Matrix,typename ConstMatrix>
Jacobi<Scalar, Vector, Matrix, ConstMatrix>::
~Jacobi() {
@ -635,6 +635,7 @@ Jacobi<Scalar, Vector, Matrix, ConstMatrix>::
Dealloc();
}
template<typename Scalar,typename Vector,typename Matrix,typename ConstMatrix>
int Jacobi<Scalar, Vector, Matrix, ConstMatrix>::
Diagonalize(ConstMatrix mat, // the matrix you wish to diagonalize (size n)