Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ elementwise_is()

template<typename F , typename T >
bool stan::math::elementwise_is ( const F &  is_good,
const T &  x 
)
inline

Check that the predicate holds for the value of x, working elementwise on containers.

If x is a scalar, check the double underlying the scalar. If x is a container, check each element inside x, recursively.

Template Parameters
Ftype of predicate
Ttype of x
Parameters
is_goodpredicate to check, must accept doubles and produce bools
xvariable to check, can be a scalar, a container of scalars, a container of containers of scalars, etc
Returns
false if any of the scalars fail the error check

Definition at line 333 of file elementwise_check.hpp.