Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
rev
scal
fun
to_var.hpp
Go to the documentation of this file.
1
#ifndef STAN_MATH_REV_SCAL_FUN_TO_VAR_HPP
2
#define STAN_MATH_REV_SCAL_FUN_TO_VAR_HPP
3
4
#include <
stan/math/rev/meta.hpp
>
5
#include <
stan/math/rev/core.hpp
>
6
7
namespace
stan
{
8
namespace
math {
9
18
inline
var
to_var
(
double
x) {
return
var
(x); }
19
28
inline
var
to_var
(
const
var
& x) {
return
x; }
29
30
}
// namespace math
31
}
// namespace stan
32
#endif
core.hpp
stan
Definition:
log_sum_exp.hpp:8
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition:
var.hpp:33
stan::math::to_var
std::vector< var > to_var(const std::vector< double > &v)
Converts argument to an automatic differentiation variable.
Definition:
to_var.hpp:19
meta.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.