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

◆ log_mix() [9/12]

template<typename T_theta , typename T_lambda1 , typename T_lambda2 , require_all_arithmetic_t< T_theta, T_lambda1, T_lambda2 > * = nullptr>
double stan::math::log_mix ( T_theta  theta,
T_lambda1  lambda1,
T_lambda2  lambda2 
)
inline

Return the log mixture density with specified mixing proportion and log densities.

\[ \mbox{log\_mix}(\theta, \lambda_1, \lambda_2) = \log \left( \theta \lambda_1 + (1 - \theta) \lambda_2 \right). \]

Template Parameters
T_thetatype of mixing proportion - must be an arithmetic type
T_lambda1type of first log density - must be an arithmetic type
T_lambda2type of second log density - must be an arithmetic type
Parameters
[in]thetamixing proportion in [0, 1].
[in]lambda1first log density.
[in]lambda2second log density.
Returns
log mixture of densities in specified proportion

Definition at line 41 of file log_mix.hpp.