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

◆ build()

template<typename Op1 , typename Op2 , typename Op3 , typename Op4 , typename Op5 , typename Op6 , typename Op7 , typename Op8 , typename Dx >
T_return_type stan::math::operands_and_partials< Op1, Op2, Op3, Op4, Op5, Op6, Op7, Op8, fvar< Dx > >::build ( Dx  value)
inline

Build the node to be stored on the autodiff graph.

This should contain both the value and the tangent.

For scalars, we don't calculate any tangents. For reverse mode, we end up returning a type of var that will calculate the appropriate adjoint using the stored operands and partials. Forward mode just calculates the tangent on the spot and returns it in a vanilla fvar.

Parameters
valuethe return value of the function we are compressing
Returns
the value with its derivative

Definition at line 303 of file operands_and_partials.hpp.