to_var.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_REV_SCAL_FUN_TO_VAR_HPP
#define STAN_MATH_REV_SCAL_FUN_TO_VAR_HPP
#include <stan/math/rev/core.hpp>
namespace stan {
namespace math {
inline var to_var(double x) {
return var(x);
}
inline var to_var(const var& x) {
return x;
}
}
}
#endif
core.hpp
stan
Definition: log_sum_exp.hpp:8
stan::math::var
Independent (input) and dependent (output) variables for gradients.
Definition: var.hpp:30
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:20

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