template<typename Arith , typename VecVar , typename VecArith , typename... ContainerOperands, typename... ContainerGradients>
var stan::math::precomputed_gradients |
( |
Arith |
value, |
|
|
const VecVar & |
operands, |
|
|
const VecArith & |
gradients, |
|
|
const std::tuple< ContainerOperands... > & |
container_operands = std::tuple<>() , |
|
|
const std::tuple< ContainerGradients... > & |
container_gradients = std::tuple<>() |
|
) |
| |
|
inline |
This function returns a var for an expression that has the specified value, vector of operands, and vector of partial derivatives of value with respect to the operands.
- Template Parameters
-
Arith | An arithmetic type |
VecVar | A vector of vars |
VecArith | A vector of arithmetic types |
ContainerOperands | tuple of any container operands (var_value containing Eigen types) |
ContainerGradients | tupleof any container gradients (Eigen types) |
- Parameters
-
[in] | value | The value of the resulting dependent variable. |
[in] | operands | operands. |
[in] | gradients | vector of partial derivatives of result with respect to operands. |
| container_operands | any container operands |
| container_gradients | any container gradients |
- Returns
- An autodiff variable that uses the precomputed gradients provided.
Definition at line 213 of file precomputed_gradients.hpp.