Automatic Differentiation
 
Loading...
Searching...
No Matches
check_finite.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_ERR_CHECK_FINITE_HPP
2#define STAN_MATH_PRIM_ERR_CHECK_FINITE_HPP
3
11#include <cmath>
12
13namespace stan {
14namespace math {
15
27template <typename T_y>
28inline void check_finite(const char* function, const char* name, const T_y& y) {
29 elementwise_check([](double x) { return std::isfinite(x); }, function, name,
30 y, "finite");
31}
32
33} // namespace math
34} // namespace stan
35
36#endif
void elementwise_check(const F &is_good, const char *function, const char *name, const T &x, const char *must_be, const Indexings &... indexings)
Check that the predicate holds for the value of x.
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition fvar.hpp:9