| Stan Math Library 2.11.0 reverse mode automatic differentiation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

check_matching_sizes.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_SIZES_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_MATCHING_SIZES_HPP
3
4 #include <stan/math/prim/scal/err/domain_error.hpp>
5 #include <stan/math/prim/scal/err/check_size_match.hpp>
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
check_size_match.hpp
stan
Definition: log_sum_exp.hpp:8
stan::math::check_size_match
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.
Definition: check_size_match.hpp:30
stan::math::check_matching_sizes
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.
Definition: check_matching_sizes.hpp:29
domain_error.hpp

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