Stan Math Library  2.12.0
reverse mode automatic differentiation
check_matching_sizes.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_ARR_ERR_CHECK_MATCHING_SIZES_HPP
2 #define STAN_MATH_PRIM_ARR_ERR_CHECK_MATCHING_SIZES_HPP
3 
6 
7 namespace stan {
8  namespace math {
9 
28  template <typename T_y1, typename T_y2>
29  inline bool check_matching_sizes(const char* function,
30  const char* name1,
31  const T_y1& y1,
32  const char* name2,
33  const T_y2& y2) {
34  check_size_match(function,
35  "size of ", name1, y1.size(),
36  "size of ", name2, y2.size());
37  return true;
38  }
39 
40  }
41 }
42 #endif
bool check_size_match(const char *function, const char *name_i, T_size1 i, const char *name_j, T_size2 j)
Return true if the provided sizes match.
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.

     [ Stan Home Page ] © 2011–2016, Stan Development Team.