1 #ifndef STAN_MATH_FWD_ARR_FUN_TO_FVAR_HPP 2 #define STAN_MATH_FWD_ARR_FUN_TO_FVAR_HPP 12 inline std::vector<fvar<T> >
to_fvar(
const std::vector<T>& v) {
13 std::vector<fvar<T> > x(v.size());
14 for (
size_t i = 0; i < v.size(); ++i)
20 inline std::vector<fvar<T> >
to_fvar(
const std::vector<T>& v,
21 const std::vector<T>& d) {
22 std::vector<fvar<T> > x(v.size());
23 for (
size_t i = 0; i < v.size(); ++i)
std::vector< fvar< T > > to_fvar(const std::vector< T > &v)
This template class represents scalars used in forward-mode automatic differentiation, which consist of values and directional derivatives of the specified template type.