Check that the predicate holds for the value of x
.
Check that the predicate holds for all elements of the value of x
.
This overload works on scalars.
- Template Parameters
-
F | type of predicate |
T | type of x |
Indexings | types of indexings |
- Parameters
-
is_good | predicate to check, must accept doubles and produce bools |
function | function name (for error messages) |
name | variable name (for error messages) |
x | variable to check, can be a scalar, a container of scalars, a container of containers of scalars, etc |
must_be | message describing what the value should be |
indexings | any additional indexing to print. Intended for internal use in elementwise_check only. |
- Exceptions
-
`std::domain_error` | if is_good returns false for the value of any element in x |
This overload works on std::vector
types.
- Template Parameters
-
F | type of predicate |
T | type of x |
Indexings | types of indexings |
- Parameters
-
is_good | predicate to check, must accept doubles and produce bools |
function | function name (for error messages) |
name | variable name (for error messages) |
x | variable to check, can be a scalar, a container of scalars, a container of containers of scalars, etc |
must_be | message describing what the value should be |
indexings | any additional indexing to print. Intended for internal use in elementwise_check only. |
- Exceptions
-
`std::domain_error` | if is_good returns false for the value of any element in x |
This overload works on var
s containing Eigen types.
- Template Parameters
-
F | type of predicate |
T | type of x |
Indexings | types of indexings |
- Parameters
-
is_good | predicate to check, must accept doubles and produce bools |
function | function name (for error messages) |
name | variable name (for error messages) |
x | variable to check, can be a scalar, a container of scalars, a container of containers of scalars, etc |
must_be | message describing what the value should be |
indexings | any additional indexing to print. Intended for internal use in elementwise_check only. |
- Exceptions
-
`std::domain_error` | if is_good returns false for the value of any element in x |
Definition at line 116 of file elementwise_check.hpp.