1#ifndef STAN_MATH_MIX_FUNCTOR_PARTIAL_DERIVATIVE_HPP
2#define STAN_MATH_MIX_FUNCTOR_PARTIAL_DERIVATIVE_HPP
24template <
typename T,
typename F>
26 const Eigen::Matrix<T, Eigen::Dynamic, 1>& x,
int n,
28 Eigen::Matrix<fvar<T>, Eigen::Dynamic, 1> x_fvar(x.size());
29 for (
int i = 0; i < x.size(); ++i) {
30 x_fvar(i) =
fvar<T>(x(i), i == n);
void partial_derivative(const F &f, const Eigen::Matrix< T, Eigen::Dynamic, 1 > &x, int n, T &fx, T &dfx_dxn)
Return the partial derivative of the specified multivariate function at the specified argument.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Scalar val_
The value of this variable.
Scalar d_
The tangent (derivative) of this variable.
This template class represents scalars used in forward-mode automatic differentiation,...