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

◆ check_matching_dims() [1/2]

template<typename T1 , typename T2 , require_all_not_matrix_t< T1, T2 > * = nullptr, require_all_not_nonscalar_prim_or_rev_kernel_expression_t< T1, T2 > * = nullptr>
void stan::math::check_matching_dims ( const char *  function,
const char *  name1,
const T1 &  y1,
const char *  name2,
const T2 &  y2 
)
inline

Check if the two containers have the same dimensions.

Check if two matrices have the same row and column dimensions.

Template Parameters
T1type of the first container
T2type of the second container
Parameters
functionname of function (for error messages)
name1variable name for the first container (for error messages)
y1first container to test
name2variable name for the second container (for error messages)
y2second container to test
Exceptions
<code>std::invalid_argument</code>if the dimensions of the containers do not match
Template Parameters
T1Either an Eigen type or a var_value with underlying Eigen type.
T2Either an Eigen type or a var_value with underlying Eigen type.
Parameters
functionname of function (for error messages)
name1variable name for the first container (for error messages)
y1first matrix to test
name2variable name for the second container (for error messages)
y2second matrix to test
Exceptions
<code>std::invalid_argument</code>if the dimensions of the containers do not match
Template Parameters
T1Either an Eigen type, a var_value with underlying Eigen type, or scalar.
T2Either an Eigen type, a var_value with underlying Eigen type, or scalar.
Parameters
functionname of function (for error messages)
name1variable name for the first container (for error messages)
y1first argument to test
name2variable name for the second container (for error messages)
y2second argument to test
Exceptions
<code>std::invalid_argument</code>if the dimensions of the containers do not match

Definition at line 29 of file check_matching_dims.hpp.