All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Groups
log_determinant.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_FWD_MAT_FUN_LOG_DETERMINANT_HPP
#define STAN_MATH_FWD_MAT_FUN_LOG_DETERMINANT_HPP
#include <stan/math/prim/mat/fun/Eigen.hpp>
#include <stan/math/fwd/core.hpp>
#include <stan/math/fwd/mat/fun/typedefs.hpp>
#include <stan/math/fwd/mat/fun/determinant.hpp>
#include <stan/math/fwd/scal/fun/fabs.hpp>
#include <stan/math/fwd/scal/fun/log.hpp>
#include <stan/math/prim/mat/err/check_square.hpp>
#include <boost/math/tools/promotion.hpp>
#include <vector>
namespace stan {
namespace math {
template<typename T, int R, int C>
inline
fvar<T>
log_determinant(const Eigen::Matrix<fvar<T>, R, C>& m) {
stan::math::check_square("log_determinant", "m", m);
return stan::math::log(stan::math::fabs(stan::math::determinant(m)));
}
}
}
#endif
typedefs.hpp
core.hpp
stan::math::fabs
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:14
log.hpp
stan::math::log
fvar< T > log(const fvar< T > &x)
Definition: log.hpp:15
fabs.hpp
stan::math::log_determinant
fvar< T > log_determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: log_determinant.hpp:20
determinant.hpp
stan::math::determinant
fvar< T > determinant(const Eigen::Matrix< fvar< T >, R, C > &m)
Definition: determinant.hpp:21
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::math::fvar
Definition: fvar.hpp:13
check_square.hpp

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