| Stan Math Library 2.6.3 probability, sampling & optimization

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
check_multiplicable.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_MULTIPLICABLE_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_CHECK_MULTIPLICABLE_HPP
3
4
5 #include <stan/math/prim/mat/fun/Eigen.hpp>
6 #include <stan/math/prim/scal/err/check_size_match.hpp>
7 #include <stan/math/prim/scal/err/check_positive_size.hpp>
8
9 namespace stan {
10 namespace math {
11
32 template <typename T1, typename T2>
33 inline bool check_multiplicable(const char* function,
34 const char* name1,
35 const T1& y1,
36 const char* name2,
37 const T2& y2) {
38 check_positive_size(function, name1, "rows()", y1.rows());
39 check_positive_size(function, name2, "cols()", y2.cols());
40 check_size_match(function,
41 "Columns of ", name1, y1.cols(),
42 "Rows of ", name2, y2.rows());
43 check_positive_size(function, name1, "cols()", y1.cols());
44 return true;
45 }
46 }
47 }
48 #endif
check_size_match.hpp
stan::math::check_positive_size
bool check_positive_size(const char *function, const char *name, const char *expr, const int size)
Return true if size is positive.
Definition: check_positive_size.hpp:23
stan::math::check_multiplicable
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
Definition: check_multiplicable.hpp:33
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
Eigen.hpp
check_positive_size.hpp

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