Automatic Differentiation
 
Loading...
Searching...
No Matches
generate_laplace_options.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_GENERATE_LAPLACE_OPTIONS_HPP
2#define STAN_MATH_PRIM_FUN_GENERATE_LAPLACE_OPTIONS_HPP
3
7#include <tuple>
8#include <utility>
9
10namespace stan {
11namespace math {
12
13namespace internal {
14inline constexpr int laplace_default_hessian_block_size = 1;
15inline constexpr int laplace_default_solver = 1;
16inline constexpr double laplace_default_tolerance = 1.49012e-08;
17inline constexpr int laplace_default_max_num_steps = 500;
18inline constexpr int laplace_default_allow_fallthrough = 1;
19inline constexpr int laplace_default_max_steps_line_search = 1000;
20} // namespace internal
21
27inline auto generate_laplace_options(int theta_0_size) {
28 return std::make_tuple(Eigen::VectorXd::Zero(theta_0_size).eval(),
34}
35
42template <typename ThetaVec, require_eigen_t<ThetaVec>* = nullptr>
43inline auto generate_laplace_options(ThetaVec&& theta_0) {
44 return std::make_tuple(stan::math::eval(std::forward<ThetaVec>(theta_0)),
50}
51
52} // namespace math
53} // namespace stan
54
55#endif
constexpr double laplace_default_tolerance
constexpr int laplace_default_max_steps_line_search
constexpr int laplace_default_hessian_block_size
constexpr int laplace_default_allow_fallthrough
T eval(T &&arg)
Inputs which have a plain_type equal to the own time are forwarded unmodified (for Eigen expressions ...
Definition eval.hpp:20
auto generate_laplace_options(int theta_0_size)
User function for generating laplace options tuple.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...