Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
mat
err
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
4
#include <
stan/math/prim/meta.hpp
>
5
#include <
stan/math/prim/mat/fun/Eigen.hpp
>
6
#include <
stan/math/prim/scal/err/is_size_match.hpp
>
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
stan
Definition:
log_sum_exp.hpp:8
meta.hpp
stan::math::is_square
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
is_size_match.hpp
stan::math::is_size_match
bool is_size_match(T_size1 i, T_size2 j)
Return true if the provided sizes match.
Definition:
is_size_match.hpp:17
Eigen.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.