Stan Math Library  2.20.0
reverse mode automatic differentiation
is_square.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_ERR_IS_SQUARE_HPP
2 #define STAN_MATH_PRIM_MAT_ERR_IS_SQUARE_HPP
3 
7 
8 namespace stan {
9 namespace math {
10 
19 template <typename T_y>
20 inline bool is_square(
21  const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y) {
22  return is_size_match(y.rows(), y.cols());
23 }
24 
25 } // namespace math
26 } // namespace stan
27 #endif
bool is_square(const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the matrix is square.
Definition: is_square.hpp:20
bool is_size_match(T_size1 i, T_size2 j)
Return true if the provided sizes match.

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