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

◆ offset_multiplier_constrain() [4/14]

template<typename T , typename M , typename S , require_all_prim_or_rev_kernel_expression_t< T, M, S > * = nullptr, require_any_not_stan_scalar_t< T, M, S > * = nullptr, require_any_var_t< T, M, S > * = nullptr>
var_value< matrix_cl< double > > stan::math::offset_multiplier_constrain ( T &&  A,
M &&  mu,
S &&  sigma,
var lp 
)
inline

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 the multiplier is one this reduces to identity_constrain(x).

Template Parameters
Ttype of unconstrained input
Mtype of offset
Stype of multiplier
Parameters
[in]AUnconstrained input
[in]muoffset of constrained output
[in]sigmamultiplier of constrained output
[in,out]lpReference to log probability to increment.
Returns
linear transformed value corresponding to inputs
Exceptions
std::domain_errorif sigma <= 0
std::domain_errorif mu is not finite

Definition at line 87 of file offset_multiplier_constrain.hpp.