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

◆ is_matching_size()

template<typename T_y1 , typename T_y2 >
bool stan::math::is_matching_size ( const T_y1 &  y1,
const T_y2 &  y2 
)
inline

Return true if two structures are the same size.

This is a top-level sizing function for std::vector where a 2x3 vector returns 2, and a total sizing function for Eigen::Matrix where a 2x3 matrix will return 6.

Template Parameters
T_y1Type of the first variable, requires class method .size()
T_y2Type of the second variable, requires class method .size()
Parameters
y1First variable
y2Second variable
Returns
true if the variable sizes match

Definition at line 24 of file is_matching_size.hpp.