Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
check_square.hpp
Go to the documentation of this file.
1 #ifndef STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_SQUARE_HPP
2 #define STAN__MATH__ERROR_HANDLING__MATRIX__CHECK_SQUARE_HPP
3 
4 #include <sstream>
7 
8 namespace stan {
9  namespace math {
10 
23  template <typename T_y, typename T_result>
24  inline bool check_square(const char* function,
25  const Eigen::Matrix<T_y,Eigen::Dynamic,Eigen::Dynamic>& y,
26  const char* name,
27  T_result* result) {
28  check_size_match(function,
29  y.rows(), "Rows of matrix",
30  y.cols(), "columns of matrix",
31  result);
32  return true;
33  }
34 
35  }
36 }
37 #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_square(const char *function, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y, const char *name, T_result *result)
Return true if the specified matrix is square.

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