Loading [MathJax]/extensions/TeX/AMSsymbols.js
Stan Math Library
5.0.0
Automatic Differentiation
▼
Stan Math Library
Overview
▼
Contributor Guides
Developer Guide
Adding New Functions
Adding New Distributions
Common Pitfalls
Using requires for general overloads
Reverse Mode Types
Testing Automatic Differentiation Functions
Testing New Distributions
Add New Functions With Known Gradients
Adding New OpenCL Functions
Windows Development Tips
►
Internal Docs
►
Parallelism
(External Link) Stan Language Docs
(External Link) Stan Discourse
►
Stan Math Library Docs
►
Class List
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/prim/err/elementwise_check.hpp
>
6
#include <
stan/math/prim/fun/Eigen.hpp
>
7
#include <
stan/math/prim/fun/get.hpp
>
8
#include <
stan/math/prim/fun/size.hpp
>
9
#include <
stan/math/prim/fun/value_of.hpp
>
10
#include <
stan/math/prim/fun/value_of_rec.hpp
>
11
#include <cmath>
12
13
namespace
stan
{
14
namespace
math {
15
27
template
<
typename
T_y>
28
inline
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
Eigen.hpp
elementwise_check.hpp
get.hpp
stan::math::elementwise_check
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.
Definition
elementwise_check.hpp:116
stan::math::check_finite
void check_finite(const char *function, const char *name, const T_y &y)
Return true if all values in y are finite.
Definition
check_finite.hpp:28
stan
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Definition
unit_vector_constrain.hpp:15
size.hpp
value_of.hpp
value_of_rec.hpp
meta.hpp
stan
math
prim
err
check_finite.hpp
[
Stan Home Page
]
© 2011–2019, Stan Development Team.