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

◆ precomputed_gradients_vari_template() [2/2]

template<typename ContainerOperands = std::tuple<>, typename ContainerGradients = std::tuple<>>
template<typename Arith , typename VecVar , typename VecArith , typename... ContainerOps, typename... ContainerGrads, require_all_vector_t< VecVar, VecArith > * = nullptr>
stan::math::precomputed_gradients_vari_template< ContainerOperands, ContainerGradients >::precomputed_gradients_vari_template ( Arith  val,
const VecVar &  vars,
const VecArith &  gradients,
const std::tuple< ContainerOps... > &  container_operands = std::tuple<>(),
const std::tuple< ContainerGrads... > &  container_gradients = std::tuple<>() 
)
inline

Construct a precomputed vari with the specified value, operands, gradients and optionally container operands and containers of gradients.

Template Parameters
ArithAn arithmetic type
VecVarA vector of vars
VecArithA vector of arithmetic types
ContainerOpstuple of any container operands (var_value containing Eigen types)
ContainerGradstupleof any container gradients (Eigen types)
Parameters
[in]valThe value of the variable.
[in]varsVector of operands.
[in]gradientsVector of partial derivatives of value with respect to operands.
container_operandsany container operands
container_gradientsany container gradients
Exceptions
std::invalid_argumentif the sizes of the vectors don't match.

Definition at line 116 of file precomputed_gradients.hpp.