1 #ifndef STAN_MODEL_GRADIENT_HPP 2 #define STAN_MODEL_GRADIENT_HPP 5 #include <stan/math/rev/mat.hpp> 15 const Eigen::Matrix<double, Eigen::Dynamic, 1>& x,
17 Eigen::Matrix<double, Eigen::Dynamic, 1>& grad_f,
18 std::ostream* msgs = 0) {
24 const Eigen::Matrix<double, Eigen::Dynamic, 1>& x,
26 Eigen::Matrix<double, Eigen::Dynamic, 1>& grad_f,
31 }
catch (std::exception& e) {
32 if (ss.str().length() > 0)
36 if (ss.str().length() > 0)
Probability, optimization and sampling library.
void gradient(const M &model, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &x, double &f, Eigen::Matrix< double, Eigen::Dynamic, 1 > &grad_f, std::ostream *msgs=0)
base_writer is an abstract base class defining the interface for Stan writer callbacks.
void gradient(const M &model, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &x, double &f, Eigen::Matrix< double, Eigen::Dynamic, 1 > &grad_f, stan::interface_callbacks::writer::base_writer &writer)