1 #ifndef STAN_MATH_FWD_SCAL_META_OPERANDS_AND_PARTIALS_HPP 2 #define STAN_MATH_FWD_SCAL_META_OPERANDS_AND_PARTIALS_HPP 11 template <
typename Dx>
18 : partial_(0), partials_(partial_), operand_(op) {}
21 template <
typename,
typename,
typename,
typename,
typename,
typename>
25 Dx dx() {
return this->partials_[0] * this->operand_.
d_; }
65 template <
typename Op1,
typename Op2,
typename Op3,
typename Op4,
typename Op5,
77 : edge1_(o1), edge2_(o2) {}
79 : edge1_(o1), edge2_(o2), edge3_(o3) {}
82 : edge1_(o1), edge2_(o2), edge3_(o3), edge4_(o4) {}
84 const Op4& o4,
const Op5& o5)
85 : edge1_(o1), edge2_(o2), edge3_(o3), edge4_(o4), edge5_(o5) {}
102 = edge1_.dx() + edge2_.dx() + edge3_.dx() + edge4_.dx() + edge5_.dx();
103 return T_return_type(value, deriv);
internal::ops_partials_edge< Dx, Op1 > edge1_
T d_
The tangent (derivative) of this variable.
An edge holds both the operands and its associated partial derivatives.
broadcast_array< Dx > partials_
internal::ops_partials_edge< Dx, Op4 > edge4_
This template builds partial derivatives with respect to a set of operands.
internal::ops_partials_edge< Dx, Op2 > edge2_
operands_and_partials(const Op1 &o1, const Op2 &o2, const Op3 &o3, const Op4 &o4)
internal::ops_partials_edge< Dx, Op5 > edge5_
T_return_type build(Dx value)
Build the node to be stored on the autodiff graph.
operands_and_partials(const Op1 &o1, const Op2 &o2)
internal::ops_partials_edge< Dx, Op3 > edge3_
operands_and_partials(const Op1 &o1, const Op2 &o2, const Op3 &o3)
operands_and_partials(const Op1 &o1)
operands_and_partials(const Op1 &o1, const Op2 &o2, const Op3 &o3, const Op4 &o4, const Op5 &o5)
ops_partials_edge(const Op &op)
This template class represents scalars used in forward-mode automatic differentiation, which consist of values and directional derivatives of the specified template type.