Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
check_multiplicable.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_MULTIPLICABLE_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_MULTIPLICABLE_HPP
3 
4 #include <sstream>
5 #include <stan/meta/traits.hpp>
9 
10 namespace stan {
11  namespace math {
12 
13  // NOTE: this will not throw if y1 or y2 contains nan values.
14  template <typename T1, typename T2, typename T_result>
15  inline bool check_multiplicable(const char* function,
16  const T1& y1,
17  const char* name1,
18  const T2& y2,
19  const char* name2,
20  T_result* result) {
21  stan::math::check_size_match(function,y1.cols(), "Columns of matrix 1",
22  y2.rows(), "Rows of matrix 2", result);
23  return true;
24  }
25  }
26 }
27 #endif
bool check_size_match(const char *function, T_size1 i, const char *name_i, T_size2 j, const char *name_j, T_result *result)
bool check_multiplicable(const char *function, const T1 &y1, const char *name1, const T2 &y2, const char *name2, T_result *result)

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