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

◆ simplex_constrain() [2/6]

template<typename Vec , require_eigen_vector_t< Vec > * = nullptr, require_not_st_var< Vec > * = nullptr>
plain_type_t< Vec > stan::math::simplex_constrain ( const Vec &  y,
value_type_t< Vec > &  lp 
)
inline

Return the simplex corresponding to the specified free vector and increment the specified log probability reference with the log absolute Jacobian determinant of the transform.

The simplex transform is defined through a centered stick-breaking process.

Template Parameters
Vectype of the vector
Parameters
yFree vector input of dimensionality K - 1.
lpLog probability reference to increment.
Returns
Simplex of dimensionality K.

Definition at line 61 of file simplex_constrain.hpp.