1#ifndef STAN_MATH_REV_FUN_TO_VAR_HPP
2#define STAN_MATH_REV_FUN_TO_VAR_HPP
48inline std::vector<var>
to_var(
const std::vector<double>& v) {
49 std::vector<var> var_vector(v.size());
50 for (
size_t n = 0; n < v.size(); n++) {
64inline const std::vector<var>&
to_var(
const std::vector<var>& v) {
return v; }
74inline std::vector<var>&
to_var(std::vector<var>& v) {
return v; }
var to_var(double x)
Converts argument to an automatic differentiation variable.
Eigen::Matrix< var, Eigen::Dynamic, Eigen::Dynamic > matrix_v
The type of a matrix holding var values.
Eigen::Matrix< var, 1, Eigen::Dynamic > row_vector_v
The type of a row vector holding var values.
Eigen::Matrix< double, Eigen::Dynamic, 1 > vector_d
Type for (column) vector of double values.
Eigen::Matrix< var, Eigen::Dynamic, 1 > vector_v
The type of a (column) vector holding var values.
Eigen::Matrix< double, 1, Eigen::Dynamic > row_vector_d
Type for (row) vector of double values.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > matrix_d
Type for matrix of double values.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...