From d564a6f16613985340040cc7ab0ffc371cbce3d1 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 20 Aug 2017 09:20:06 +0000 Subject: Added checks for K --- src/mathfunc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mathfunc.h') diff --git a/src/mathfunc.h b/src/mathfunc.h index b9f3c73..8a2ea64 100644 --- a/src/mathfunc.h +++ b/src/mathfunc.h @@ -26,12 +26,18 @@ using namespace std; using namespace Eigen; +bool has_nan(const vector v); + double VectorVar(const gsl_vector *v); void CenterMatrix(gsl_matrix *G); void CenterMatrix(gsl_matrix *G, const gsl_vector *w); void CenterMatrix(gsl_matrix *G, const gsl_matrix *W); void StandardizeMatrix(gsl_matrix *G); double ScaleMatrix(gsl_matrix *G); +bool isMatrixPositiveDefinite(const gsl_matrix *G); +bool isMatrixIllConditioned(const gsl_matrix *G, double max_ratio=4.0); +bool isMatrixSymmetric(const gsl_matrix *G); +bool checkMatrixEigen(const gsl_matrix *G, double min=1e-5); double SumVector(const gsl_vector *v); double CenterVector(gsl_vector *y); void CenterVector(gsl_vector *y, const gsl_matrix *W); -- cgit v1.2.3