1 #ifndef STAN_MATH_REV_CORE_STORED_GRADIENT_VARI_HPP
2 #define STAN_MATH_REV_CORE_STORED_GRADIENT_VARI_HPP
49 for (
size_t i = 0; i <
size_; ++i)
50 dtrs_[i]->
adj_ +=
adj_ * partials_[i];
stored_gradient_vari(double value, size_t size, vari **dtrs, double *partials)
Construct a stored gradient vari with the specified value, size, daughter varis, and partial derivati...
The variable implementation base class.
A var implementation that stores the daughter variable implementation pointers and the partial deriva...
void chain()
Propagate derivatives through this vari with partial derivatives given for the daughter vari by the s...
int size(const std::vector< T > &x)
Return the size of the specified standard vector.
double adj_
The adjoint of this variable, which is the partial derivative of this variable with respect to the ro...