Automatic Differentiation
 
Loading...
Searching...
No Matches
stan::math::internal::ops_partials_edge< ViewElt, Op, Enable > Class Template Reference

Detailed Description

template<typename ViewElt, typename Op, typename Enable = void>
class stan::math::internal::ops_partials_edge< ViewElt, Op, Enable >

An edge holds both the operands and its associated partial derivatives.

They're held together in the same class because then we can keep the templating logic that specializes on type of operand in one place.

This is the base template class that ends up getting instantiated for arithmetic primitives (doubles and ints).

NB: since ops_partials_edge.partials_ and ops_partials_edge.partials_vec are sometimes represented internally as a broadcast_array, we need to take care with assignments to them. Indeed, we can assign any right hand side which allows for indexing to a broadcast_array. The resulting behaviour is that the entry for the first index is what gets assigned. The most common use-case should be where the rhs is some container of length 1.

Template Parameters
ViewEltthe type we expect to be at partials_[i]
Opthe type of the operand

Definition at line 45 of file operands_and_partials.hpp.


The documentation for this class was generated from the following file: