aboutsummaryrefslogtreecommitdiff
path: root/src/mathfunc.h
diff options
context:
space:
mode:
authorPjotr Prins2018-09-06 10:25:22 +0000
committerPjotr Prins2018-09-06 10:25:22 +0000
commit6dd15bfabc5c655d18ea19c0d69b76ecc34630e2 (patch)
tree336c37cac9b105bec550405a11853277631c2810 /src/mathfunc.h
parent8010061e8af476d66a0ca6fb6d509b36acdb9b9a (diff)
downloadpangemma-6dd15bfabc5c655d18ea19c0d69b76ecc34630e2.tar.gz
More debugging info and raise SIGINT instead of exit
Diffstat (limited to 'src/mathfunc.h')
-rw-r--r--src/mathfunc.h5
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);