value_of_rec.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_FUN_VALUE_OF_REC_HPP
#define STAN_MATH_PRIM_MAT_FUN_VALUE_OF_REC_HPP
#include <stan/math/prim/scal/fun/value_of_rec.hpp>
#include <stan/math/prim/mat/fun/Eigen.hpp>
namespace stan {
namespace math {
template <typename T, int R, int C>
inline Eigen::Matrix<double, R, C>
value_of_rec(const Eigen::Matrix<T, R, C>& M) {
Eigen::Matrix<double, R, C> Md(M.rows(), M.cols());
for (int j = 0; j < M.cols(); j++)
for (int i = 0; i < M.rows(); i++)
Md(i, j) = value_of_rec(M(i, j));
return Md;
}
template <int R, int C>
inline typename Eigen::Matrix<double, R, C>
value_of_rec(const Eigen::Matrix<double, R, C>& 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
Eigen.hpp
value_of_rec.hpp

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