Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ precomputed_gradients()

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
ArithAn arithmetic type
VecVarA vector of vars
VecArithA vector of arithmetic types
ContainerOperandstuple of any container operands (var_value containing Eigen types)
ContainerGradientstupleof any container gradients (Eigen types)
Parameters
[in]valueThe value of the resulting dependent variable.
[in]operandsoperands.
[in]gradientsvector of partial derivatives of result with respect to operands.
container_operandsany container operands
container_gradientsany container gradients
Returns
An autodiff variable that uses the precomputed gradients provided.

Definition at line 213 of file precomputed_gradients.hpp.