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

◆ is_matching_dims() [2/2]

template<bool check_compile, typename EigMat1 , typename EigMat2 , require_all_matrix_t< EigMat1, EigMat2 > * = nullptr>
bool stan::math::is_matching_dims ( const EigMat1 &  y1,
const EigMat2 &  y2 
)
inline

Return true if the two matrices are of the same size.

This function checks the runtime sizes and can also check the static sizes as well. For example, a 4x1 matrix is not the same as a vector with 4 elements.

Template Parameters
check_compileWhether to check the static sizes
EigMat1A type derived from EigenBase
EigMat2A type derived from EigenBase
Parameters
y1first matrix to test
y2second matrix to test
Returns
true if the dimensions of the matrices match

Definition at line 41 of file is_matching_dims.hpp.