value_of_rec.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_ARR_FUN_VALUE_OF_REC_HPP
#define STAN_MATH_PRIM_ARR_FUN_VALUE_OF_REC_HPP
#include <stan/math/prim/scal/fun/value_of_rec.hpp>
#include <vector>
#include <cstddef>
namespace stan {
namespace math {
template <typename T>
inline std::vector<double>
value_of_rec(const std::vector<T>& x) {
size_t size = x.size();
std::vector<double> result(size);
for (size_t i=0; i < size; i++)
result[i] = value_of_rec(x[i]);
return result;
}
template <>
inline std::vector<double> value_of_rec(const std::vector<double>& x) {
return x;
}
}
}
#endif
stan
Definition: log_sum_exp.hpp:8
stan::math::value_of_rec
double value_of_rec(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of_rec.hpp:21
value_of_rec.hpp
stan::math::size
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
Definition: size.hpp:17

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