aboutsummaryrefslogtreecommitdiff
path: root/src/mathfunc.h
diff options
context:
space:
mode:
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);