All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
check_square.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SQUARE_HPP
#define STAN_MATH_PRIM_MAT_ERR_CHECK_SQUARE_HPP
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/prim/scal/err/check_size_match.hpp>
#include <sstream>
namespace stan {
namespace math {
template <typename T_y>
inline bool
check_square(const char* function,
const char* name,
const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y) {
check_size_match(function,
"Expecting a square matrix; rows of ", name, y.rows(),
"columns of ", name, y.cols());
return true;
}
}
}
#endif
check_size_match.hpp
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
stan::math::check_square
bool check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Return true if the specified matrix is square.
Definition: check_square.hpp:28

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