aboutsummaryrefslogtreecommitdiff
path: root/src/mathfunc.h
diff options
context:
space:
mode:
authorPjotr Prins2017-08-20 09:20:06 +0000
committerPjotr Prins2017-08-20 09:20:06 +0000
commitd564a6f16613985340040cc7ab0ffc371cbce3d1 (patch)
treef1f66a528d48dcdf0b216322b1910f3c575429a9 /src/mathfunc.h
parent85797beb24da3d591a79fddcff4ab48d702b465f (diff)
downloadpangemma-d564a6f16613985340040cc7ab0ffc371cbce3d1.tar.gz
Added checks for K
Diffstat (limited to 'src/mathfunc.h')
-rw-r--r--src/mathfunc.h6
1 files changed, 6 insertions, 0 deletions
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<double> 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);