All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros
value_of.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_MAT_FUN_VALUE_OF_HPP
#define STAN_MATH_PRIM_MAT_FUN_VALUE_OF_HPP
#include <stan/math/prim/scal/fun/value_of.hpp>
#include <stan/math/prim/scal/meta/child_type.hpp>
#include <stan/math/prim/mat/fun/Eigen.hpp>
namespace stan {
namespace math {
template <typename T, int R, int C>
inline Eigen::Matrix<typename child_type<T>::type, R, C>
value_of(const Eigen::Matrix<T, R, C>& M) {
using stan::math::value_of;
Eigen::Matrix<typename child_type<T>::type, 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(M(i, j));
return Md;
}
}
}
#endif
stan::math::value_of
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Definition: value_of.hpp:16
child_type.hpp
Eigen.hpp
value_of.hpp

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