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

◆ positive_constrain() [2/3]

template<typename T , typename S >
auto stan::math::positive_constrain ( const T &  x,
S &  lp 
)
inline

Return the positive value for the specified unconstrained input, incrementing the scalar reference with the log absolute Jacobian determinant.

See positive_constrain(T) for details of the transform. The log absolute Jacobian determinant is

\(\log | \frac{d}{dx} \mbox{exp}(x) | = \log | \mbox{exp}(x) | = x\).

Template Parameters
Ttype of unconstrained value
Parameters
xunconstrained value or container
lplog density reference.
Returns
positive constrained version of unconstrained value(s)

Definition at line 44 of file positive_constrain.hpp.