1#ifndef STAN_MATH_FWD_FUN_READ_FVAR_HPP
2#define STAN_MATH_FWD_FUN_READ_FVAR_HPP
13template <
typename EigFvar,
typename EigOut>
22 inline decltype(
auto)
operator()(Eigen::Index
row, Eigen::Index
col)
const {
27 inline decltype(
auto)
operator()(Eigen::Index index)
const {
29 return var_mat.coeffRef(index).d_;
43template <
typename EigFvar,
typename EigOut>
44inline void read_fvar(
const EigFvar& FvarMat, EigOut& ValMat, EigOut& DMat) {
45 DMat = EigOut::NullaryExpr(
46 FvarMat.rows(), FvarMat.cols(),
read_fvar_functor(const EigFvar &arg1, EigOut &arg2)
Functor for extracting the values and tangents from a matrix of fvar.
auto col(T_x &&x, size_t j)
Return the specified column of the specified kernel generator expression using start-at-1 indexing.
auto row(T_x &&x, size_t j)
Return the specified row of the specified kernel generator expression using start-at-1 indexing.
void read_fvar(const EigFvar &FvarMat, EigOut &ValMat, EigOut &DMat)
Function applying the read_fvar_functor to extract the values and tangets of a given fvar matrix into...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...