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

◆ check_consistent_sizes_mvt() [3/3]

template<typename T1 , typename T2 , typename... Ts>
void stan::math::check_consistent_sizes_mvt ( const char *  function,
const char *  name1,
const T1 &  x1,
const char *  name2,
const T2 &  x2,
const Ts &...  names_and_xs 
)
inline

Check that the provided multivariate inputs are of consistent size with each other.

Two multivariate inputs are of consistent size if both are std::vectors of the same size, or if at least one is a not an std::vector.

E.g.: check_consistent_sizes_mvt("some_function", "x1", x1, "x2", x2, etc.).

Template Parameters
T1type of first input
T2type of second input
Tstype of other inputs
Parameters
functionfunction name (for error messages)
name1name of variable corresponding to first input
x1first input
name2name of variable corresponding to second input
x2second input
names_and_xsmore inputs
Exceptions
`invalid_argument`if sizes are inconsistent

Definition at line 46 of file check_consistent_sizes_mvt.hpp.