diff options
author | Peter Carbonetto | 2017-08-21 10:31:26 -0500 |
---|---|---|
committer | GitHub | 2017-08-21 10:31:26 -0500 |
commit | aea3d24c680778cf1691a8c2a76f3221e7f373d6 (patch) | |
tree | 8a1ba0770e2344469c58290d4192db186d9439cb /src/mathfunc.h | |
parent | 85797beb24da3d591a79fddcff4ab48d702b465f (diff) | |
parent | 2e76646998df0ca1b7d160329c0f3ac8cdda2fe0 (diff) | |
download | pangemma-aea3d24c680778cf1691a8c2a76f3221e7f373d6.tar.gz |
Merge pull request #73 from genenetwork/merge-checkK
Check K and added unit test framework.
Diffstat (limited to 'src/mathfunc.h')
-rw-r--r-- | src/mathfunc.h | 6 |
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); |