Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Return the linearly transformed value for the specified unconstrained input and specified offset and multiplier, incrementing the specified reference with the log absolute Jacobian determinant of the transform.
Return the linearly transformed value for the specified unconstrained input and specified offset and multiplier.
The transform applied is
\(f(x) = mu + sigma * x\)
where mu is the offset and sigma is the multiplier.
If the offset is zero and multiplier is one, this function reduces to identity_constraint(x, lp)
.
T | type of scalar |
M | type of offset |
S | type of multiplier |
[in] | x | Unconstrained scalar input |
[in] | mu | offset of constrained output |
[in] | sigma | multiplier of constrained output |
[in,out] | lp | Reference to log probability to increment. |
std::domain_error | if sigma <= 0 |
std::domain_error | if mu is not finite |
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.
Jacobian | if true , increment log density accumulator with log absolute Jacobian determinant of constraining transform |
T | A type inheriting from Eigen::EigenBase , a var_value with inner type inheriting from Eigen::EigenBase , a standard vector, or a scalar |
M | A type inheriting from Eigen::EigenBase , a var_value with inner type inheriting from Eigen::EigenBase , a standard vector, or a scalar |
S | A type inheriting from Eigen::EigenBase , a var_value with inner type inheriting from Eigen::EigenBase , a standard vector, or a scalar |
[in] | x | Unconstrained scalar input |
[in] | mu | offset of constrained output |
[in] | sigma | multiplier of constrained output |
[in,out] | lp | log density accumulator |
std::domain_error | if sigma <= 0 |
std::domain_error | if mu is not finite |
Definition at line 93 of file offset_multiplier_constrain.hpp.