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

◆ offset_multiplier_constrain() [15/15]

template<bool Jacobian, typename T , typename M , typename S , typename Lp , require_convertible_t< return_type_t< T, M, S >, Lp > * = nullptr>
auto stan::math::offset_multiplier_constrain ( T &&  x,
M &&  mu,
S &&  sigma,
Lp &  lp 
)
inline

Return the linearly transformed value for the specified unconstrained input and specified offset and multiplier.

If the Jacobian parameter is true, the log density accumulator is incremented with the log absolute Jacobian determinant of the transform. All of the transforms are specified with their Jacobians in the Stan Reference Manual chapter Constraint Transforms.

Template Parameters
Jacobianif true, increment log density accumulator with log absolute Jacobian determinant of constraining transform
TA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase, a standard vector, or a scalar
MA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase, a standard vector, or a scalar
SA type inheriting from Eigen::EigenBase, a var_value with inner type inheriting from Eigen::EigenBase, a standard vector, or a scalar
LpScalar, the scalar types of T, M, and S should be convertable to this
Parameters
[in]xUnconstrained scalar input
[in]muoffset of constrained output
[in]sigmamultiplier of constrained output
[in,out]lplog density accumulator
Returns
linear transformed value corresponding to inputs
Exceptions
std::domain_errorif sigma <= 0
std::domain_errorif mu is not finite

Definition at line 306 of file offset_multiplier_constrain.hpp.