diff options
author | Pjotr Prins | 2018-09-06 10:25:22 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-09-06 10:25:22 +0000 |
commit | 6dd15bfabc5c655d18ea19c0d69b76ecc34630e2 (patch) | |
tree | 336c37cac9b105bec550405a11853277631c2810 /src/mathfunc.h | |
parent | 8010061e8af476d66a0ca6fb6d509b36acdb9b9a (diff) | |
download | pangemma-6dd15bfabc5c655d18ea19c0d69b76ecc34630e2.tar.gz |
More debugging info and raise SIGINT instead of exit
Diffstat (limited to 'src/mathfunc.h')
-rw-r--r-- | src/mathfunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mathfunc.h b/src/mathfunc.h index 89a34e6..5b1e2ec 100644 --- a/src/mathfunc.h +++ b/src/mathfunc.h @@ -34,6 +34,9 @@ inline bool is_nan(double f) { return (std::isnan(f)); } +#define is_inf(d) gsl_isinf(d) +#define is_nan(d) gsl_isnan(d) + bool has_nan(const vector<double> v); bool has_nan(const gsl_vector *v); bool has_inf(const gsl_vector *v); @@ -42,6 +45,8 @@ bool has_inf(const gsl_matrix *m); bool is_integer(const std::string & s); +double safe_log(const double d); + double VectorVar(const gsl_vector *v); void CenterMatrix(gsl_matrix *G); void CenterMatrix(gsl_matrix *G, const gsl_vector *w); |