check_spsd_matrix.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_ERR_CHECK_SPSD_MATRIX_HPP
#define STAN_MATH_PRIM_MAT_ERR_CHECK_SPSD_MATRIX_HPP
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/prim/scal/err/check_positive_size.hpp>
#include <stan/math/prim/mat/err/check_pos_semidefinite.hpp>
#include <stan/math/prim/mat/err/check_symmetric.hpp>
#include <stan/math/prim/mat/err/check_square.hpp>
namespace stan {
namespace math {
template <typename T_y>
inline void
check_spsd_matrix(const char* function,
const char* name,
const Eigen::Matrix<T_y, Eigen::Dynamic, Eigen::Dynamic>& y) {
check_square(function, name, y);
check_positive_size(function, name, "rows()", y.rows());
check_symmetric(function, name, y);
check_pos_semidefinite(function, name, y);
}
}
}
#endif
stan
Definition: log_sum_exp.hpp:8
stan::math::check_positive_size
void check_positive_size(const char *function, const char *name, const char *expr, int size)
Check if size is positive.
Definition: check_positive_size.hpp:22
check_pos_semidefinite.hpp
check_symmetric.hpp
stan::math::check_pos_semidefinite
void check_pos_semidefinite(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is positive definite.
Definition: check_pos_semidefinite.hpp:34
stan::math::check_symmetric
void check_symmetric(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is symmetric.
Definition: check_symmetric.hpp:35
stan::math::check_spsd_matrix
void check_spsd_matrix(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is a square, symmetric, and positive semi-definite. ...
Definition: check_spsd_matrix.hpp:29
Eigen.hpp
stan::math::check_square
void check_square(const char *function, const char *name, const Eigen::Matrix< T_y, Eigen::Dynamic, Eigen::Dynamic > &y)
Check if the specified matrix is square.
Definition: check_square.hpp:27
check_positive_size.hpp
check_square.hpp

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